CvSVM questions
Some questions of using the opencv CvSVM
What kind of svm is it using? Is it using svmligh开发者_如何转开发t? OpenCV2.2 has svmlight, but I cannot find much references to it.
If I am using CvSVM, do I need to manually create say 80% training data, and 20% testing data, and iterate on a 5-fold re-validation to get better output?
I am doing a detector using HOG, and I am following closely to the opencv sample pedestrian detector in the package. I need to learn a classifier to detect other objects other than pedestrians. Any suggestions will be appreciated.
Thanks!
I'm pretty sure OpenCV 2.1 and 2.2 use libsvm. Look at openCV's documentation. And libSVM is very well documented
Yes, you need to create your training and test data. However, CvSVM automatically do the crossvalidation on your training data, no need to do split yourself the training set. In the function
train_auto
, look at the default parameterint k_fold = 10,
HOG is a pretty decent detector for any object that has a rigid structure. Just download any database, and run your HOG stuff. You can find lots of databases here. Or, for simplicity, go to Caltech 101, a nice one with 101 classes. And if it's not enough, they've made Caltech 256 =)
Edit : If you said you wanted to do something different from HOG, I suggest you work on local patches, such as SIFT or SURF, which are both in OpenCV (Link to OpenCV's features2d
精彩评论