Reputation: 1091
I have been working on training pedestrian detection classifier based on HOG features. Presently I have done the followings:
a) Extracted HOG features of all files i.e. Positive and Negative and saved those features with label i.e. +1 for positive and -1 for negative in file.
b)downloaded svmlight, extracted binaries i.e. svm_learn, svm_classify.
c) passed the "training file" (features file) to svm_learn binary which produced a model file for me.
d) passed "test file" to svm_classify binary and got result in predictions file.
Now my question is that "What to do next and how?". i think i know that now i need to use that "model file" and not "predictions file" in openCV for detection of pedestrian in video but somewhere i read that openCV uses only 1 support vector but i got 295 SV, so how do i convert it into one proper format and use it and any further compulsory steps if any.
I do appreciate your kindness!
Upvotes: 0
Views: 1115
Reputation: 11941
It is not true that OpenCV (presumably you are talking about CvSVM) uses only one support vector. As pointed out by QED, what OpenCV does do is to optimize a linear SVM down to one support vector. I think the idea here is that the support vectors define the classification margin, but to do the actual classification only the separating hyperplane is needed and that can be defined with one vector.
Since you have a svmlight model file, and CvSVM can't read that, you have the following options:
For ideas on how to convert the support vectors so you can use them with the HOG detector see Training custom SVM to use with HOGDescriptor in OpenCV
Upvotes: 2