Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unpredictable behaviour from cv::HOGDescriptor::detectMultiScale, depending on input.

Hi,

I am trying to implement a HOG SVM detector using my own training data and have had trouble getting it to work reliably. I am using OpenCV 2.4 in visual studio.

I am using the SVMlight library which generates a descriptor vector and a hit threshold for the HOGDescriptor object. I set the HOG object using this descriptor vector and run detectMultiscale using the hit threshold generated by SVMlight. What will happen is my program will stall on this function indefinitely. However if I change the descriptor vector to the default people detector provided by OpenCV then I begin to get detections again.

The default people descriptor vector is 1981 values in length with hit threshold 0. My SVMlight trained descriptor vector is 3781 values in length with hit threshold -0.6566.

If I change the hit threshold to from -0.6566 to zero, I also start to get detections, although they are often false positives since this is the incorrect threshold.

Another issue I have is if I try to set a custom window size (48x48) for example, I get an assertion error: checkDetectorSize() with no more feedback to help me understand the problem.

My question is, does anyone know what I could do to work around these problems? Could it be SVMlight? Is there another SVM library I can use to train the detector? Are these bugs inherent to the HOG class in OpenCV 2.4?

Thanks for the help, I can provide more detailed information if required.