Viewer for neural network, deep learning and machine learning models, supporting ONNX, TensorFlow, PyTorch, Core ML and many other formats.
apple/coremltools
Python package for converting trained TensorFlow, PyTorch, scikit-learn, XGBoost and LibSVM models into Apple's Core ML format.
- Stars
- 5,437
- Forks
- 868
- Open issues
- 542
- Last commit
- 22 days ago
What is it?
Core ML Tools (coremltools) is a Python package for converting machine learning models from third-party training libraries into Apple's Core ML format, so they can run inside iOS, macOS and other Apple platform apps. It supports TensorFlow 1.x and 2.x, PyTorch, and non-neural-network frameworks such as scikit-learn, XGBoost and LibSVM.
Beyond conversion, the package can read, write and optimize existing Core ML models. On macOS, it can also check a conversion by running predictions with Core ML. Once a model is converted, it is added to an Xcode project and called through Core ML APIs.
The package is installed from PyPI with pip and is licensed under BSD-3-Clause. Documentation includes a guide with examples and an API reference.
Key features
- 01Converts TensorFlow, PyTorch, scikit-learn, XGBoost and LibSVM models to Core ML.
- 02Reads, writes and optimizes existing Core ML models.
- 03Validates conversions by running predictions with Core ML on macOS.
- 04Installable from PyPI with pip.
Use cases
- Bringing a PyTorch or TensorFlow model into an iOS or macOS app.
- Deploying a scikit-learn or XGBoost model on Apple devices.
- Inspecting or editing an existing Core ML model from Python.
Quick start
- 1
Install the latest stable release from PyPI with pip
pip install coremltools
Things to know
- Running predictions to verify conversions requires macOS.
- Full-featured use depends on the Core ML framework, which is Apple-platform specific.
Topics
FAQ
- What is coremltools?
- Python package for converting trained TensorFlow, PyTorch, scikit-learn, XGBoost and LibSVM models into Apple's Core ML format. Core ML Tools (coremltools) is a Python package for converting machine learning models from third-party training libraries into Apple's Core ML format, so they can run inside iOS, macOS and other Apple platform apps. It supports TensorFlow 1.x and 2.x, PyTorch, and non-neural-network frameworks such as scikit-learn, XGBoost and LibSVM.
- Is coremltools free to use? What license does it have?
- coremltools is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
- Is coremltools still maintained?
- Actively maintained. The last commit to coremltools was on Sep 30, 2026.
- What can I use coremltools for?
- Bringing a PyTorch or TensorFlow model into an iOS or macOS app. Deploying a scikit-learn or XGBoost model on Apple devices. Inspecting or editing an existing Core ML model from Python.
- How do I install coremltools?
- Install the latest stable release from PyPI with pip: pip install coremltools
- Where can I get coremltools?
- The source code and installation instructions are on GitHub: https://github.com/apple/coremltools
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Keras 3 is a deep learning framework that runs on JAX, TensorFlow, PyTorch, or OpenVINO for inference.
A cross-platform accelerator for running ML models exported to ONNX format, with training support for PyTorch scripts.
A Python library that converts machine learning code between frameworks such as PyTorch, TensorFlow, JAX and NumPy via ivy.transpile.
Python library and hosted platform for tracking, visualizing and managing machine learning experiments, datasets and models.
A 12-week, 24-lesson beginner AI curriculum from Microsoft covering symbolic AI, neural networks, computer vision, NLP and ethics, with notebooks in PyTorch and TensorFlow.