How to apply my own classifier when using HOG features?

asked 2014-05-20 22:09:00 -0600

xmbit gravatar image

updated 2014-05-20 22:13:37 -0600

In the pedestrian detection demo "pedestriandetection.cpp", HOG features and SVM linear classifier are used ,just like Dalal and Triggs's method. But I find it is too slow. On my Intel i3 processor and 6GB RAM computer, it takes 2.5s to detect pedestrians int a picture with 640x480 pixels.

I guess it can be faster if I use a cascade classifier. But it seems that the class HOGDescriptor in OpenCV treats SVM as one of its member functions, which makes it difficult to apply other classifier when using HOG in OpenCV.

Is there anyone who has the experience/knowledge using hog with other classifier? And how to?

edit retag flag offensive close merge delete

Comments

it's probably not the svm, that makes it slow, but gathering the hog features before.

2.5s sounds really slow. even on a much leaner box here it takes less. don't run it in debug mode.

using backgroundseparation before, and only applying it to cropped foreground regions will speed it up significantly.

3.0 also has softcascades, which are slightly less accurate, but tons faster.

berak gravatar imageberak ( 2014-05-21 02:13:05 -0600 )edit

Thanks for your help! I know backgroundseparation can refine the ROI for pedestrian detection. But I guess if it works in my algorithm,which would be applied in a moving car.And you know, the car is running on the road and the background changes fast. I want to combine object detection and tracking together. With Kalman filter, I can track simple pedestrian. However, I have no idea how to track multi objects. Thank for your help again!

xmbit gravatar imagexmbit ( 2014-05-22 03:10:45 -0600 )edit