"Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters."
I checked same problem under it.
・http://answers.opencv.org/question/91235/cascade-training-error-opencv-31-train-dataset-for-temp-stage-can-not-be-filled-branch-training-terminated-cascade-classifier-cant-be-trained-check/
However, error still occurred in this system. Also, I use OpenCV 3.0.0 with Python 2.7.12 on Ubuntu16.04.
#!/bin/sh
ls pos | xargs -I {} echo -e pos/{} > pslist.txt
paste pslist.txt plus.txt > pslist2.txt
mv pslist2.txt pslist.txt
ls neg | xargs -I {} echo -e neg/{} > nglist.txt
paste nglist.txt neg.txt > nglist2.txt
mv nglist2.txt nglist.txt
opencv_createsamples -info pslist.txt -num 99 -vec image.vec -w 24 -h 24
opencv_traincascade -data cascade -vec image.vec -bg nglist.txt -numPos 90 -numNeg 501 -numStages 20 -w 24 -h 24 -featureType LBP
pslist.txt
pos/Flower100001.jpg 1 0 0 24 24
pos/Flower100002.jpg 1 0 0 24 24
pos/Flower100003.jpg 1 0 0 24 24
pos/Flower100004.jpg 1 0 0 24 24
pos/Flower100005.jpg 1 0 0 24 24
:
nglist.txt
neg/Car100001.jpg 1 0 0 24 24
neg/Car100002.jpg 1 0 0 24 24
neg/Car100003.jpg 1 0 0 24 24
neg/Car100004.jpg 1 0 0 24 24
neg/Car100005.jpg 1 0 0 24 24
:
result
Info file name: pslist.txt
Img file name: (NULL)
Vec file name: image.vec
BG file name: (NULL)
Num: 99
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 24
Height: 24
Create training samples from images collection...
Done. Created 99 samples
PARAMETERS:
cascadeDirName: cascade
vecFileName: image.vec
bgFileName: nglist.txt
numPos: 90
numNeg: 501
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
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 current samples: 1
POS current samples: 2
:
POS count : consumed 90 : 90
Train dataset for temp stage can not be filled. Branch training terminated.
Cascade classifier can't be trained. Check the used training parameters.
So, anyone teach me how to solve it?