Tool to convert MXNet models into Apple CoreML model format.
Project description
Apache MXNet (incubating) is a deep learning framework designed for both efficiency and flexibility. It allows you to mix symbolic and imperative programming to maximize efficiency and productivity. At its core, MXNet contains a dynamic dependency scheduler that automatically parallelizes both symbolic and imperative operations on the fly. A graph optimization layer on top of that makes symbolic execution fast and memory efficient. MXNet is portable and lightweight, scaling effectively to multiple GPUs and multiple machines.
Core ML is an Apple framework which allows developers to simply and easily integrate machine learning (ML) models into apps running on Apple devices (including iOS, watchOS, macOS, and tvOS). Core ML introduces a public file format (.mlmodel) for a broad set of ML methods including deep neural networks (both convolutional and recurrent), tree ensembles with boosting, and generalized linear models. Models in this format can be directly integrated into apps through Xcode.
This tool helps convert MXNet models into Apple CoreML format which can then be run on Apple devices. You can find more information about this tool on our github page.
Prerequisites
This package can only be installed on MacOS X since it relies on Apple’s CoreML SDK. It can be run on MacOS 10.11 or higher though for running inferences on the converted model MacOS 10.13 or higher is needed (or for phones, iOS 11 or above).
Installation
The method for installing this tool follows the standard python package installation steps. Once you have set up a python environment, run:
pip install mxnet-to-coreml
The package documentation contains more details on how to use coremltools.
Dependencies
This tool has the following dependencies:
mxnet (0.10.0+)
coremltools (0.5.1+)
pyyaml (3.12+)
Sample Usage
In order to convert, say a Squeezenet model, with labels from synset.txt, execute this
mxnet_coreml_converter.py --model-prefix='squeezenet_v1.1' \ --epoch=0 --input-shape='{"data":"3,227,227"}' \ --mode=classifier --pre-processing-arguments='{"image_input_names":"data"}' \ --class-labels synset.txt --output-file="squeezenetv11.mlmodel"
More Information
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file mxnet_to_coreml-0.1.3-cp27-cp27m-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: mxnet_to_coreml-0.1.3-cp27-cp27m-macosx_10_12_x86_64.whl
- Upload date:
- Size: 16.1 kB
- Tags: CPython 2.7m, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba4ff072520f3347ed9194155b305dccfd3dd6df9aa335ba9e8f84eb80344f90 |
|
MD5 | 6e799648dd08e97716c6aebd20830909 |
|
BLAKE2b-256 | dafec12fb2962e8a5673bb490adc85f87166adaf8d6a7a7c947394792124c8df |