Ask Your Question

Revision history [back]

opencv_traincascade error: Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

Bat file contain: C:\opencv\build\x86\vc11\bin\opencv_traincascade.exe -data classifier -vec samples1.vec -bg negative.txt -numPos 10 -numNeg 100 -numStages 3 -precalcValBufSize 256 -precalcIdxBufSize 256 -baseFormatSave -w 20 -h 20 -mode ALL PAUSE

After run the bat file I am getting error.

C:\TEST_IMAGE\training>C:\opencv\build\x86\vc11\bin\opencv_traincascade.exe -dat a classifier -vec samples1.vec -bg negative.txt -numPos 10 -numNeg 100 -numStage s 10 -precalcValBufSize 256 -precalcIdxBufSize 256 -baseFormatSave -w 20 -h 20 - mode ALL PARAMETERS: cascadeDirName: classifier vecFileName: samples1.vec bgFileName: negative.txt numPos: 10 numNeg: 100 numStages: 10 precalcValBufSize[Mb] : 256 precalcIdxBufSize[Mb] : 256 acceptanceRatioBreakValue : -1 stageType: BOOST featureType: HAAR sampleWidth: 20 sampleHeight: 20 boostType: GAB minHitRate: 0.995 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: ALL

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

Cascade classifier can't be trained. Check the used training parameters.

How to solve the error??

click to hide/show revision 2
No.2 Revision

updated 2015-08-25 07:16:14 -0600

berak gravatar image

opencv_traincascade error: Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

Bat file contain: contain:

C:\opencv\build\x86\vc11\bin\opencv_traincascade.exe -data classifier -vec samples1.vec -bg negative.txt -numPos 10 -numNeg 100 -numStages 3 -precalcValBufSize 256 -precalcIdxBufSize 256 -baseFormatSave -w 20 -h 20 -mode ALL 
PAUSE

PAUSE

After run the bat file I am getting error.

C:\TEST_IMAGE\training>C:\opencv\build\x86\vc11\bin\opencv_traincascade.exe -dat
a classifier -vec samples1.vec -bg negative.txt -numPos 10 -numNeg 100 -numStage
s 10 -precalcValBufSize 256 -precalcIdxBufSize 256 -baseFormatSave -w 20 -h 20 -
mode ALL
PARAMETERS:
cascadeDirName: classifier
vecFileName: samples1.vec
bgFileName: negative.txt
numPos: 10
numNeg: 100
numStages: 10
precalcValBufSize[Mb] : 256
precalcIdxBufSize[Mb] : 256
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: HAAR
sampleWidth: 20
sampleHeight: 20
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: ALL

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

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

parameters.

How to solve the error??