Ask Your Question
1

More questions on feeding HoG features to CvSVM

asked 2012-08-13 04:42:38 -0600

sub_o gravatar image

I've managed to extract HoG features from positive and negative images (from INRIA's person dataset ) using OpenCV's HOGDescriptor::compute function.

I've also managed to pack the data correctly and feed it into CvSVM for training purposes.

I have several questions:

  • While extracting features, I used positive images with dimension of 96 x 128, while the negative images are on average 320 x 240. I have been using window size of 64 x 128 for HoG extraction, should I use other window size ?

  • The size of extracted features for positive images are around 28800 features, while the negative ones are around 500000+. I have been truncating the features from negative ones to 28800, I think this is wrong, since I believe I'm losing too much information when feeding these features to SVM. How should I go and tackle this ? (It seems like I can only feed the same sample size for negative and positive features)

  • While doing prediction on images bigger than 64 x 128 (or 96 x 160), should I use a sliding window to do prediction ? Since large negative images still gives me more than 500000 features, but I can't feed it into SVM due to sample size.

Thanks a lot in advance !

edit retag flag offensive close merge delete

Comments

Please post your sample code...

yes123 gravatar imageyes123 ( 2012-08-13 04:44:26 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-24 09:10:06 -0600

Micka gravatar image

I'm currently working with HoG and SVM too and found this turorial: http://opencv.willowgarage.com/wiki/trainHOG

It uses external SVM (SVM light) for training and loads the trained vector back to openCV HoG detector.

As far as I understand, you would have to subsample the INRIA images, so take the center pixels (64 x 128) of the positive sample images and use like 10 subimages (64 x 128) from each negative sample image.

After training you might want to detect (multiscale) in each negative sample image and add all detected persons to the negative sample list (scale to 64 x 128 if necessary) and re-train (since there are in fact no persons in the negative sample images)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-08-13 04:42:38 -0600

Seen: 1,130 times

Last updated: Apr 24 '13