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

Chapter 3. Recognizing Objects in the World

In this chapter, we will immerse ourselves in the world of machine learning (ML) and Core ML by working through what could be considered the 101 Core ML application. We will be using an image classification model to allow the user to point their iPhone at anything and have the app classify the most dominant object in the view. 

We will start off by first discussing the concept of convolutional neural networks (ConvNets or CNNs), a category of neural networks well suited to image classification, before jumping into implementation. Starting from a skeleton project, you will soon discover just how easy it is to integrate ML into your apps with the help of Core ML.

In this chapter, we will cover the following topics:

  • Gaining some intuition on how machines understand images
  • Building out the example application for this chapter
  • Capturing photo frames and preprocessing them before passing them to the Core ML model
  • Using the Core ML model to perform inference...