Issue
Is there way to call scikit-learn's functions from c++? I have the rest of most my code in C++ with opencv. I would like to be able use the classifiers scikit-learn provides. As far as I understand, there's no easy way - I need to use boost::python or swig. I also came across this project (https://github.com/spillai/numpy-opencv-converter) which shows interop between numpy arrays <==> cv::Mat objects, but I know only how to use to call C++ code from my python script, not the other way around.
Solution
Following up from the original answer, There seem to be two approaches today to solve the problem
- A mechanism to wrap python into C++ and call it: A modern approach to do this is with PyBind11
- Use native C++ ML libraries - MLPack seems to be the gold standard, and OpenCV for vision based ML.
Answered By - The Nomadic Coder
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.