DaHoC / trainHOG

Example program showing how to train your custom HOG detector using openCV
221 stars 111 forks source link

Not detecting humans clearly #6

Open ganeshchandras opened 9 years ago

ganeshchandras commented 9 years ago

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

jkutchka commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

I tried downgrading to OpenCV 2.3.1. Still not working.

tarunkumar2012 commented 9 years ago

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

ghost commented 8 years ago

Same problem, has anybody figured it out ?

DaHoC commented 8 years ago

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.

davidguld commented 8 years ago

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?

fsapiains commented 7 years ago

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

swetapanigrahi commented 5 years ago

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