I am now implementing a project for the pattern recognition and using the opencv's opencv_traincascaded.exe to train a classifier. The background of my project is like this. I have 800 positive image samples and 2090 negative image samples, and the ratio between them is reasonable I guess. All are in jpg format.
I used this command to train the classfier as follows. As I have made a crash during the training, I changed the number of samples from 800 to 600. After that, the program can function properly. Unfortunately, it stop at the stage three and do not make any progress anymore. I wonder if there is any mistakes I made during the training process. Besides, the speed of opencv_traincascade.exe is quite slow.
I have read a lot of posts regarding this issue. But they do not give me a satisfying answer. Hope anyone can help me solve it. Thanks in advance!
Program Code
opencv_traincascade.exe -data dt -vec pos.vec -bg neg/bg.txt -numPos 600 -nu mNeg 2090 -numStages 20 -precalcValbufSize 1024 -precalcdxBufSize 1024 -featureT ype LBP -w 160 -h 50
**PARAMETERS:
- cascadeDirName: dt
- vecFileName: pos.vec
- bgFileName: neg/bg.txt
- numPos: 600
- numNeg: 2090
- numStages: 20
- precalcValBufSize[Mb] : 1024
- precalcIdxBufSize[Mb] : 1024
- stageType: BOOST
- featureType: LBP
- sampleWidth: 160
- sampleHeight: 50
- boostType: GAB
- minHitRate: 0.995
- maxFalseAlarmRate: 0.5
- weightTrimRate: 0.95
- maxDepth: 1
- maxWeakCount: 100
- Stages 0-2 are loaded
- - ===== TRAINING 3-stage ===== - <begin -="" pos="" count="" :="" consumed="" 600="" :="" 603**<="" p="">