Value out of range error in the opencv_traincascade tool for training lbp classifier (Bug #2165)


Added by Shishir Joshi over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-07-12
Priority:Normal Due date:
Assignee:Maria Dimashova % Done:

0%

Category:ml
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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.


opencv_traincascade.exe (173.5 kB) Shishir Joshi, 2012-07-12 10:15 am

opencv_createsamples.exe (339 kB) Shishir Joshi, 2012-07-12 10:15 am

samples.vec (50.7 kB) Shishir Joshi, 2012-07-12 10:15 am


Associated revisions

Revision 772b6407
Added by Maria Dimashova over 12 years ago

fixed #2165

git-svn-id: file://localhost/home/tolik/svnrepo/trunk@9015 c5418bc3-7546-4aae-8bad-fa6f2f3e53e6

Revision 69296c33
Added by Maria Dimashova over 12 years ago

fixed #2165

Revision 69ba0c53
Added by Andrey Pavlenko about 11 years ago

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

Also available in: Atom PDF