SVM.load() module in python opencv3

asked 2015-08-20 04:41:08 -0600

miczyg gravatar image

Hi!

Recently I've tried to rewrite my code from opecv2 to opecv3 and realized, that in opencv3 the SVM.load() module has gone. In my case I setup svn by:

svm = cv2.ml.SVM_create()

then I set params, train my svm and save trained svm to file by:

svm.save('file.dat')

So the question is, how to load trained SVM from file, which was saved before as above? I can't find any info, also in python docs there's no any method for loading it...

Thank for any response ;)

edit retag flag offensive close merge delete

Comments

unfortunately it's a bug. none of the (python or java) ml class can load() anything atm.

berak gravatar imageberak ( 2015-08-20 04:43:01 -0600 )edit

Bummer. That is exactly the issue I am having. There is no .load() method at all.

Has anyone decided to switch to a SciPy SVM instead? Any tricks to going back and forth with the data / input / output?

It took me a lot of effort to get xfeatures2d working on my Windows machine, but I was so proud when I was able to create a model and save it. Then I was crushed to find out that all of that was for naught as I can't load it again.

Ujustwaite gravatar imageUjustwaite ( 2015-09-28 14:09:57 -0600 )edit