I am trying to classify road signs. For this reason I want to train Hog descriptors with the use of SVMs. I have extracted the hog descriptors for training data with dimensions 64x64. The positive training data are 60% and the negative 40% of the whole sample.
When I am traing using SVM of opencv (with a linear kernel) evereything seems fine, but when I am trying to predict, the results fail and show only one class (the result is always 1). I have tried to feed my data into SVMlight as well, and all the negatives are missclassified.
Any ideas what could be possible wrong? Maybe the small number of training data? (I am just trying to implement the code and see that everything is fine without using a the training data).
Asked
Active
Viewed 306 times
1
-
Did you select SVM parameters by cross validation or just used the defaults? – guneykayim Oct 01 '13 at 07:28
-
I have used the default values! I suppose that I have only to tune C and not gamma as I am using a linear kernel. – katerina Oct 01 '13 at 08:31
-
Yes, that's true.. You should have a code of line like this `SVM.train_auto(trainingDataMat, labelsMat, Mat(), Mat(), params,5);` which does cross validation and tunes the parameter for you. I hope this is helpful. – guneykayim Oct 01 '13 at 17:24
-
Yes it was useful because as I have read cross-validation is an important step. However, the problem still exists :( In any case, thank you veru much!! – katerina Oct 01 '13 at 18:01