4

I trained a computer vision classifier consisting of 2 components: a kernel PCA transformation of the data and a SVM binary classification model.

These models are trained in Python using SKlearn, but I'd like to use them for an actual computer vision task in c++ and later possibly Java. What's the best way to export my models to a different environment? Is there a smart way to do this or will I simply have to hand code all parameters in a new language?

1
  • Why not just train in c++ too? If the implementations are not the same, (which seem likely unless you are coding your entire algos from scratch), whats to say the parameters you export will be optimal or equivalent in your new model? As a first start, exporting to file and importing the file in c++ beats hand coding anything. Commented Jan 7, 2016 at 14:37

2 Answers 2

10

I'm working on a project called sklearn-porter which ports trained models to a low level programming language like C, Java and JavaScript. More classifiers and regressors will be added at given time. Have a look!

Sign up to request clarification or add additional context in comments.

1 Comment

This looks great! I will give it a try soon
-1

I would suggest to do the complete process directly in opencv, in c++ or java as you prefer.

Here you have an example of PCA and another of SVM.

1 Comment

Thanks! This is what I'll end up doing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.