Book Image

Machine Learning for Mobile

By : Revathi Gopalakrishnan, Avinash Venkateswarlu
Book Image

Machine Learning for Mobile

By: Revathi Gopalakrishnan, Avinash Venkateswarlu

Overview of this book

Machine learning presents an entirely unique opportunity in software development. It allows smartphones to produce an enormous amount of useful data that can be mined, analyzed, and used to make predictions. This book will help you master machine learning for mobile devices with easy-to-follow, practical examples. You will begin with an introduction to machine learning on mobiles and grasp the fundamentals so you become well-acquainted with the subject. You will master supervised and unsupervised learning algorithms, and then learn how to build a machine learning model using mobile-based libraries such as Core ML, TensorFlow Lite, ML Kit, and Fritz on Android and iOS platforms. In doing so, you will also tackle some common and not-so-common machine learning problems with regard to Computer Vision and other real-world domains. By the end of this book, you will have explored machine learning in depth and implemented on-device machine learning with ease, thereby gaining a thorough understanding of how to run, create, and build real-time machine-learning applications on your mobile devices.
Table of Contents (19 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Question and Answers
Index

Face detection using ML Kit


Now we will try to understand how face detection works with ML Kit. Face detection, which was previously part of the Mobile Vision API, has now been moved to ML Kit.

Face detection concepts

The Google Developers page defines face detection as the process of automatically locating and detecting human faces in visual media (digital images or video). The detected face is reported at a position with an associated size and orientation. After the face is detected, we can search for landmarks present in the face such as the eyes and nose.

Here are some important terms to understand before we can move on to programming face detection with ML Kit:

  • Face Orientation: Detects faces at a range of different angles.
  • Face Recognition: Determines whether two faces can belong to the same person.
  • Face Tracking: Refers to detecting faces in videos.
  • Landmark: Refers to a point of interest within a face. This corresponds to the notable features on a face, such as the right eye, left eye,...