trainHOG icon indicating copy to clipboard operation
trainHOG copied to clipboard

Not detecting humans clearly

Open ganeshchandras opened this issue 10 years ago • 9 comments

I have been trying to use your code to train an hog from the images from INIRIA database as you have suggested. For the training set i resized the images to 64x128 as it was required and these images were used to train the svm. i have used about 500 positive images and 700 negative images to train. But it is not identifying humans clearly. The output can be seen in the attachments. I request you to help me figure out what the problem might be. The code is exactly the same as it is in your github folder screenshot from 2015-02-25 16 36 21

ganeshchandras avatar Feb 25 '15 11:02 ganeshchandras

I have this problem too. I used mogrify from ImageMagick to crop the negative files from the INRIA person dataset to 64x128. The center regions were chosen using the -gravity Center option. This was done on the pos files too since they were originally 96x160. Other than that, I followed the directions in the tutorial. My output is similar to ganeshchandras's now.

jkutchka avatar Mar 16 '15 17:03 jkutchka

I wrote a script to segment the negative image files into 64x128 images. Now there are ~8500 negative image files. I ran trainhog with this dataset and now there aren't as many green rectangles, but it fails to detect me in the picture. :(

jkutchka avatar Mar 17 '15 22:03 jkutchka

I tried downgrading to OpenCV 2.3.1. Still not working.

jkutchka avatar Mar 28 '15 01:03 jkutchka

Is somebody find a solution for this problem as i am having the same problem with INIRIA dataset

tarunkumar2012 avatar Apr 12 '15 07:04 tarunkumar2012

Same problem, has anybody figured it out ?

ghost avatar Nov 24 '15 09:11 ghost

Maybe the trainHOG code is missing a normalisation step (which I assumed the openCV HOG feature calculation already does) when calculating features, as mentioned in the original paper by Dalal and Triggs, explaining the observed results. I will look at this bug when I have some time, and will try to reconstruct the original INRIA dataset training.

DaHoC avatar Jan 13 '16 09:01 DaHoC

I have the same problem with multiple false positive. I iterate through the images in the INRIAPerson\Test\pos folder and call the detectTest function.

I have tried multiple combinations of scale or crop with the images in the train_64x128_H96 folder, but no luck.

My console output is:

Testing training phase using training set as test set (just to check if training is ok - no detection quality conclusion with this!) Results: True Positives: 2393 True Negatives: 1174 False Positives: 44 False Negatives: 23

Is this due to something with the dataset not being the same as the original?

Have anybody ever been able to run this code with a good result, using images not from the learning set?

davidguld avatar Jul 10 '16 15:07 davidguld

I'm having the same problem, has somebody a solution for this problem? @DaHoC

fsapiains avatar Sep 27 '16 03:09 fsapiains

has anyone found the solution for this problem? facing same problem with inria dataset

swetapanigrahi avatar Nov 16 '18 08:11 swetapanigrahi