Weka Model to OpenCV Compatible SVM Model

asked 2014-08-29 04:22:19 -0600

Since OpenCV's implementation of SVM is based on LibSVM, I was wondering if the model produced by Weka can somehow be imported by CvSVM. After checking the documentation, CvSVM has a 'load' method. However, it only accepts XML based files. If I were to export a model from Weka in XML, would it be compatible if ever with OpenCV? Has anyone done this sort of thing before?

Just a little background: I'm creating an Android application that will use OpenCV's CvSVM. I already have the SVM model trained in Weka.

edit retag flag offensive close merge delete



"If I were to export a model from Weka in XML, would it be compatible ?" - very unlikely. opencv's filestorage is using xml, but can't read arbitrary files.

either try to tweak it manually (not much hope, but see example) or try to retrain using opencv (preferably on a pc, not your phone)

berak gravatar imageberak ( 2014-08-29 04:35:03 -0600 )edit

I see. That is disappointing. I know that this would be a different topic, but do you know if OpenCV can process a CSV file containing my training set? That would shorten my development time.

joshua_jorel_lee gravatar imagejoshua_jorel_lee ( 2014-08-29 04:51:37 -0600 )edit

there is this thing , but i never tried it, also, does not seem to be wrapped to java.

berak gravatar imageberak ( 2014-08-29 05:17:15 -0600 )edit