Chapter 43
Using Create ML to Train Your Own Machine Learning Model for Image Recognition

Earlier, you learned how to integrate a Core ML model in your iOS app. In that demo application, we utilized a pre-trained ML model which was created by other developers. What if you can't find a ML model that fits your need?

You will have to train your own model. The big question is how?

There are no shortage of ML tools for training your own model. Tensorflow and Caffe are a couple of the examples. However, all these tools require lots of code and don't have a friendly visual interface. Starting from Xcode 10, Apple introduced a new tool called Create ML that allows developers (and even non-developers) to train their own ML model.

Create ML was first released in Xcode 10 but it's built right into Playgrounds. Since the release of Xcode 11, Create ML becomes an independent full featured app. To train your own ML model, all you need is import your training data into the Create ML tool and you are good to go. You will understand what I mean when we dive into the demo in later section.

Last year, Create ML only focused on these main areas of machine learning models:

  1. Images
  2. Text
  3. Tabular data
  4. Sound
  5. Activity

Say, for images, you can create your own image classifier for image recognition. In this case, you take a photo or an image as input and the ML model outputs the label of the image. You can also create your own ML model for text classification. For example, you can train a model to classify if a user's comment is positive or negative.

In this chapter, we will focus on training a ML model for image recognition. For other types of ML models, we will look into them in later chapters.

To continue reading and access the full version of the book, please get the full copy here. You will also be able to access the full source code of the project.

results matching ""

    No results matching ""