OpenCV training help

0

In a process of creating a haarcascade, I performed the procedures according to the tutorials of the OpenCV library and arrived at the result of a vector with the number of 70 positive images named positives.vec . The vector is being generated correctly, because by executing the following command, vector images are shown:

opencv_createsamples -vec positivos.vec -show -w 20 -h 20

Myproblemisinthetrainingcommandpart,whenexecutingthefollowingcommand:

opencv_traincascade-datadata-vecpositivos.vec-bgnegativos.dat-numPos70-numNeg35-numStages10-minHitRate0.8-w20-h20

My negatives.dat file looks like this:

negativos/img1.jpg

negativos/img2.jpg

negativos/img3.jpg

negativos/img4.jpg

...

negativos/img1000.jpg

What would be the problem with the training command? Few pictures? Something not added correctly? How to proceed?

Note: I'm using Windows 10 64bit.

    
asked by anonymous 06.09.2017 / 02:45

1 answer

-1

Use twice as many negative images pertaining to positive images Example 40 positive for 80 negatives Do not put less than twice as many positive images on negatives. This should resolve this error.

Another tip in featureType configure for LBP and not HAAR is a great combination to train images. This parameter indicates the type of algorithm to be processed LBP and the most advanced HAAR.

I hope I have helped!

    
13.12.2017 / 01:38