An error when using opencv_traincascade.exe

asked 2013-09-23 01:52:35 -0500

Infinite Life gravatar image

I run train with the following params: opencv_traincascade.exe -data haarcascade\ -vec samples.vec -bg negatives.txt -numStages 20 -precalcValBufSize 2500 -precalcIdxBufSize 4000 -w 20 -h 20 -numPos 8000 -numNeg 3000 -minHitRate 0.9999 -maxFalseAlarmRate 0.5 -maxDepth 4 -maxWeakCount 100 -mode ALL

It trains some time(long time) and on Stage 1 N = 7 execute the program with "opencv error: assertion failed (dims <= 2 && data && (unsigned)i0 ....... in unknown function , File C:...\opencv2/core/mat.hpp, line 537 "

Why it goes in this way?

edit retag flag offensive close merge delete


Actually I am guessing there is something wrong with your negative file. Sure there isn't a single typo?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-23 04:27:16 -0500 )edit

I'm think that my negative file is okay, because algorithm works some time. Also, it works fine with LBP features, but gives me cascade with a lot of false detections.

Infinite Life gravatar imageInfinite Life ( 2013-09-23 05:23:28 -0500 )edit

Actually if you have a lot of false positives, you have to address this by inserting more negatives, that cover enough non-object variation.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-23 05:42:41 -0500 )edit