Ask Your Question

Revision history [back]

How to do HAAR training?

I've been trying to achieve object detection of random objects using HAAR training. To create samples i used the parameters:

C:\opencv\build\x64\vc12\bin\opencv_createsamples.exe -info positivesBottle.txt -vec samplesBottle.vec -num 444 -w 50 -h 80 PAUSE

And then i trained the cascade using the parameters:

C:\opencv\build\x64\vc12\bin\opencv_traincascade.exe -data testclassifier -vec samplesBottle.vec -bg negativeBottle.txt -numPos 300 -numNeg 1000 -featureType LBP -numStages 11 -w 50 -h 80

but i keep getting this at the end that the 'Train dataset for temp stage can not be filled. Branch training terminated.'

stageType: BOOST featureType: HAAR sampleWidth: 50 sampleHeight: 80 boostType: GAB minHitRate: 0.995 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: BASIC

===== TRAINING 0-stage ===== <begin pos="" count="" :="" consumed="" 50="" :="" 50="" neg="" count="" :="" acceptanceratio="" 100="" :="" 1="" precalculation="" time:="" 7.79="" +----+---------+---------+="" |="" n="" |="" hr="" |="" fa="" |="" +----+---------+---------+="" |="" 1|="" 1|="" 0|="" +----+---------+---------+="" end=""> Training until now has taken 0 days 0 hours 1 minutes 1 seconds.

===== TRAINING 1-stage ===== <begin pos="" count="" :="" consumed="" 50="" :="" 50="" train="" dataset="" for="" temp="" stage="" can="" not="" be="" filled.="" branch="" training="" terminated.<="" p="">

Is there any solution for this? i even increased decreased the number of positives and negatives, and even the minHitRate and changing any other parameter i could.

How to do HAAR training?

I've been trying to achieve object detection of random objects using HAAR training. To create samples i used the parameters:

C:\opencv\build\x64\vc12\bin\opencv_createsamples.exe -info positivesBottle.txt -vec samplesBottle.vec -num 444 -w 50 -h 80 PAUSE

80

And then i trained the cascade using the parameters:

C:\opencv\build\x64\vc12\bin\opencv_traincascade.exe -data testclassifier -vec samplesBottle.vec -bg negativeBottle.txt -numPos 300 -numNeg 1000 -featureType LBP -numStages 11 -w 50 -h 80 

80

but i keep getting this at the end that the 'Train 'Train dataset for temp stage can not be filled. Branch training terminated.'

terminated.'

stageType: BOOST
featureType: HAAR
sampleWidth: 50
sampleHeight: 80
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: BASIC

BASIC ===== TRAINING 0-stage ===== <begin pos="" count="" :="" consumed="" 50="" :="" 50="" neg="" count="" :="" acceptanceratio="" 100="" :="" 1="" precalculation="" time:="" 7.79="" +----+---------+---------+="" |="" n="" |="" hr="" |="" fa="" |="" +----+---------+---------+="" |="" 1|="" 1|="" 0|="" +----+---------+---------+="" end=""> <BEGIN POS count : consumed 50 : 50 NEG count : acceptanceRatio 100 : 1 Precalculation time: 7.79 +----+---------+---------+ | N | HR | FA | +----+---------+---------+ | 1| 1| 0| +----+---------+---------+ END> Training until now has taken 0 days 0 hours 1 minutes 1 seconds.

seconds. ===== TRAINING 1-stage ===== <begin pos="" count="" :="" consumed="" 50="" :="" 50="" train="" dataset="" for="" temp="" stage="" can="" not="" be="" filled.="" branch="" training="" terminated.<="" p="">

<BEGIN POS count : consumed 50 : 50 Train dataset for temp stage can not be filled. Branch training terminated.

Is there any solution for this? i even increased decreased the number of positives and negatives, and even the minHitRate and changing any other parameter i could.