Reputation: 94
First I have tried the default people detector in the OpenCV library.
HOGDescriptor hog;
hog.setSVMDetector(HOGDescriptor::getDefaultPeopleDetector());
hog.detectMultiScale(img, found, 0, Size(8,8), Size(0,0), 1.05, 2);
Although it returns positive matches in a indoor environment with a webcam, they are very rare. So I trained the descriptor with INRIA dataset's negative and positive images but this time the false positives are far too many. I am not trying to lower false matches to zero, it would be enough to lower them to a reasonable level. What should I do?
Another issue is that I think the people in my sample videos are too far away to be easily distinguishable as human images. I have tried reducing the cell size but am not sure this is the right approach. What can be done about this?
Images would be helpful to you but due to reputation I can't post them.
Thanks
Upvotes: 3
Views: 4134
Reputation:
Check the opencv [doc]: http://docs.opencv.org/modules/gpu/doc/object_detection.html#gpu-hogdescriptor-detectmultiscale it seems your not using the interface correctly.
Did you do an evaluation of your trained SVM and observed a bad detection rate there as well? If yes you need to play a bit with the training parameters or input data. As far as I remember the INRIA set included people and non-people images but only the positive patches where exactly defined. When I trained a hog classifier the selection of negative samples had a lot of influence. Oh and did you use boosting? IIRC boosting provided a large performance gain in the original paper.
Upvotes: 0