我无法正确训练分类器。当我使用生成的 cascade.xml 时,无法识别该对象。相反,对象的某些部分是。
训练的命令行是这样的:
opencv_traincascade -data data -vec samples.vec -bg negatives.txt -numPos 200 -numNeg 100 -numStages 13 -w 80 -h 80 -featureType LBP -minHitRate 0.999 -maxFalseAlarmRate 0.5
训练时输出如下所示:
===== TRAINING 10-stage =====
<BEGIN
POS count : consumed 200 : 200
NEG count : acceptanceRatio 100 : 0.00586029
Precalculation time: 2
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 0.09|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 6 minutes 9 seconds.
===== TRAINING 11-stage =====
<BEGIN
POS count : consumed 200 : 200
NEG count : acceptanceRatio 100 : 0.00724585
Precalculation time: 3
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 0.09|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 6 minutes 49 seconds.
===== TRAINING 12-stage =====
<BEGIN
当我用它来检测我的对象(在我的情况下,对象是方向盘)时,结果是: