TAGS :Viewed: 6 - Published at: a few seconds ago

[ How do I train images for HoG, for images which are larger than 64 x 128 pixels? ]

I'm writing my own HoG for future modification purposes, and experimenting with different approaches. But I stumbled upon this question / issue.

I have downloaded dataset from INRIA, and there are images which are in 320 x 240. While the default training window size for HoG is 64 x 128. How should I go around this ?

For the positive images, they are around 96 x 160 pixels, and what I did is to resize them down to 64 x 128. But for larger images, do I resize them, use a sliding window which moves pixel by pixel, or do I calculate features for 64 x 128 patches in that large image ?

Answer 1


The answer to this depends entirely on your application area and what you know about these images. I haven't played with INRIA before, but....

1) Are the objects you're trying to find all about the same size, and in the same location in all the images? Then a fixed size, fixed location set of 64x128 is probably OK.

2) Are the objects you're trying to find all about the same size just in different positions in the various images? Then sliding windows might work.

3) Do you expect the objects to change size and fill up different percents of the total image? Then you need to do something that alleviates the scale and location variations, using image pyramids or other scale-invariant techniques (you can back-of-the-envelope this by resizing the image to a few intermediate sizes and running sliding window-versions on each).

Also, is this for training the classifier? If so, you need a way to label the appropriate scale and location, and/or solve the multiple instance learning problem. If you just want to run, you need a way to make declarations and score yourself...

Lot's of fun things!