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)

Alpha Zero-like AI for Connect 4

Before we begin working on the AI that plays Connect4, let's briefly understand the game and its dynamics. Connect 4, also sometimes known as Four in a row, Four in a line, Four up, and so on, is one of the most popular board games among children all over the world. We can also understand it as a more advanced version of the Tic-Tac-Toe game, where you have to place three markers of the same type either horizontally, vertically, or diagonally. The board is generally a 6x7 grid, and two players play with a marker each.

The rules of Connect 4 can vary, so let's lay down some concrete rules for the version of the rules that our AI will learn to play:

  • The game is simulated as being played on a vertical board that has seven hollow columns and six rows. Each column has an opening on top of the board, which is where pieces can be dropped in...