Ask Your Question

Failed assertion by saliency calculation [closed]

asked 2017-05-02 06:53:59 -0500

Mary-Ann gravatar image

Hi everyone,

I would like to calculate the BING objectness of some images, but I can not get my code to run. I am using the example code, released here: but if I call computeSaliency() I get an assertion error:

OpenCV Error: Assertion failed (w1f.cols * w1f.rows == D && w1f.type() == CV_32F && w1f.isContinuous()) in cv::saliency::ObjectnessBING::FilterTIG::update, file \opencv_contrib-master\opencv_contrib-master\modules\saliency\src\BING\FilterTIG.cpp, line 74

I could imagine, that maybe the training fails, even though I set the training data path just like the example says. How could I check, that the training went well? Or does anyone have any idea, how I could get rid of this assertion error?

Thanks a lot for the help!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Mary-Ann
close date 2017-05-03 03:13:29.618815


Have you try this sample

LBerger gravatar imageLBerger ( 2017-05-02 13:48:46 -0500 )edit

Yes, unfortunately it still fails, and I get the same message :/

Mary-Ann gravatar imageMary-Ann ( 2017-05-02 15:47:32 -0500 )edit

can you show, how you call your prog (cmdline args) ?

the problem seems to be a wrong training_path arg (it can't find the pretrained models)


./bingTest some_img.png /full/path/to/ObjectnessTrainedModel
berak gravatar imageberak ( 2017-05-03 00:19:27 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-05-03 03:13:08 -0500

Mary-Ann gravatar image

You were right! The training failed, I used in the training data path backslashes instead of normal slashes. Everything works just fine now. Thank you for your comments!

edit flag offensive delete link more

Question Tools



Asked: 2017-05-02 06:53:59 -0500

Seen: 214 times

Last updated: May 02 '17