mrnugget / opencv-haar-classifier-training

Learn how to train your own OpenCV Haar classifier
Other
735 stars 470 forks source link

hi, i'm getting like this while creating my own harr-cascade classifier, please let me correct if anything wrong, and please tell the reason for why classifier cant be trained? and thanks in advance #45

Closed saideepthik closed 6 years ago

saideepthik commented 6 years ago

opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt\

-numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000\ -numNeg 600 -w 80 -h 40 -mode ALL -precalcValBufSize 1024\ -precalcIdxBufSize 1024 PARAMETERS: cascadeDirName: classifier vecFileName: samples.vec bgFileName: negatives.txt numPos: 1000 numNeg: 600 numStages: 20 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 acceptanceRatioBreakValue : -1 stageType: BOOST featureType: HAAR sampleWidth: 80 sampleHeight: 40 boostType: GAB minHitRate: 0.999 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: ALL Number of unique features given windowSize [80,40] : 7767622

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

mrnugget commented 6 years ago

No idea, sorry. This seems to be more of an OpenCV issue than one here.

saideepthik commented 6 years ago

ok thanks for replying! issue was resolved. reason to get like this is giving less samples to get train. so i increased my number for positive samples and negatives samples. now training well.

mrnugget commented 6 years ago

Thanks for the update!