Book Image

Machine Learning with Core ML

Book Image

Machine Learning with Core ML

Overview of this book

Core ML is a popular framework by Apple, with APIs designed to support various machine learning tasks. It allows you to train your machine learning models and then integrate them into your iOS apps. Machine Learning with Core ML is a fun and practical guide that not only demystifies Core ML but also sheds light on machine learning. In this book, you’ll walk through realistic and interesting examples of machine learning in the context of mobile platforms (specifically iOS). You’ll learn to implement Core ML for visual-based applications using the principles of transfer learning and neural networks. Having got to grips with the basics, you’ll discover a series of seven examples, each providing a new use-case that uncovers how machine learning can be applied along with the related concepts. By the end of the book, you will have the skills required to put machine learning to work in their own applications, using the Core ML APIs
Table of Contents (16 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Data to drive the desired effect – action shots


Now would be a good time to introduce the photo effect we want to create in this chapter. The effect, as I know it, is called an action shot. It's essentially a still photograph that shows someone (or something) in motion, probably best illustrated with an image - like the one shown here: 

 

Note

As previously mentioned, the model we used in this chapter performs binary (or single-class) classification. This simplification, using a binary classifier instead of a multi-class classifier, has been driven by the intended use that is just segmenting people from the background. Similar to any software project, you should strive for simplicity where you can.

To extract people, we need a model to learn how to recognize people and their associated pixels. For this, we need a dataset consisting of images of people and corresponding images with those pixels of the persons labeled—and lots of them. Unlike datasets for classification, datasets for object segmentation...