OpenCV2.4 and OpenCV3.0 traincascade app - wrong use of negative file location parameter (Bug #4200)
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
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