Creating a custom TensorFlow Lite model for image recognition

Once you have had a fair go at Colaboratory, we're all set up to build the custom TensorFlow Lite model for the task of recognizing plant species. To do so, we will begin with a new Colaboratory notebook and perform the following steps:

  1. Import the necessary modules for the project. Firstly, we import TensorFlow and NumPy. NumPy will be useful for handling the image arrays, and TensorFlow will be used to build the CNN. The code to import the modules can be seen in the following snippet:
!pip install tf-nightly-gpu-2.0-previewimport tensorflow as tfimport numpy as npimport os

Notice the !pip install <package-name> command used on the first line. This is used to install packages ...

Get Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.