OpenCV2.4 and OpenCV3.0 traincascade app - wrong use of negative file location parameter (Bug #4200)


Added by Steven Puttemans about 10 years ago. Updated almost 10 years ago.


Status:Done Start date:2015-02-17
Priority:Low Due date:
Assignee:Steven Puttemans % Done:

0%

Category:objdetect
Target version:-
Affected version:branch '2.4' (2.4-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

It seems that

opencv_traincascade -data /data/datasets/candy_model/working_model/cascade/ -vec /data/datasets/candy_model/working_model/data.vec -bg /data/datasets/candy_model/working_model/negatives.txt -numPos 10 -numNeg 100 -numStages 20 -featureType LBP -w 59 -h 23

is not working as a training command, where

opencv_traincascade -data /data/datasets/candy_model/working_model/cascade/ -vec /data/datasets/candy_model/working_model/data.vec -bg negatives.txt -numPos 10 -numNeg 100 -numStages 20 -featureType LBP -w 59 -h 23

and


opencv_traincascade -data cascade/ -vec data.vec -bg negatives.txt -numPos 10 -numNeg 100 -numStages 20 -featureType LBP -w 59 -h 23

are working just fine. I personally hate it when software is written depending on its files relatively to the executable, so I am going to try and fix this. Using this issue to keep track of the result.


Associated revisions

Revision 587b0cc7
Added by Vadim Pisarevsky over 9 years ago

Merge pull request #4200 from Astero92:#3800

History

Updated by Steven Puttemans about 10 years ago

Okay found what is causing the crash
- PosImgReader goes well
- Inside NegImgReader at a certain moment it loops over the images from the file using the imgFilenames[last++] storage of filenames
- It seems that the filenames are stored wrongfully

Instead of

/data/datasets/candy_model/working_model/negatives/neg_3.png
/data/datasets/candy_model/working_model/negatives/neg_1.png
/data/datasets/candy_model/working_model/negatives/neg_2.png

I get locations defined as

/data/datasets/candy_model/working_model//data/datasets/candy_model/working_model/negatives/neg_3.png
/data/datasets/candy_model/working_model//data/datasets/candy_model/working_model/negatives/neg_1.png
/data/datasets/candy_model/working_model//data/datasets/candy_model/working_model/negatives/neg_2.png

Going to dig deeper where it goes wrong!

Updated by Vadim Pisarevsky almost 10 years ago

  • Category set to objdetect

Updated by Vadim Pisarevsky almost 10 years ago

I believe, the problem is solved now, right?

Updated by Steven Puttemans almost 10 years ago

Yep it is fixed! Forgot to update it!

  • Status changed from Open to Done

Also available in: Atom PDF