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

Converting Keras Tiny YOLO to Core ML


In the previous section, we discussed the concepts of the model and algorithm we will be using in this chapter. In this section, we will be moving one step closer to realizing the example project for this chapter by converting a trained Keras model of Tiny YOLO to Core ML using Apple's Core ML Tools Python package; but, before doing so, we will quickly discuss the model and the data it was trained on.

YOLO was conceived on a neural network framework called darknet, which is currently not supported by the default Core ML Tools package; fortunately, the authors of YOLO and darknet have made the architecture and weights of the trained model publicly available on their website at https://pjreddie.com/darknet/yolov2/. There are a few variations of YOLO that have been trained on either the dataset from Common Objects in Context (COCO), which consists of 80 classes, or The PASCAL Visual Object Classes (VOC) Challenge 2007, which consists of 20 classes.

Note

The...