4

I am trying to build a classifier to detect faces in Thermal images. So I tried training using Haar, LBP and HOG classifiers. I am working with OpenCV 2.4.8 on windows.

opencv_traincascade.exe -data haarcascades -vec pos.vec -bg neg.txt -numPos 250 -numStages 24 -numNeg 900 -w 24 -h 24

I have 307 positive samples in total. The negative samples are of size 75x75. For each of the three cases the training gets stuck at a particular stage-earlier for Haar (stage-12) and later for LBP (stage-14/15). I reduced the number of negatives (upto 200) but that means the training gets stuck at a later stage. The training hasn't progressed since 2 days. No negatives are being consumed and the command window looks like this-

===== TRAINING 14-stage =====
<BEGIN
POS count : consumed   255 : 262

Also

  • What do POS count consumed and NEG count consumed signify?
  • When I reduce the minHitRate to say 0.7 why do the number of POS consumed increase?

Please let me know what I am doing wrong. Thanks.

4

2 に答える 2

2

私自身も同様の問題を抱えていました。問題は、各段階の分類子が、前の段階で正に分類された負の例を取ることです。そのため、負のサンプルはいずれも正として分類されず、コードはサンプルを見つけようとして無限ループに入ります。ソースコードを変更して、負の例を見つけることができず、分類子に前の段階を使用するだけでアルゴリズムが終了するようにすることで、これを解決しました。コードを変更したくない場合は、否定的な例を追加するか、ステージ数を減らしてみてください。

于 2015-02-20T02:25:30.580 に答える
2

消費されたカウントは、各ステージで使用されるポジティブ イメージとネガティブ イメージの量です。良い結果を得るには、1000 のポジティブ画像と 2000 のネガティブ画像を使用する必要があります。

于 2014-04-05T18:03:02.130 に答える