Chapter 3. Introduction to ML Kit

In the first two chapters of this book, you took a look at the foundations of machine learning and deep learning to build some basic models. For the rest of the book, you’re going to switch gears and explore how to implement models on mobile devices. A powerful toolkit that allows you to implement preexisting models (aka turnkey scenarios) as well as custom models is Google’s ML Kit. In this chapter you’ll explore how to use ML Kit to run Android or iOS models entirely on your device. The model will stay on-device, giving your users speed and privacy advantages.

Note

I would strongly recommend going through this chapter in detail, particularly if you aren’t super familiar with how to implement add-on libraries for both Android and iOS. I’ll go through it in a lot of detail here, and subsequent chapters will refer back to this one.

There are three main scenarios where ML Kit can be used:

  • Turnkey solutions where a model already exists in ML Kit to implement what you need

  • Rapid prototyping using a generic model for a specific task; for example, if you want to build a vision app, don’t have a model for your needs yet, but want to determine if it’s possible with your device

  • Building apps with custom models like those we explored in Chapter 2

In this chapter I’ll explore some turnkey solutions, so you can understand how to get up and running quickly with ML models in your apps. In the subsequent chapters, we’ll explore how to use ML Kit initially ...

Get AI and Machine Learning for On-Device Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.