train cascade - recommendation on better training

asked 2014-04-14 08:24:53 -0600

Yakov gravatar image

Hi,

i am training my own classifier of swivel chairs. But i need some recommendation with training parameters to make it more accurate because i am new with training and would like to hear your recommendation. I have 200 positive images and 500 negative images (both are 300x300). I have used the Naotoshi Seo Pearl script to create samples:

perl bin/createsamples.pl positives.txt negatives.txt samples 1500\
"opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1\
-maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 80"

Here i am not sure about the -w and -h. Would you create smaller samples?

And for training used this parameters:

opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20 
-minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000 -numNeg 500 -w 80 -h 80 -mode ALL 
-precalcValBufSize 1024 -precalcIdxBufSize 1024 -featureType LBP

It is still training and on the stage 15 i am getting this numbers:

===== TRAINING 15-stage =====
<BEGIN
POS count : consumed   1000 : 1000
NEG count : acceptanceRatio    500 : 0.00114124
Precalculation time: 48
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|     0.86|
+----+---------+---------+
|   5|        1|    0.716|
+----+---------+---------+
|   6|        1|    0.528|
+----+---------+---------+
|   7|        1|    0.346|
+----+---------+---------+
END>

I would gladly hear some others opinions on this training so i can learn from experienced people. Thank you very much for any responses.

edit retag flag offensive close merge delete

Comments

I suppose -w and -h should be proportional to the size of the object you are trying to recognize. If both width and height of the chair are similar, then you can stay with 80-80. Other question, to make the cascade more accurate add more positives and negatives(various backgrounds) if possible.

mada gravatar imagemada ( 2014-05-13 01:33:53 -0600 )edit