Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Training cascade classifier: Can not get new positive sample

$
0
0
I'm trying to create custom haar classifier. I have opencv compiled on my machine. I have 435 positive images and 4437 negatives (yeah, I know, probably waaaay to much), all of them grayscaled. Now, my directory structure looks like this opencv_createsamples opencv_traincascade positives.txt negatives.txt positives/ V-train001.ppm ... negatives/ V-train001.ppm ... negatives.txt looks like that: ./negatives/A-train0426.ppm ./negatives/Point-train1035.ppm ... positives.txt: positives/V-train362.ppm 1 1 1 66 76 positives/V-train227.ppm 1 1 1 66 76 positives/V-train154.ppm 1 1 1 65 76 Now, I'm creating samples with the following command: novy@novy-K53SV:~/Downloads/opencv-3.1.0/build/bin$ ./opencv_createsamples -info positives.txt -vec sample.vec Info file name: positives.txt Img file name: (NULL) Vec file name: sample.vec BG file name: (NULL) Num: 1000 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... positives.txt(436) : parse errorDone. Created 435 samples So it looks like samples have been created successfully. However, when I'm trying to train my classifier I see the following: novy@novy-K53SV:~/Downloads/opencv-3.1.0/build/bin$ ./opencv_traincascade -data haarcascade -vec sample.vec -bg negatives.txt -nstages 20 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -npos 200 -nneg 500 PARAMETERS: cascadeDirName: haarcascade vecFileName: sample.vec bgFileName: negatives.txt numPos: 2000 numNeg: 1000 numStages: 20 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 acceptanceRatioBreakValue : -1 stageType: BOOST featureType: HAAR sampleWidth: 24 sampleHeight: 24 boostType: GAB minHitRate: 0.995 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: BASIC ===== TRAINING 0-stage =====

Viewing all articles
Browse latest Browse all 19555

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>