TF Lite Model Maker Library

Learn about the TF Lite Model Maker library to employ custom datasets for the training of TF Lite models.

The TF Lite Model Maker library enables us to train a custom TF Lite model on our datasets. This library supports transfer learning, reducing the required training data in our dataset and the training time. Let’s explore the functionalities offered by the TF Lite Model Maker library to simplify the process of making DL models for mobile and edge devices.

Supported ML tasks

The Model Maker library supports various ML tasks, including:

  • Image classification

  • Text classification

  • Object detection

  • Audio classification

  • Recommendation system

Model Maker for image classification

To develop a custom image classification model using the Model Maker library, we can follow these steps:

  • Data preparation: Prepare the custom dataset in a directory structure compatible with the TF Lite Model Maker. The directory should contain subdirectories for each class, with images of that class in each subdirectory.

  • Data loading: Use the DataLoader class to load the custom training and validation datasets. In the following, we use the from_folder() method to load the data from a directory containing our custom dataset.

Get hands-on with 1200+ tech skills courses.