opencv_traincascade finish without cascade.xml file

asked 2019-09-30 19:10:43 -0600

Hey there!

I'm trying to train a lot of cropped images, but training has finished without any explanation. Training has taken 5 days 6 hours. The pos images was cropped manually without opencv_createsamples. As you can see, in stage 24 the training stopped without any explanation. :C anyone can help me?

PARAMETERS:
cascadeDirName: animals_training/harcascades
vecFileName: animals_training/vec_files/training_euppertinax_21-29.vec
bgFileName: animals_training/neg/bg.txt
numPos: 1000
numNeg: 3000
numStages: 25
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: HAAR
sampleWidth: 21
sampleHeight: 29
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: ALL

Number of unique features given windowSize [21,29] : 287607

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   1000 : 1000
NEG count : acceptanceRatio    3000 : 1
Precalculation time: 24
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|    0.997|     0.67|
+----+---------+---------+
|   5|    0.996| 0.529333|
+----+---------+---------+
|   6|    0.998| 0.540333|
+----+---------+---------+
|   7|    0.997| 0.402667|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 10 minutes 29 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   1000 : 1003
NEG count : acceptanceRatio    3000 : 0.637213
Precalculation time: 22
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|    0.999| 0.660667|
+----+---------+---------+
|   5|    0.999| 0.608667|
+----+---------+---------+
|   6|    0.999|    0.553|
+----+---------+---------+
|   7|    0.997| 0.330667|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 20 minutes 37 seconds.
...
===== TRAINING 14-stage =====
<BEGIN
POS count : consumed   1000 : 1055
NEG count : acceptanceRatio    3000 : 8.32271e-05
Precalculation time: 22
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|    0.997| 0.949667|
+----+---------+---------+
|   5|    0.999|    0.967|
+----+---------+---------+
|   6|    0.996|    0.879|
+----+---------+---------+
|   7|    0.996|    0.904|
+----+---------+---------+
|   8|    0.996| 0.880333|
+----+---------+---------+
|   9|    0.996|     0.87|
+----+---------+---------+
|  10|    0.996| 0.811333|
+----+---------+---------+
|  11|    0.996|    0.843|
+----+---------+---------+
|  12|    0.996| 0.801667|
+----+---------+---------+
|  13|    0.996|    0.758|
+----+---------+---------+
|  14|    0.996| 0.720667|
+----+---------+---------+
|  15|    0.996|    0.678|
+----+---------+---------+
|  16|    0.996| 0.674333|
+----+---------+---------+
|  17|    0.996|    0.666|
+----+---------+---------+
|  18|    0.996| 0.601667|
+----+---------+---------+
|  19|    0.996| 0.617333|
+----+---------+---------+
|  20|    0.996|    0.563|
+----+---------+---------+
|  21|    0.996| 0.597333|
+----+---------+---------+
|  22|    0.996| 0.486667|
+----+---------+---------+
END>
Training until now has taken 0 days 5 hours 27 minutes 47 seconds.
...
===== TRAINING 23-stage =====
<BEGIN
POS count : consumed   1000 : 1099
NEG count : acceptanceRatio    3000 : 1.7188e-07
Precalculation time: 25
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|        1|
+----+---------+---------+
|   5|        1|        1|
+----+---------+---------+
|   6|    0.998| 0.938333|
+----+---------+---------+
|   7|    0.997| 0.897667|
+----+---------+---------+
|   8|    0.997| 0.889667|
+----+---------+---------+
|   9|    0.996|    0.884|
+----+---------+---------+
|  10|    0.997| 0.805667|
+----+---------+---------+
|  11|    0.996| 0.831333|
+----+---------+---------+
|  12|    0.996| 0.730667|
+----+---------+---------+
|  13|    0.997|    0.764|
+----+---------+---------+
|  14|    0.996| 0.701333|
+----+---------+---------+
|  15|    0.996|    0.558|
+----+---------+---------+
|  16|    0.996| 0.631333|
+----+---------+---------+
|  17|    0.996| 0.491333|
+----+---------+---------+
END>
Training until now has taken 2 days 17 hours 45 minutes 31 seconds.
===== TRAINING 24-stage =====
<BEGIN
POS count : consumed   1000 : 1106
NEG count : acceptanceRatio    3000 : 8.37872e-08 ...
(more)
edit retag flag offensive close merge delete

Comments

looks like it did not reach average 0.5 FA, so it just stopped at stage 25 (as required by you)

this might be a hint, you've not enough or too simple data.

but don't throw anything away now ! there should be a temprary folder containing stage1.xml ... stage25.xml, and there's a way to make a final cascade from those (so at least you can test your current effort.)

berak gravatar imageberak ( 2019-10-01 04:19:54 -0600 )edit