这是我第一次使用 opencv 的 haartraining。
只是为了练习,我使用了 35 个正图像和 45 个负图像。
但是当我尝试从数据中训练时,它不会永远完成,
即使参数被极度调整。
(最小命中率 = 0.001,最大误报率 = 0.999
由于这个极端值,我认为不会花费很多时间)
我的实验一定有什么问题?
这是我的命令和参数。
$opencv_haartraining -data Training -vec samples.vec -bg negatives.dat -nstages 2 -nsplits 2 -minhitrate 0.001 -maxfalsealarm 0.999 -npos 30 -nneg 40 -w 20 -h 20 -nonsym -mem 512 -mode ALL -minpos 10
和结果。
Data dir name: Training
Vec file name: samples.vec
BG file name: negatives.dat, is a vecfile: no
Num pos: 30
Num neg: 40
Num stages: 2
Num splits: 2 (tree as weak classifier)
Mem: 512 MB
Symmetric: FALSE
Min hit rate: 0.001000
Max false alarm rate: 0.999000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: ALL
Width: 20
Height: 20
Applied boosting algorithm: GAB
Error (valid only for Discrete and Real AdaBoost): misclass
Max number of splits in tree cascade: 0
Min number of positive samples per cluster: 10
Required leaf false alarm rate: 0.998001
Stage 0 loaded
Stage 1 loaded
Stage 2 loaded
Stage 3 loaded
Stage 4 loaded
Tree Classifier
Stage
+---+---+---+---+---+
| 0| 1| 2| 3| 4|
+---+---+---+---+---+
0---1---2---3---4
Number of features used : 125199
Parent node: 4
*** 1 cluster ***
POS: 30 32 0.937500