Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling scikit-learn functions from C++

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.

like image 971
The Nomadic Coder Avatar asked Dec 15 '22 14:12

The Nomadic Coder


1 Answers

Have you looked at native C++ libraries like shogun and mlpack? These might be much easier for you to use.

like image 81
Andreas Mueller Avatar answered Feb 15 '23 22:02

Andreas Mueller