Machine Learning Projects for Mobile Applications
上QQ阅读APP看书,第一时间看更新

Core ML model conversion

To run your first application on iOS, you don't need to start building your own model. You can use any one of the best existing models. If you have a model that is created using another third-party framework, you can use the Core ML Tools Python package, or third-party packages such as MXNet converter or TensorFlow converter. The links to access these tools are given next. If your model doesn't support any of these converters, you can also write your own converter. 

Core ML Tools Python package can be downloaded from:  https://pypi.org/project/coremltools/
TensorFlow converter can be accessed through the link : https://github.com/tf-coreml/tf-coreml
MXNet converter can be downloaded from: https://github.com/apache/incubator-mxnet/tree/master/tools/coreml

The Core ML Tools Python package supports conversion from Caffe v1, Keras 1.2.2+, scikit-learn 0.18, XGBoost 0.6, and LIBSVM 3.22 frameworks. This covers models of SVM, tree ensembles, neural networks, generalized linear models, feature engineering, and pipeline models.

You can install Core ML tools through pip:

pip install -U coremltools