Value out of range error in the opencv_traincascade tool for training lbp classifier (Bug #2165)
Description
While trying to train a lbp cascade classifier using the opencv_traincascade.exe which I built using VS2010 on Windows 7, I get this error msg : OpenCV Error: One of arguments' values is out of range () in unknown function, file C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\datastructs.cpp, line 1055.
The arguments used with opencv_traincascade.exe is -data temp\data -vec temp\samples.vec -bg temp\negative\infofile.txt -numPos 2 -numNeg 2 -numStages 20 -featuretype LBP -minHitRate 0.999
Also, the number of postive samples in my samples.vec file is 45, and there are a total of 90 negative images in the \negative folder.
It seems that the data in img reader array exceeds its bounds, but I have no idea how to fix it.
I used this release of imgstorage.cpp while building opencv_traincascade. Also, I've uploaded the samples.vec file, opencv_traincascade.exe and opencv_createsamples.exe. Oh, and I'm using OpenCV 2.4.0.
Associated revisions
fixed #2165
git-svn-id: file://localhost/home/tolik/svnrepo/trunk@9015 c5418bc3-7546-4aae-8bad-fa6f2f3e53e6
fixed #2165
Merge pull request #2165 from ilya-lavrenov:tapi_upload
History
Updated by Maria Dimashova over 12 years ago
- Category set to ml
- Assignee set to Maria Dimashova
Updated by Maria Dimashova over 12 years ago
Thanks for the report! Fixed in r9015. The problem was due to trees of AdaBoost can not be trained with your parameters. You try to train each stage using -numPos 2 and -numNeg 2, but CvDTreeParams has default value of min_sample_count = 10. That mean that you have to set numPos + numNeg > 10. There is no way to change min_sample_count parameter using command line of traincascade app. But -numPos 2 and -numNeg 2 is too degenerate choice for the practical usage. Please try to increase these values.
- Status changed from Open to Done