Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if that is opencv3.1 (it won't work with 3.0), you should have a SVM_load() function, which creates a new SVM from a pretrained model like this:

 svm = cv2.ml.SVM_load("mymodel.xml")

you can check in the repl:

>>> help(cv2.ml.SVM_load)
Help on built-in function SVM_load:

SVM_load(...)
    SVM_load(filepath) -> retval