I am trying to classify road signs which means i have classes and sub classes. For example i have a class for Speed sign limits and it includes sub classes (ex: 30 speed signs, 50 speed signs, 80 speed signs, etc...).
My problem what i am facing is how to proper model my system, i want to implement One vs All
technique.
I already have implemented One class SVM
as well as Multi class single SVM
so i am not asking about how to code.
Should the model by like smth this:
For Red Speed limit signs
super class i intialize one SVM and train it with more than one label that represents sub classes as a positives
and put all the remaining data set as a negatives
.
Then i intialize/create another instance of another SVM to represent another super class for an example lets say Blue Speed limit signs class
, and so on?
In pseudo code would look like:
CvSVM svmClassONE = new CvSVM()
svmClassONE.train(redSigns,label(1,2,3,4),pos)
svmClassONE.train(!redSigns,label(0),neg)
CvSVM svmClassTWO = new CvSVM()
svmClassTWO.train(blueSigns,label(1,2,3,4),pos)
svmClassTWO.train(!blueSigns,label(0),neg)
Is that a proper way ? is it okay to create multiple instance of SVM's ?
I am using Java OpenCV btw Thanks