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