Ask Your Question
0

training stage-1 error

asked 2016-06-22 11:02:19 -0600

danaro gravatar image

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.

edit retag flag offensive close merge delete

Comments

can you provide details about positive and negative samples?

can gravatar imagecan ( 2016-06-29 14:24:40 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-06-30 07:26:19 -0600

-minHitRate 0.1 will mean that 90 of your positives can get wrongly classified. It is perfectly natural that your algorithm will stop after a single stage .... also your maximum false alarm rate is way to high to take advantage of the early rejecting principle, introduced by the boosted cascade of weak classifiers. I guess you should start reading about traincascade parameters!

edit flag offensive delete link more

Comments

Also to add an extra comment ... this is NOT an error, but just the algorithm, boosting, deciding that the model is good enough given your parameters!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-06-30 07:28:20 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-06-22 11:02:19 -0600

Seen: 228 times

Last updated: Jun 22 '16