Instruction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

It’s time to begin the exciting journey of building your custom image classification model using Create ML! To get started, you’ll download and set up the Create ML app.

Here are the steps to download and install the Create ML app:

  1. Open Xcode: If Xcode isn’t installed, download it from the Mac App Store.
  2. Access Create ML: Launch Xcode and, from the top menu, navigate to “Xcode” > “Open Developer Tool” > “Create ML”.
  3. Install Create ML: Follow the prompts to install Create ML if it isn’t already installed.

With Create ML installed and ready, you’ll begin building your custom image classification model. This lesson will clarify how an image classifier fits into the broader scope of machine-learning domains and how you’ll apply it in the MoodTracker app.

What Is an Image Classifier?

An image classifier is a machine-learning model designed to recognize and categorize images. By training the model with numerous labeled examples, such as images describing emotions such as angry, fear, and happy, it learns to identify different emotional states accurately. The process involves showing the model many examples, allowing it to associate specific features with particular emotional labels.

Navigating the Create ML App

Before you cover the step-by-step process of creating the image classifier in the demo, you’ll focus here on the app itself and each part of it.

Train Button

The Train button is located to the left of the five main tabs. Clicking this button starts the training process using the settings configured in the Settings tab. Monitor the training progress and make adjustments as needed to optimize the model’s performance.

General Recommendations for Preparing Your Image Classification Model

Data Preparation

Follow best practices for data preparation to ensure a well-trained model. These guidelines are based on Apple’s documentation for image classification and help achieve accurate and reliable results.

Structuring Training and Testing Data

Organize the training dataset by placing images into subfolders named after their categories, such as “Happy” for images describing happiness. Create a testing dataset from the original training dataset. Duplicate the folder structure of the training dataset and move approximately 20 percent of the images from each category into the corresponding folders of the testing dataset.

Additional Tips for Success

  • Use data augmentation techniques to increase the variety of your training dataset. Augmentation can include rotating, flipping, and cropping images to simulate different conditions.
  • Start with a smaller dataset and gradually increase its size as you refine your model. Iteratively improving the model helps identify issues early and make necessary adjustments.
See forum comments
Download course materials from Github
Previous: Introduction Next: Demo