Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to correctly set all the paths and run the code? #8

Open
sunshineatnoon opened this issue Aug 16, 2015 · 14 comments
Open

How to correctly set all the paths and run the code? #8

sunshineatnoon opened this issue Aug 16, 2015 · 14 comments

Comments

@sunshineatnoon
Copy link

I have successfully make the project, but I can't find how to run the code. I tried to run BING_linux, but I got this error:

OpenCV Error: Assertion failed (matRead(_modelName + ".xP", xP1f) && matRead(_modelName + ".xN", xN1f)) in trainStageI, file /home/lixueting/Downloads/Objectness-master/Src/Objectness.cpp, line 555
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/lixueting/Downloads/Objectness-master/Src/Objectness.cpp:555: error: (-215) matRead(_modelName + ".xP", xP1f) && matRead(_modelName + ".xN", xN1f) in function trainStageI

I looked into yml.m, there are voc path and imagenet path, do I have to download imagenet too in order to run the code?
Thanks!

@phil0stine
Copy link

I second this question. Not to hijack, but I also cannot find any mention of "WinRecall.m", which is used in main.cpp. It seems related to the issue of setting up all paths and downloading the required files.

@bittnt
Copy link
Collaborator

bittnt commented Aug 27, 2015

@sunshineatnoon No, you do not need to download ImageNet unless you want to try BING on ImageNet. Otherwise, stick to VOC.

@bittnt
Copy link
Collaborator

bittnt commented Aug 27, 2015

@phil0stine Sorry for the confusion. The answer is NO. In fact, WinRecall.m is generated from the BING program.

@RyanCV
Copy link

RyanCV commented Jan 10, 2016

@sunshineatnoon , I have the following error similar to yours, do u know how to solve it??
Invalidate class name
in /media/BING_Linux/Src/DataSetVOC.cpp:125
OpenCV Error: Assertion failed (Invalidate class name
) in loadBox, file /media/BING_Linux/Src/DataSetVOC.cpp, line 125
terminate called after throwing an instance of 'cv::Exception'
what(): /media/BING_Linux/Src/DataSetVOC.cpp:125: error: (-215) Invalidate class name
in function loadBox

@sfandi
Copy link

sfandi commented May 13, 2016

@sunshineatnoon @bittnt got the same problem. I'm trying to run for it exam. Any solutions? :\

@bittnt
Copy link
Collaborator

bittnt commented May 15, 2016

This means the VOC files you are trying to read do not meet the requirement for the code. Check the DataSetVOC.cpp line 125, probably because you have extra space or invisible symbols in that txt file.

@ramanpreet9
Copy link

how do u run bing on a given image. not VOC dataset. Forexample: how od you get the 2D object proposals in bing on lena.png

@ming-c
Copy link

ming-c commented Jan 25, 2017

@RyanCV Hi Ryan, did you find how to solve this problem? I have tried opencv2.4.13 and opencv3.2.0, both of them report this message to me. Thank you.

@brat-eek
Copy link

@bittnt @RyanCV @sfandi I encounter the same problem. Has anyone found a solution ?

I print the path to the VOC dataset /mnt1/logs/caffe/objpro/BINGpp/VOCdevkit/VOC2007/ImageSets/Main/train.txt
I also print trainNum and testNum
trainnum: 2501
testnum: 200

Yet the error:
Invalidate class name
in /mnt1/logs/caffe/objpro/Objectness/Src/DataSetVOC.cpp:131
OpenCV Error: Assertion failed (Invalidate class name
) in loadBox, file /mnt1/logs/caffe/objpro/Objectness/Src/DataSetVOC.cpp, line 131
terminate called after throwing an instance of 'cv::Exception'
what(): /mnt1/logs/caffe/objpro/Objectness/Src/DataSetVOC.cpp:131: error: (-215) Invalidate class name in function loadBox

Aborted (core dumped)
Which txt are you talking about @bittnt when referring to extra space and invisible symbols ??

@bittnt
Copy link
Collaborator

bittnt commented Jul 29, 2017

Check the encode type for the txt files.

@dorioliu
Copy link

Hi , Shuai Zheng @bittnt , thanks for your work. I do not understand what you said above "Check the encode type for the txt files.", I think i have a right path for VOC2007 and right format "yml" instead of "xml" , but i also get the same problem :

in /home/dorioliu/Documents/objectdetecion/BING/Objectness-master_linuxversion/Src/DataSetVOC.cpp:125
OpenCV Error: Assertion failed (Invalidate class name
) in loadBox, file /home/dorioliu/Documents/objectdetecion/BING/Objectness-master_linuxversion/Src/DataSetVOC.cpp, line 125
terminate called after throwing an instance of 'cv::Exception'
what(): /home/dorioliu/Documents/objectdetecion/BING/Objectness-master_linuxversion/Src/DataSetVOC.cpp:125: error: (-215) Invalidate class name
in function loadBox

@dorioliu
Copy link

Hi, @RyanCV ,did you solve your problem ?

@MaryAnnZ
Copy link

MaryAnnZ commented May 14, 2018

@dorioliu @ming-c @RyanCV
Did you set up the database correctly? It should look like this: https://mmcheng.net/bingreadme/ , you can also check the paths to the training and test files in the constructor of DataSetVOC. For some reason the function CmFile::loadStrList() did not work for me (I am using OpenSUSE) and I modified the code that the files are red correctly.
And also check if you have a class.txt file next to train and test.txt. My download did not contain that, so I wrote one myself. Now the application is able to produce the training models.

@lyycfairy
Copy link

@MaryAnnZ is right!
I just comment the line "line.resize(sz - 1)" in function CmFile::loadStrList().
then it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests