opencv_traincascade.exe默认表格
训练正样本2400,负样本3300
1.opencv_traincascade.exe -data traincascade -vec pos.vec -bg neg.txt -numPos 2000 -numNeg 3300 -numStages 20 -precalcValBufSize 200 -precalcIdxBufSize 1000
-featureType LBP -w 18 -h 24 -bt GAB -minHitRate 0.95 -maxFalseAlarmRate 0.5 -weightTrimRate 0.95 -maxDepth 1 -maxWeakCount 100
如果出现Parameters can not be written, because file traincascade/params.xml can not be opened 错误
则自己需要手动创建一个文件夹 traincascade
2.如果出现如下问题.
Traincascade Error:Bad argument(Can not get new positive sample.The most possible reason is insufficient count of samples in given vec-file.
记得一定要numPos小于vec_file文件里面的数 一般numPos为0.9*num_in_vec或者为0.8*num_in_vec
具体讲解可以参考/question/4368/traincascade-error-bad-argument-can-not-get-new/