Converts Machine Learning models to ONNX
Project description
Introduction
ONNXMLTools enables you to convert models from different machine learning toolkits into ONNX. Currently the following toolkits are supported:
Apple CoreML
scikit-learn (subset of models convertible to ONNX)
Install
pip install onnxmltools
Dependancies
scikit-learn is needed to convert a scikit-learn model, coremltools for Apple CoreML.
Example
Here is a simple example to convert a CoreML model:
import onnxmltools import coremltools model_coreml = coremltools.utils.load_spec("image_recognition.mlmodel") model_onnx = onnxmltools.convert.convert_coreml(model_coreml, "Image_Reco") # Save as text onnxmltools.utils.save_text(model_onnx, "image_recognition.json") # Save as protobuf onnxmltools.utils.save_model(model_onnx, "image_recognition.onnx")
License
MIT License
Acknowledgments
The initial version of this package was developed by the following developers and data scientists at Microsoft during winter 2017: Zeeshan Ahmed, Wei-Sheng Chin, Aidan Crook, Xavier Dupre, Costin Eseanu, Tom Finley, Lixin Gong, Scott Inglis, Pei Jiang, Ivan Matantsev, Prabhat Roy, M. Zeeshan Siddiqui, Shouheng Yi, Shauheen Zahirazami, Yiwen Zhu.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file onnxmltools-1.0.0.0.tar.gz
.
File metadata
- Download URL: onnxmltools-1.0.0.0.tar.gz
- Upload date:
- Size: 97.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f5195abf157379673a4bada899770969f34c2491c4e8c34ae19fe2d74a6a6f |
|
MD5 | 3923695fcf707629752f7f982441fd3a |
|
BLAKE2b-256 | a9b2f9dab85f34bc4e48208e1523bf07cee8391ef2cae9cd5c618c50ef146e72 |
File details
Details for the file onnxmltools-1.0.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: onnxmltools-1.0.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 154.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cc8ac6b3cf2e5f71919d4c5c56e4b407b3108627345f593496c46677a1f70c2 |
|
MD5 | 98c46386d617ae0708bae6e01e732d7d |
|
BLAKE2b-256 | 434f021c682822f4c3865244fc329825e57fe497c7abe00585454550e54844f3 |