1

I followed this tutorial to generate the xml classifier file, http://abhishek4273.com/2014/03/16/traincascade-and-car-detection-using-opencv/ But I have many questions to clarify.

  1. for the cars.info(face.info), it's the exact position for positive cars yes? http://docs.opencv.org/2.4/doc/user_guide/ug_traincascade.html This opencv official tutorial says the format is like this:

    img1.jpg 1 140 100 45 45 img2.jpg 2 100 200 50 50 50 30 25 25 It seems 140 100 is the coordinate of the left top corner. and 45 45 is the width and height of the car, right? In this situation, if my train data is from http://host.robots.ox.ac.uk/pascal/VOC/ One example xml file for one picture is like this:

    <bndbox>
        <xmin>158</xmin>
        <ymin>199</ymin>
        <xmax>231</xmax>
        <ymax>240</ymax>
    </bndbox>
    <difficult>0</difficult>
    

Could I safetly put 158 199 73 41 into the cars.info, or there is risk of mismatch of the coordinate system?

  1. There are many false positives, any suggestion how to change the parameter of this command line?

    opencv_traincascade -data data -vec cars.vec -bg bg.txt -numStages 10 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -numPos 500 -numNeg 500 -w 48 -h 24 With many thanks~~

I could definitely decrease the maxfalsealarm value, but is that truly help? It costs a long to train, that's why i am asking, sorry

printemp
  • 869
  • 1
  • 10
  • 33

1 Answers1

0

Ok, after tried to train 2 classifiers which cost more than 48 hours, I would like to say the first info question the result is right, for the second one, if want to decrease false positive, then decrease the maxflasealarm parameter is fine, but it cost more time to train also.

printemp
  • 869
  • 1
  • 10
  • 33