Required leaf false alarm rate achieved. Branch training terminated.
I use these commands:
find ./negatives/ -name '*.jpg' > negatives.dat
opencv_createsamples -img object.png -num 3000 -bg negatives.dat -vec samples.vec -maxxangle 0.3 -maxyangle 0.3 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 20 -h 20
opencv_traincascade -data haarcascade -vec samples.vec -bg negatives.dat -numPos 10 -numNeg 3000 -numStages 2 -w 20 -h 20 -minHitRate 0.7 -maxFalseAlarmRate 0.6 -mode ALL
negative images are from http://tutorial-haartraining.googlecode.com/svn/trunk/
object image is
the result is
===== TRAINING 1-stage =====
POS count : consumed 10 : 10
NEG count : acceptanceRatio 3000 : 0.000429487
Required leaf false alarm rate achieved. Branch training terminated.
now, I have no idea how to resolve this problem, need help.
answers from stevenputtemans
Next time create your own topic
Try upping your minHitRate and lower the maxFalseAlarmRate, basically values of 0.99 and 0.5 are used.
Try creating negatives without the createsamples tool, the rotation and deviation parameters create unreal samples, which create very bad detector classes.
I follow point 2 and use command "opencv_traincascade -data haarcascade -vec samples.vec -bg negatives.dat -numPos 10 -numNeg 3000 -numStages 2 -w 20 -h 20 -minHitRate 0.99 -maxFalseAlarmRate 0.5 -mode ALL", but the result is "Required leaf false alarm rate achieved. Branch training terminated." too.
As for point 3, without createsamples tool, how should I create sample.vec file?
Did you resolve this issue?