Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. I trained a classifier using matlab - I'm afraid this is not the place to ask then, but...
    1. Dimensions of positive and negative images is roughly around 800x1200 - that's a lot. You're forcing you're detection window to be of such size, so your test images should be much larger than that (yo apply a proper multiscale sliding window). Do you really need such resolution?
    2. You're using 40 stages, and with a false alarm rate = 0.1, I bet every stage has a quasi-infinite number of features to test. Given that, and that you're using Matlab, well, I'm not too surprised of it being so slow.
    3. You should take a look at other informative posts in the forum from @StevenPuttemans with helpful advice, as the pos:neg sample ratio
  1. I trained a classifier using matlab - I'm afraid this is not the place to ask then, but...
      but...
    1. Dimensions of positive and negative images is roughly around 800x1200 - that's a lot. You're forcing you're detection window to be of such size, so your test images should be much larger than that (yo apply a proper multiscale sliding window). Do you really need such resolution?
    2. You're using 40 stages, and with a false alarm rate = 0.1, I bet every stage has a quasi-infinite number of features to test. Given that, and that you're using Matlab, well, I'm not too surprised of it being so slow.
    3. You should take a look at other informative posts in the forum from @StevenPuttemans with helpful advice, as the pos:neg sample ratio
  1. I trained a classifier using matlab - I'm afraid this is not the place to ask then, but...
  2. Dimensions of positive and negative images is roughly around 800x1200 - that's a lot. You're forcing you're detection window to be of such size, so your test images should be much larger than that (yo apply a proper multiscale sliding window). Do you really need such resolution?
  3. You're using 40 stages, and with a false alarm rate = 0.1, I bet every stage has a quasi-infinite number of features to test. Given that, and that you're using Matlab, well, I'm not too surprised of it being so slow.
  4. You should take a look at other informative posts in the forum from @StevenPuttemans with helpful advice, as the pos:neg sample ratio

Extra information added by @StevenPuttemans

  1. Like @LorenaGdL states, if you trained your model using matlab, you are at the wrong address here. You will need to ask help on it on the Matlab central then. We cannot guarantee that models trained by the matlab interface are 100% compatible with current OpenCV implementation.
  2. Can you supply your training parameters? Without it is kind of useless for us to start digging. Please edit the question and provide the full command given and the output generated before stage 0 by the training tool.
  3. As said, weak classifiers should perform just better than random guessing on the negatives, so with a false alarm rate slightly lower than 0.5. Using 0.1 defeats the purpose of cascade classifiers. Your stages will be so complex that thousand of features will need to be evaluated for each window given to the classifier. This will result in huge processing times.
  4. I am guessing you are giving wrong values to -w and -h so please again, provide more info.
  5. Your ration positives to negatives is weird. You will always have more negative cases then positives, so try using a ration of 1:2 1:5 or even 1:10.
  1. I trained a classifier using matlab - I'm afraid this is not the place to ask then, but...
  2. Dimensions of positive and negative images is roughly around 800x1200 - that's a lot. You're forcing you're detection window to be of such size, so your test images should be much larger than that (yo apply a proper multiscale sliding window). Do you really need such resolution?
  3. You're using 40 stages, and with a false alarm rate = 0.1, I bet every stage has a quasi-infinite number of features to test. Given that, and that you're using Matlab, well, I'm not too surprised of it being so slow.
  4. You should take a look at other informative posts in the forum from @StevenPuttemans with helpful advice, as the pos:neg sample ratio

Extra information added by @StevenPuttemans

  1. Like @LorenaGdL states, if you trained your model using matlab, you are at the wrong address here. You will need to ask help on it on the Matlab central then. We cannot guarantee that models trained by the matlab interface are 100% compatible with current OpenCV implementation.
  2. Can you supply your training parameters? Without it is kind of useless for us to start digging. Please edit the question and provide the full command given and the output generated before stage 0 by the training tool.
  3. As said, weak classifiers should perform just better than random guessing on the negatives, so with a false alarm rate slightly lower than 0.5. Using 0.1 defeats the purpose of cascade classifiers. Your stages will be so complex that thousand of features will need to be evaluated for each window given to the classifier. This will result in huge processing times.
  4. I am guessing you are giving wrong values to -w and -h so please again, provide more info.
  5. Your ration positives to negatives is weird. You will always have more negative cases then positives, so try using a ration of 1:2 1:5 or even 1:10.

Also, if you are inexperienced in this field, I suggest reading chapter 5 of OpenCV 3 Blueprints, which discusses each parameter and it possible influence in great detail.