我尝试使用以下参数训练级联:
C:\opencv\build\x86\vc12\bin\opencv_traincascade.exe -data C:\opencv\build\x86\vc12\bin\tl_train -vec C:\opencv\build\x86\vc12\bin\tl_train_samples.vec -bg C:\opencv\build\x86\vc12\bin\tl_neg.dat -numPos 70 -numNeg 900 -numStages 10 -minHitRate 0.1 -w 40 -h 40 -featureType LBP -precalcValBufSize 1024 -precalcldxBufSize 1024
我得到的结果是:
PARAMETERS:
cascadeDirName: C:\opencv\build\x86\vc12\bin\tl_train
vecFileName: C:\opencv\build\x86\vc12\bin\tl_train_samples.vec
bgFileName: C:\opencv\build\x86\vc12\bin\tl_neg.dat
numPos: 70
numNeg: 900
numStages: 10
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: LBP
sampleWidth: 40
sampleHeight: 40
boostType: GAB
minHitRate: 0.999
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
Number of unique features given windowSize [40,40] : 67600
===== TRAINING 0-stage =====
<BEGIN
POS count : consumed 70 : 70
NEG count : acceptanceRatio 900 : 1
Precalculation time: 2.512
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 1|
+----+---------+---------+
| 3| 1| 0.213333|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 0 minutes 6 seconds.
===== TRAINING 1-stage =====
<BEGIN
POS count : consumed 70 : 70
NEG count : acceptanceRatio 900 : 0.214184
Precalculation time: 2.461
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 1|
+----+---------+---------+
| 3| 1| 0.201111|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 0 minutes 13 seconds.
===== TRAINING 2-stage =====
<BEGIN
POS count : consumed 70 : 70
NEG count : acceptanceRatio 900 : 0.043021
Precalculation time: 2.588
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 0|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 0 minutes 22 seconds.
===== TRAINING 3-stage =====
<BEGIN
POS count : consumed 70 : 70
Train dataset for temp stage can not be filled. Branch training terminated.
实例数为91,负数为1046。
如何使程序在参数中指定的所有阶段运行?
谢谢。