OpenCV train Cascade Error "Train dataset for temp stage can not be filled. Branch training terminated."

36 Views Asked by At

I get following error:

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

I am running following command:

"C:\Users\ZOFSEIBO\Downloads\opencv\build\x64\vc15\bin\opencv_traincascade.exe -data C:\Users\ZOFSEIBO\Downloads\Cascade\ -vec C:\Users\ZOFSEIBO\Downloads\pos.vec -bg C:\Users\ZOFSEIBO\Downloads\neg.txt -w 48 -h 48 -numPos 220 -numNeg 3000 -numStages 10"

which is supposed to get me my .xml file. After pressing enter it runs like this:

PARAMETERS:
cascadeDirName: C:\Users\new\Downloads\Cascade\
vecFileName: C:\Users\new\Downloads\pos.vec
bgFileName: C:\Users\new\Downloads\neg.txt
numPos: 220
numNeg: 3000
numStages: 10
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: HAAR
sampleWidth: 48
sampleHeight: 48
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: BASIC
Number of unique features given windowSize [48,48] : 2570880

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

I have 245 positive Samples in total and 437 negative pictures

I spend hours looking for a solution but nothing worked so far, i hope someone can help.

0

There are 0 best solutions below