Ask Your Question

jompa234's profile - activity

2015-03-11 20:45:31 -0600 received badge  Notable Question (source)
2014-03-31 01:47:40 -0600 received badge  Popular Question (source)
2013-03-12 08:51:27 -0600 commented answer Custom HOGDetector using CvSVM and HOG features.

Actually what I want to do is to train the detector to find people in wheelchairs in city streets. I know this is not a simple task, but wouldn't it be similar to detecting pedestrians in city streets? For example replacing the training data from http://pascal.inrialpes.fr/data/human/ with pictures of people in wheelchairs instead of walking pedestrians. Do you think this sounds like a feasible idea?

2013-03-12 07:06:32 -0600 received badge  Scholar (source)
2013-03-12 07:06:30 -0600 received badge  Supporter (source)
2013-03-12 07:05:16 -0600 commented answer Custom HOGDetector using CvSVM and HOG features.

Actually, I tried training again with a lot of training images from a fixed environment. ( Just a table next to a black wall, with and without a cup on it). Now the HOGDetector.detectMultiScale is able to detect the cup very precisely! So I guess it was just my trainingdata / parameters that was badly tuned. I guess I have to be more careful when choosing training images and be patient when tuning my parameters. I am not sure what resource folder you are talking about so I have not cross referenced my parameters towards the pedestrian detector as I am not able to find anything. Thanks for your reply Steven.

2013-03-12 06:30:38 -0600 received badge  Student (source)
2013-03-12 04:35:26 -0600 received badge  Editor (source)
2013-03-11 08:50:42 -0600 asked a question Custom HOGDetector using CvSVM and HOG features.

I'm trying to train my own detector for use with OpenCV::HOGDescriptor but I'm having trouble making the existing HOGDescriptor work with my newly trained SVM.

I have calculated HOG features for positive and negative training images, labeled them and trained the SVM using CvSVM. The parameters I have used are:

CvSVMParams params;
params.svm_type =CvSVM::EPS_SVR;
params.kernel_type = CvSVM::LINEAR;
params.C = 0.01;
params.p = 0.5;

Then I calculate Primal Form of the support vectors so that I only get one vector instead of many and set the calculated support vector using HOGDescriptor.setSVMDetector(vector);

This is primal form.

When I use CvSVM.predict() I am able to correctly classify objects with the SVM with high accuracy, but HOGDescriptor.detect() or detectMultiScale() always returns a lot of positive matches and does not give accurate predictions.

Here is my code for flattening the vector.

My trained svm model file

I am not able to find much information about how to make the trained svm model work with HOGDescriptor. CvSVM.predict() uses the original trained support vectors for classification so there might be something wrong with the way I'm calculating primal form to feed into HOGDescriptor.setSVMDetector(). Have anyone tried something similar and can point me in the right direction?

2013-03-11 08:46:31 -0600 commented question Many CvSVM vectors into one... how?

I am trying to do this myself. I am not able to get it working though. I calculated the Primal Form of the support vectors from the trained model generated from CvSVM. http://en.wikipedia.org/wiki/Support_vector_machine#Primal_form

First I multiplied all coeffesients in each support vector with the alpha belonging to the support vector. Then I summarized each coeffesient of each vector together so that I got one long vector instead of many long vectors.