Skip to content

mfpierre/coreml-scikit-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 only supports Python 2.7 for now

I recommend using a virtual env before installing pip requirements

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

About

Apple CoreML example with scikit-learn

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages