Apple Core ML and Keras Support Now Available for Apache MXNet

We’re excited about the availability of Apache MXNet version 0.11. With this release, MXNet hit major milestones, both in terms of community development and as an incubating Apache project. Contributors—including developers from Apple, Samsung and Microsoft—committed code to this release. There are over 400 contributors on the project so far. The project has now fully migrated its codebase to Apache and has made its first official release as an incubating project. We discussed some of the important features of this release in a prior blog. This blog recaps the highlights.

Use MXNet models to build machine learning into apps for iOS, macOS, watchOS and tvOS

With the release of Core ML by Apple at WWDC 2017 developers can now easily integrate a machine learning model into their app, enabling them to bring intelligent new features to users with just a few lines of code. We’re already beginning to see capabilities such as augmented reality transform the way we experience our surroundings. As capabilities in the fast-moving AI space expand, developers will have access to new machine learning models that unlock new capabilities that enhance our experience.

Apple has contributed code to the Apache MXNet project to facilitate the availability of cutting edge models for app developers. MXNet now works with Core ML that enables developers to build and train machine learning models in the cloud with MXNet, and import them right into Xcode so you can easily build intelligent new features in your apps. You can choose from MXNet’s model zoo of pre-trained models for various applications or build your own model. This release provides you with a tool (in preview) to convert MXNet models to the Core ML format. To import an MXNet model into Apple’s Core ML format, you’ll need to install the converter and run the Python command to convert a trained model. Installing the converter is just one simple command:

pip install mxnet-to-coreml

Follow this tutorial to learn how to build a simple iOS application powered by machine learning that identifies the geo-location of places in pictures. For instructions and an end to end example, please visit this GitHub repo.

MXNet for Keras v1.2

Keras is a popular high-level library for building neural networks. It provides users with an easy-to-use frontend interface that can drive various machine learning framework backends. MXNet is now available as a backend choice for users running Keras v1.2. MXNet gives you a simple way to set up multi-GPUs for training and superior performance that scales near-linearly. To read more about the benefits of using MXNet as a backend for Keras, refer to NVIDIA’s blog. You can install Keras v1.2 with the MXNet interface with the following command:

pip install keras-mxnet

Detailed instructions for setting up a training job with multiple GPU’s can be found at this GitHub repo.

MXNet’s 0.11 release adds several key features, API enhancements, performance improvements, and bug fixes. This blog post only covered some of the major features in this release. You can find more details in the full release notes.

We are excited to see the growth and momentum of this community-owned project. These advancements wouldn’t be possible without the hard work of the project’s contributors!

Next Steps

Learn how to set up an environment to convert Apache MXNet models into Apple’s Core ML, convert an existing model, and then import it into a sample iOS app.