Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cascade Training Error OpenCV 2.4.4 - Train dataset for temp stage can not filled. Branch training terminated. Cascade Classifier can't be trained. check the used training parameters

Hi there! I used createsamples.exe to create my .vec file then I tried to use cascade training according to the OpenCV doc. But I came to this error:

PARAMETERS:

cascadeDirName: CassCade
vecFileName: Positive\ResistorP1.vec
bgFileName: Negative\NegSamples.txt
numPos: 150
numNeg: 150
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
stageType: BOOST
featureType: LBP
sampleWidth: 24
sampleHeight: 24
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   150 : 150
Train dataset for temp stage can not be filled. Branch training terminated.
Cascade classifier can't be trained. Check the used training parameters.

I use this command for cascade training:

opencv_traincascaded.exe -data CassCade -vec Positive\ResistorP1.vec -bg N
egative\NegSamples.txt -numPos 150 -numNeg 150 -numStage 30 -featureType LBP -pr
ecalcValBufSize 1024 -precalcIdxBufSize 1024

my .vec size 2.25MB and number of positive samples created by opencv_createsamples.exe is 2000 and number of negative samples is mor than 600 .jpg files.I don't know what's wrong with it ! Thanks in advance! :)