Skip to main content [aditude-amp id="stickyleaderboard" targeting='{"env":"staging","page_type":"article","post_id":2358850,"post_type":"story","post_chan":"none","tags":"category-computers-electronics-programming,category-computers-electronics-software,category-science-computer-science","ai":true,"category":"none","all_categories":"ai,big-data,bots,cloud,dev,mobile,","session":"B"}']

Apple’s Core ML 2 vs. Google’s ML Kit: What’s the difference?

At Apple’s Worldwide Developers Conference 2018, the Cupertino company announced Core ML 2, a new version of its machine learning software development kit (SDK) for iOS devices. But it’s not the only game in town — just a few months ago, Google announced ML Kit, a cross-platform AI SDK for both iOS and Android devices. Both toolkits aim to ease the development burden of optimizing large AI models and datasets for mobile apps. So how are they different?

Core ML

Apple’s Core ML debuted in June 2017 as a no-frills way for developers to integrate trained machine learning models into their iOS apps. Core ML 2 is much the same, but more efficient: Apple says it’s 30 percent faster, thanks to batch prediction, and that it can shrink the size of models by up to 75 percent with quantization.

[aditude-amp id="flyingcarpet" targeting='{"env":"staging","page_type":"article","post_id":2358850,"post_type":"story","post_chan":"none","tags":"category-computers-electronics-programming,category-computers-electronics-software,category-science-computer-science","ai":true,"category":"none","all_categories":"ai,big-data,bots,cloud,dev,mobile,","session":"B"}']

Still, it’s not perfect. Unlike Google’s ML Kit, it isn’t cross-platform (it doesn’t support Android), and it’s strictly an offline service — cloud-hosted models and features like versioning require a third-party service like IBM’s Watson Studio.

Core ML is constrictive in other ways. The newest version supports 16-bit Floating Point, which can greatly reduce the size of AI models. But it can’t compress machine learning models into smaller packages, and it can’t update models at runtime. Trained models are loaded into Apple’s Xcode development environment and packaged in an app bundle.

AI Weekly

The must-read newsletter for AI and Big Data industry written by Khari Johnson, Kyle Wiggers, and Seth Colaner.

Included with VentureBeat Insider and VentureBeat VIP memberships.

That’s not to minimize Core ML’s advantages, of course. It ships with four prebuilt machine learning models based on popular open source projects and a converter that works with Facebook’s Caffe and Caffe2, Keras, scikit-learn, XGBoost, LibSVM, and Google’s TensorFlow Lite. (Developers can create custom converters for frameworks that aren’t supported.) Apple touts its privacy benefits (apps don’t need to pass data over a network), and it says that Core ML is optimized for power efficiency.

Then there’s Create ML to consider. It’s a new GPU-accelerated tool for native AI model training on Mac computers that supports vision and natural language. And because it’s coded in Swift, developers can use drag-and-drop programming interfaces like Xcode Playgrounds to train models.

ML Kit

At its I/O 2018 developer conference in May, Google introduced ML Kit, a cross-platform suite of machine learning tools for its Firebase mobile development platform. ML Kit uses the Neural Network API on Android devices and is designed to compress and optimize machine learning models for mobile devices.

A major difference between ML Kit and Core ML is support for both on-device and cloud APIs. Unlike Core ML, which can’t natively deploy models that require internet access, ML Kit leverages the power of Google Cloud Platform’s machine learning technology for “enhanced” accuracy. Google’s on-device image labeling service, for example, features about 400 labels, while the cloud-based version has more than 10,000.

ML Kit offers a couple of easy-to-use APIs for basic use cases: text recognition, face detection, barcode scanning, image labeling, and landmark recognition. Google says that new APIs, including a smart reply API that supports in-app contextual messaging replies and an enhanced face detection API with high-density face contours, will arrive in late 2018.

ML Kit doesn’t restrict developers to prebuilt machine learning models. Custom models trained with TensorFlow Lite, Google’s lightweight offline machine learning framework for mobile devices, can be deployed with ML Kit via the Firebase console, which serves them dynamically. (Google says it’s also working on a compression tool that converts full TensorFlow models into TensorFlow Lite models.) Developers have the option of decoupling machine learning models from apps and serving them at runtime, shaving megabytes off of app install sizes and ensuring models always remain up to date.

[aditude-amp id="medium1" targeting='{"env":"staging","page_type":"article","post_id":2358850,"post_type":"story","post_chan":"none","tags":"category-computers-electronics-programming,category-computers-electronics-software,category-science-computer-science","ai":true,"category":"none","all_categories":"ai,big-data,bots,cloud,dev,mobile,","session":"B"}']

Finally, ML Kit works with Firebase features like A/B testing, which lets users test different machine learning models dynamically, and Cloud Firestore, which stores image labels and other data.

Which is better?

So which machine learning framework has the upper hand? Neither, really.

Core ML 2 doesn’t support Android, of course, and developers familiar with Google’s Firebase are likely to prefer ML Kit. Likewise, longtime Xcode users will probably tend toward Core ML 2.

Perhaps the biggest difference between the two is first-party plug-and-play support: Google provides a wealth of prebuilt machine learning models and APIs from which to choose, including APIs for contextual message replies and bar code scanning. Apple, on the other hand, is a little more hands-off.

[aditude-amp id="medium2" targeting='{"env":"staging","page_type":"article","post_id":2358850,"post_type":"story","post_chan":"none","tags":"category-computers-electronics-programming,category-computers-electronics-software,category-science-computer-science","ai":true,"category":"none","all_categories":"ai,big-data,bots,cloud,dev,mobile,","session":"B"}']

As in many things, choosing between ML Core 2 and ML Kit is mostly a matter of personal preference — and whether the developer in question prefers a top-to-bottom solution like Firebase or a piecemeal solution like Create ML.

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Learn More