I'm going to train a HOG detector for detect objects (pedestrian head) with SVMLight library. But my question is not about implementation.

I'm wondering how to collect samples. I have to use some videos, and they have 1624x1234px dimension. The pedestrian heads have more or less 20x20px bounding-boxes.

Is the 20x20 pixels too small for a correct HOG feature extraction? Or is suitable for training? The, it has to be power of 2 so.. 36 pixels?

And what about the detection? Can I scale down the videos? As far as I know the detection is done on the training sample and then maybe scaled down. So if I train the detector with 20x20px I can detect objects of 20x20 as minimum, then if I scale down the image as half of the size I can detect object 40x40, but not 10x10 (I should scale up but the noise will be a problem).

And then, what about the computation time?

Any hint will be appreciated..


Ideally, your training size should be a multiple of the HOG cell size. So if your cell is 8x8 your training size should be 16x16 or 24x24. And no, you cannot detect objects that are smaller than your training size.


You should use elements which are a power of 2, for easy and faster computation. I'll say, start with 8x8, so you can only scale up. And if you have to look only at some portions of this image, then you can crop the original one.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.