4

My haartraining program is currently running on my computer. I am using 1700 positive samples, and about 1300 negative samples. I have run the following command line:

opencv_traincascade -data data -vec cars.vec -bg bg.txt -numStages 10 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -numPos 1600 -numNeg 1371 -w 48 -h 24

At the moment, the report is the following:

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   1600 : 1600
NEG count : acceptanceRatio    1371 : 1
Precalculation time: 16
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|  0.99875| 0.587163|
+----+---------+---------+
|   5|  0.99875| 0.587163|
+----+---------+---------+
|   6| 0.995625| 0.305616|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 21 minutes 19 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   1600 : 1607
NEG count : acceptanceRatio    1371 : 0.338853
Precalculation time: 18
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|        1|
+----+---------+---------+
|   5| 0.998125| 0.786287|
+----+---------+---------+
|   6|   0.9975| 0.673961|
+----+---------+---------+
|   7| 0.995625| 0.560175|
+----+---------+---------+
|   8|   0.9975| 0.531729|
+----+---------+---------+
|   9| 0.995625| 0.406273|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours -19 minutes -57 seconds.

===== TRAINING 2-stage =====
<BEGIN
POS count : consumed   1600 : 1614
NEG count : acceptanceRatio    1371 : 0.136649
Precalculation time: 17
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4| 0.998125| 0.856309|
+----+---------+---------+
|   5| 0.999375| 0.875274|
+----+---------+---------+
|   6| 0.996875| 0.633115|
+----+---------+---------+
|   7| 0.995625| 0.546317|
+----+---------+---------+
|   8| 0.995625| 0.501094|
+----+---------+---------+
|   9|  0.99625| 0.524435|
+----+---------+---------+
|  10| 0.995625| 0.404814|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 14 minutes 52 seconds.

So reaching the end of the second stage of training, I still see a 0.4 False Alert ratio. Following some tutorial, I have been selecting a 10 stage cascade. I have read somewhere that a good classifier should be around 10^-5 FA, so I guess that with 0.404 at the end of stage 2, it's going to be hard to reach the 10^-5 FA rate at the end of stage 10. Am I right ? Shoud I already stop and improve my negative and positive samples ?

[Edit] I think I got confused between the FA rate for each stage and the general acceptance ratio...

Another question comes to my mind: What is the influence of the number of stage ? Performance vs Speed ?

Syf Illis
  • 145
  • 1
  • 12

0 Answers0