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

Summary


In this chapter, we introduced the concept of style transfer; a technique that aims to separate the content of an image from its style. We discussed how it achieves this by leveraging a trained CNN, where we saw how deeper layers of a network extract features that distill information about the content of an image, while discarding any extraneous information. 

Similarly, we saw that shallower layers extracted the finer details, such as texture and color, which we could use to isolate the style of a given image by looking for the correlations between the feature maps (also known as convolutional kernels or filters) in each layer. These correlations are what we use to measure style and how we steer our network. Having isolated the content and style, we generated a new image by combining the two.

We then highlighted the limitations of performing style transfer in real time (with current technologies) and introduced a slight variation. Instead of optimizing the style and content each time...