Keywords: cascade classifier, Opencv_traincascade
The following is a brief description of the operation process:
- Prepare positive and negative samples: neg, pos
- Positive and negative sample path generation: Dir/a/b>path.txt//path:pos or neg
- Positive sample Training Set generation: Opencv_createsamples.exe-info Pos\pos.txt-vec pos\pos.vec-num 799-w 24-h Pause
- Sample training: Opencv_traincascade.exe-data Data-vec pos/pos.vec-bg neg/neg.txt-numpos 100-numneg 2000-numstages 5-featuretyp E lbp-w 24-h 24-minhitrate 0.999-maxfalsealarmrate 0.1-mode All
- -numstages: Training Series A
- -numpos: Number of positive samples per level of training B
- a*b<= Total Positive Sample number
- -numneg: Number of negative samples used per level of training C
- c<= Total Negative Sample number
- -featuretype: Detection Features
- Experience: LBP for rapid training and detection, hog can better adapt to different lighting, haar suitable for the environment more complex situation
Precautions
- If an error occurs, first check whether the parameter set is correct, second, consider changing the machine, and finally consider the change of machine environment configuration.
- If you stay at a certain training stage for a long time, it indicates that it is very possible to get into a cycle, and also indicates that the classifier has reached a better state at this stage, you can exit (CTR+C) and then reduce the training progression or adjust other parameters.
- If the training effect is not ideal, consider increasing the sample set and modifying the relevant training parameters.
cascaded Classifier Training-----OpenCV