Book Image

Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter

By : Anubhav Singh, Rimjhim Bhadani
Book Image

Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter

By: Anubhav Singh, Rimjhim Bhadani

Overview of this book

Deep learning is rapidly becoming the most popular topic in the mobile app industry. This book introduces trending deep learning concepts and their use cases with an industrial and application-focused approach. You will cover a range of projects covering tasks such as mobile vision, facial recognition, smart artificial intelligence assistant, augmented reality, and more. With the help of eight projects, you will learn how to integrate deep learning processes into mobile platforms, iOS, and Android. This will help you to transform deep learning features into robust mobile apps efficiently. You’ll get hands-on experience of selecting the right deep learning architectures and optimizing mobile deep learning models while following an application oriented-approach to deep learning on native mobile apps. We will later cover various pre-trained and custom-built deep learning model-based APIs such as machine learning (ML) Kit through Firebase. Further on, the book will take you through examples of creating custom deep learning models with TensorFlow Lite. Each project will demonstrate how to integrate deep learning libraries into your mobile apps, right from preparing the model through to deployment. By the end of this book, you’ll have mastered the skills to build and deploy deep learning mobile applications on both iOS and Android.
Table of Contents (13 chapters)

To get the most out of this book

You'll need a working Python 3.5+ installation on your local system. It is a good idea to install Python as part of the Anaconda distribution. To build the mobile apps, you'll need a working installation of Flutter 2.0+. Furthermore, you'll often require both TensorFlow 1.x and 2.x throughout the book; hence, having two Anaconda environments is essential:

Software/hardware covered in the book OS requirements
Jupyter Notebook Any OS with an updated web browser (preferably Google Chrome/Mozilla Firefox/Apple Safari).Minimum RAM requirement: 4 GB; however, 8 GB is recommended.
Microsoft Visual Studio Code Any OS with more than 4 GB of RAM; however, 8 GB is recommended.
Smartphone with developer access Android/iOS with at least 2 GB of RAM; however, 3 GB is recommended.

All the software tools you'll need in this book are freely available. However, you'll have to add your credit/debit card details to your account to activate GCP or DigitalOcean platforms.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of the code.

Deep learning on Flutter mobile applications is at a very early stage of development. Upon reading this book, if you write blogs and make videos on how to perform machine learning or deep learning on mobile apps, you'll be contributing strongly to the growing ecosystem of both app developers and machine learning practitioners.

Download the example code files

You can download the example code files for this book from your account at If you purchased this book elsewhere, you can visit and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at Check them out!


Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Notice that the dialogflow variable here is an object of the actions-on-google module."

A block of code is set as follows:

sdk: flutter
firebase_ml_vision: ^0.9.2+1
image_picker: ^0.6.1+4

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "To proceed to the console, click on the Start Building or Go to Actions Console buttons."

Warnings or important notes appear like this.
Tips and tricks appear like this.