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)

What this book covers

Chapter 1, Introduction to Deep Learning for Mobile, talks about the emerging importance of deep learning on mobile devices. It covers the basic concepts of machine learning and deep learning, also introducing you to the various options available for integrating deep learning with Android and iOS. The chapter also introduces implementations of deep learning projects using native and cloud-based learning methodologies.

Chapter 2, Mobile Vision – Face Detection Using On-Device Models, introduces you to mobile vision and mobile vision models available in ML Kit. You will learn how to create a face detection model in Keras and understand how to convert that to be used for mobile devices. The model uses the Google Cloud Vision API for face detection.

Chapter 3, Chatbot Using Actions on Google, helps you to create your own customized chatbot by extending the functionality of Google Assistant. The project provides a good understanding of how to build a product that uses engaging voice and text-based conversational interfaces using Actions on Google and Dialogflow's API.

Chapter 4, Recognizing Plant Species, provides an in-depth discussion on how to build a custom Tensorflow Lite model that is able to perform visual recognition tasks using image processing. The model developed runs on mobile devices and is primarily used to recognize different plant species. The model uses a deep Convolutional Neural Network (CNN) for visual recognition.

Chapter 5, Generating Live Captions from a Camera Feed, presents a method of using a camera feed to generate natural language captions in real time. In this project, you'll create your own camera application that uses a customized pretrained model generated by the image caption generator. The model uses a CNN and Long Short-Term Memory (LSTM) for caption generation.

Chapter 6, Building an Artificial Intelligence Authentication System, presents you with ways to authenticate users and create a mechanism to identify rare and suspicious user interactions. Upon identification of rare events, that is, those that differ from the majority of data, the user is not allowed to log in, receiving a message saying that a malicious user was detected. This could be of great use when the application in question contains highly secured data, such as confidential emails or virtual banking vaults. The project uses an LSTM-based model on network request headers to perform classification of anomalous logins.

Chapter 7, Speech/Multimedia Processing – Generating Music Using AI, explores ways to generate music using AI. You will be introduced to multimedia processing. The chapter demonstrates the methods used to generate music after training on samples.  The project uses recurrent neural networks and an LSTM-based model to generate MIDI music files.

Chapter 8, Reinforced Neural Network-Based Chess Engine, discusses Google’s DeepMind and how reinforced neural networks can be used for machine-assisted gameplay on the Android platform. You will first create a Connect4 engine to get an intuition for building a self-learning, game-playing AI. Then, you will develop a chess engine based on deep reinforcement learning and host it on Google Cloud Platform (GCP) as an API. Then, you'll use the API for the chess engine to perform gameplay on mobile devices.

Chapter 9, Building an Image Super-Resolution Application, presents a method of generating super-resolution images with the help of deep learning. You will learn a third method of handling images on Android/iOS, and how to create TensorFlow models that can be hosted on DigitalOcean and then included in Android/iOS apps. With this model being highly resource-intensive, you will be instructed on how to host the model on the cloud. The project uses generative adversarial networks.

Chapter 10, Road Ahead, briefly covers the most popular applications for deep learning in mobile apps today, the current trends, and what is expected to transpire in this field in the future.