Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It just depends on what you actually want: Do you want to detect if there is a flower in the image or not, then you need one SVM which you feed with flower and non-flower-descriptors.

Otherwise you'll need to train multiple SVMs, since an SVM is not able to deal with multi-class problems. Basically there exist two strategies:

  • 1-vs-1, i.e. each class is trained against each other class resulting in (n_class * (n_class - 1) / 2) models.
  • Alternatively you can use a different strategy called 1-vs-rest, where you train n_class SVMs, each class against all the remaining classes.

I don't know which or if one of these versions is integrated at all in OpenCV's SVM implementation (maybe s.o. else can comment on this).

Personally, I am not a big fan of the ML-part of OpenCV (e.g. OpenCV's SVM is based on an old libSVM version), thus I use here Python's scikit-learn module and / or WEKA.