Machine Learning with Core ML

Book description

Leverage the power of Apple's Core ML to create smart iOS apps

About This Book
  • Explore the concepts of machine learning and Apple's Core ML APIs
  • Use Core ML to understand and transform images and videos
  • Exploit the power of using CNN and RNN in iOS applications
Who This Book Is For

Machine Learning with Core ML is for you if you are an intermediate iOS developer interested in applying machine learning to your mobile apps. This book is also for those who are machine learning developers or deep learning practitioners who want to bring the power of neural networks in their iOS apps. Some exposure to machine learning concepts would be beneficial but not essential, as this book acts as a launchpad into the world of machine learning for developers.

What You Will Learn
  • Understand components of an ML project using algorithms, problems, and data
  • Master Core ML by obtaining and importing machine learning model, and generate classes
  • Prepare data for machine learning model and interpret results for optimized solutions
  • Create and optimize custom layers for unsupported layers
  • Apply CoreML to image and video data using CNN
  • Learn the qualities of RNN to recognize sketches, and augment drawing
  • Use Core ML transfer learning to execute style transfer on images
In Detail

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

Style and approach

An easy-to-follow step by step guide which will help you get to grips with real world application of CoreML

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Machine Learning with Core ML
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Introduction to Machine Learning
    1. What is machine learning?
    2. A brief tour of ML algorithms
      1. Netflix – making recommendations 
      2. Shadow draw – real-time user guidance for freehand drawing
      3. Shutterstock – image search based on composition
      4. iOS keyboard prediction – next letter prediction
    3. A typical ML workflow 
    4. Summary
  7. Introduction to Apple Core ML
    1. Difference between training and inference
    2. Inference on the edge
    3. A brief introduction to Core ML
      1. Workflow 
    4. Learning algorithms 
      1. Auto insurance in Sweden
      2. Supported learning algorithms
    5. Considerations 
    6. Summary
  8. Recognizing Objects in the World
    1. Understanding images
    2. Recognizing objects in the world
      1. Capturing data 
      2. Preprocessing the data
    3. Performing inference 
    4. Summary 
  9. Emotion Detection with CNNs
    1. Facial expressions
    2. Input data and preprocessing 
    3. Bringing it all together
    4. Summary 
  10. Locating Objects in the World
    1. Object localization and object detection 
    2. Converting Keras Tiny YOLO to Core ML
    3. Making it easier to find photos
    4. Optimizing with batches
    5. Summary
  11. Creating Art with Style Transfer
    1. Transferring style from one image to another 
    2. A faster way to transfer style
    3. Converting a Keras model to Core ML
    4. Building custom layers in Swift
      1. Accelerating our layers 
      2. Taking advantage of the GPU 
    5. Reducing your model's weight
    6. Summary
  12. Assisted Drawing with CNNs
    1. Towards intelligent interfaces 
    2. Drawing
    3. Recognizing the user's sketch
      1. Reviewing the training data and model
      2. Classifying sketches 
      3. Sorting by visual similarity
    4. Summary 
  13. Assisted Drawing with RNNs
    1. Assisted drawing 
    2. Recurrent Neural Networks for drawing classification
    3. Input data and preprocessing 
    4. Bringing it all together
    5. Summary 
  14. Object Segmentation Using CNNs
    1. Classifying pixels 
    2. Data to drive the desired effect – action shots
    3. Building the photo effects application
    4. Working with probabilistic results
      1. Improving the model
      2. Designing in constraints 
      3. Embedding heuristics
      4. Post-processing and ensemble techniques
      5. Human assistance
    5. Summary
  15. An Introduction to Create ML
    1. A typical workflow 
    2. Preparing the data
    3. Creating and training a model
      1. Model parameters
      2. Model metadata
      3. Alternative workflow (graphical) 
    4. Closing thoughts
    5. Summary
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Machine Learning with Core ML
  • Author(s): Joshua Newnham
  • Release date: June 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788838290