SVM doesn't give a Class as a result

asked 2016-05-26 04:06:03 -0600

aee gravatar image

updated 2016-05-26 04:54:04 -0600

berak gravatar image

Hi again, I am having some problems with SVM classifier. I want to classify "histograms" of Bag of words, ORB feature descriptors. I define the SVM type as follow:

svm = SVM.create (); svm.setType (SVM.C_SVC); svm.setKernel (SVM.POLY); //svm.setTermCriteria(newTermCriteria(TermCriteria.MAX_ITER,100,1e-6)); svm.setTermCriteria (new TermCriteria (TermCriteria.EPS, 100, 1e-6));

The problem is that when I do the classification I don't get any class label. The output are as if I were doing regression whereas I am trying to do classification.

Thanks!

edit retag flag offensive close merge delete

Comments

1
  • which opencv version is it ?
  • this can't ever be your real code
  • how do you get your BOW ?
  • what kind of "responses" do you use for training ?
berak gravatar imageberak ( 2016-05-26 04:25:01 -0600 )edit

-It is an OpenCV plugin for Unity. A clone of OpenCV3.1 Java bindings.

  • I get the BoW clustering the ORB descriptors of a set of training images. After that, I train the SVM classifier with the histogram of BoWs of the training images.
  • What do you mean with what kind of "responses" do I use for training?
aee gravatar imageaee ( 2016-05-26 04:30:44 -0600 )edit
1
  • again, ORB features are binary, how do you cluster those ? (you can't use kmeans or such)

  • you need integer labels for a classificationwith SVM.

berak gravatar imageberak ( 2016-05-26 04:55:33 -0600 )edit