Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mfpierre/coreml-scikit-example
Apple CoreML example with scikit-learn
https://github.com/mfpierre/coreml-scikit-example
apple-coreml coreml scikit-learn
Last synced: 3 months ago
JSON representation
Apple CoreML example with scikit-learn
- Host: GitHub
- URL: https://github.com/mfpierre/coreml-scikit-example
- Owner: mfpierre
- License: mit
- Created: 2017-06-05T20:58:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T21:30:26.000Z (over 7 years ago)
- Last Synced: 2024-04-27T23:57:40.133Z (6 months ago)
- Topics: apple-coreml, coreml, scikit-learn
- Language: Python
- Size: 3.91 KB
- Stars: 22
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coreml-scikit-example
Apple CoreML example with scikit-learn.
This is a simple example on how to export a Scikit-Learn model (logistic regression in this case) to the CoreML file, load it back and make predictions on it
On this really simple example it seems Apple's format is a bit lighter than a regular pickle:
```
677B iris.mlmodel
917B iris.pkl
```## Usage
It seeems that the [coreml package](https://pypi.python.org/pypi/coremltools) only supports Python 2.7 for now
I recommend using a virtual env before installing pip requirements
```shell
pip install -r requirements.txt
python main.py
```## Disclaimer
The code should be a working example but it's not fully tested as prediction on CoreML models can only be done on macOS 10.13
The code should raise the following exception `Exception: Model prediction is only supported on macOS version 10.13`