Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

trouble when use opencv_traincascade.exe

hi all

I am tring to train my owen XM with following key steps

1, create vec data with createsamples.exe with some main para posNum 5709, negNum 4381, -w 20, -h 20

this runs OK, then the vec data be created, which size is about 4M

2, when i use below cmd firstly, opencv_traincascade.exe -data D:\traincascade -vec D:\data\pos.vec -bg D:\bg.txt -numPos 5709-numNeg 4381 -numStages 22 -precalcValBufSize 200 -precalcIdxBufSize 1000 -featureType LBP -w 20 -h 20, this runs NOK, with assert pops out, opencv_traincascade.exe OpenCV Error: Assertion failed (elements_read == 1)

so then i changed para numPos to 5000, numNeg to 4350 then redo this, all works ok, but seems stuck all the time at Stage 8, this keeps 2 days so far

so, my question is what the relationship with numPos, numNeg and numStages ?

how can i train this XML with above para?