Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

training stage-1 error

I try to train the cascade using the following parameters:

C:\opencv\build\x86\vc12\bin>C:\opencv\build\x86\vc12\bin\opencv_traincascade.exe -data C:\opencv\build\x86\vc12\bin\LETTER_TRAIN -vec C:\opencv\build\x86\vc12\bin\LETTERS.vec -bg C:\opencv\build\x86\vc12\bin\LETTER_NEG.dat -numPos 32 -numNeg 160 -numStages 2 -minHitRate 0.1 -w 50 -h 50 -featureType LBP -precalcValBufSize 1024 -precalcldxBufSize 1024 -maxFalseAlarmRate 0.999

The result I get is:

PARAMETERS:
cascadeDirName: C:\opencv\build\x86\vc12\bin\LETTER_TRAIN
vecFileName: C:\opencv\build\x86\vc12\bin\LETTERS.vec
bgFileName: C:\opencv\build\x86\vc12\bin\LETTER_NEG.dat
numPos: 32
numNeg: 160
numStages: 2
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: LBP
sampleWidth: 50
sampleHeight: 50
boostType: GAB
minHitRate: 0.1
maxFalseAlarmRate: 0.999
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
Number of unique features given windowSize [50,50] : 166464

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   32 : 32
NEG count : acceptanceRatio    160 : 1
Precalculation time: 0.69
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        0|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 0 minutes 2 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   32 : 32
Train dataset for temp stage can not be filled. Branch training terminated.

What should I do to make the program run trough all the stages specified in the parameters?

Thank you.