3

I'm going to train cascading boosted classifiers (using either OpenCV or Matlab) for detection of certain objects.

My question is that for a window detection size of 60x60, what's a reasonable resolution for training image samples, given that I don't have an unlimited time within which to train classifiers? Some of the images I've been given are 1200x600 and I'm quite certain this is unnecessarily large and that I must certain scale them down. I know that the testing datasets may have images or videos that big but the objects to detect within them are certainly not likely to be that big.

Dima
  • 38,860
  • 14
  • 75
  • 115
user961627
  • 12,379
  • 42
  • 136
  • 210

1 Answers1

2

The answer is "It depends". If your window size is 60x60, then that is the minimum size that you will be able to detect. So the resolution of your images should be high enough so that all your object of interest have the size of at least 60x60.

Also, if training time is a concern, then you should think about what features you are going to use. For example, training with Haar-like features takes much longer than with HoG or LBP.

Both the OpenCV program opencv_traincascade and the MATLAB function trainCascadeObjectDetector (in the Computer Vision System Toolbox) give you a choice of Haar, HoG, and LBP features.

Dima
  • 38,860
  • 14
  • 75
  • 115
  • Thanks! But given that my target object dimensions range from 400x400 to 60x60, certainly 1200x600 is "unnecessary", no? I didn't realize the difference in choosing features.. Are HoG features supported by OpenCV? – user961627 Nov 11 '13 at 16:06
  • 1
    About the 400 to 60 size range, sounds right. But you have to try it. :) Can your object have a size of 60x60 in a 1200x600 image? In that case, if you downsample by a factor of 2, your object becomes 30x30 and not detectable. – Dima Nov 11 '13 at 16:11
  • I have a follow-up question related to the training samples - http://stackoverflow.com/questions/19921820/about-image-backgrounds-while-preparing-training-dataset-for-cascaded-classifier – user961627 Nov 12 '13 at 09:25
  • "If your window size is 60x60, then that is the minimum size that you will be able to detect" Unless you upsample the image at runtime! – autonomy Jun 10 '16 at 13:17