Machine learning is a growing technique that focuses on the development of computer programs that can be changed or modified when exposed to new data. It has made significant advances that have enabled practical applications of machine learning (ML) and, by extension, the overall field of Artificial Intelligence (AI).
This book presents the implementation of seven practical, real-world projects that will teach you how to leverage TensorFlow Lite and Core ML to perform efficient machine learning. We will be learning about the recent advancements in TensorFlow and its extensions, such as TensorFlow Lite, to design intelligent apps that learn from complex/large datasets. We will delve into advancements such as deep learning by building apps using deep neural network architecture such as Convolutional Neural Networks (CNNs), recurrent neural networks (RNNs), transfer learning, and much more.
By the end of this book, you will not only have mastered all the concepts of and learned how to implement machine learning and deep learning, but you will also have learned how to solve the problems and challenges faced while building powerful apps on mobile using TensorFlow Lite and Core ML.
Machine Learning Projects for Mobile Applications is for you if you are a data scientist, ML expert, deep learning, or AI enthusiast who fancies mastering ML and deep learning implementation with practical examples using TensorFlow and Keras. Basic knowledge of Python programming language would be an added advantage.
Chapter 1, Mobile Landscapes in Machine Learning, makes us familiar with the basic ideas behind TensorFlow Lite and Core ML.
Chapter 2, CNN Based Age and Gender Identification Using Core ML, teaches us how to build an iOS application to detect the age, gender, and emotion of a person from a camera feed or from the user's photo gallery using the existing data models that were built for the same purpose.
Chapter 3, Applying Neural Style Transfer on Photos, teaches us how to build a complete iOS and Android application in which image transformations are applied to our own images in a fashion similar to the Instagram app.
Chapter 4, Deep Diving into the ML Kit with Firebase, explores the Google Firebase-based ML Kit platform for mobile applications.
Chapter 5, A Snapchat-Like AR Filter on Android, takes us on a journey where we will build an AR filter that is used on applications such as Snapchat and Instagram using TensorFlow Lite.
Chapter 6, Handwritten Digit Classifier Using Adversarial Learning, explains how to build an Android application that identifies handwritten digits.
Chapter 7, Face-Swapping with Your Friends Using OpenCV, takes a close look at building an application where a face in an image is replaced by another face.
Chapter 8, Classifying Food Using Transfer Learning, explains how to classify food items using transfer learning.
Chapter 9, What's Next?, gives us a glimpse into all the applications built throughout the book and their relevance in the future.
If you have prior knowledge of building mobile apps, that will help greatly. If not, it is advisable to learn the basics of Java or Kotlin for Android, or Swift for iOS.
If you have basic knowledge of Python, that will help you build your own data model, but Python skill is not mandatory.
The applications in the book are built using a MacBook Pro. Most of the command-line operations are shown with the assumption that you have a bash shell installed on your machine. They may not work in a Windows development environment.
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packt.com.
- Select the
SUPPORT
tab. - Click on
Code Downloads & Errata
. - 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 https://github.com/PacktPublishing/Machine-Learning-Projects-for-Mobile-Applications. In 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 https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781788994590_ColorImages.pdf.
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: "So, we will start our iterations from 1.0
and start minimizing errors in the right direction."
A block of code is set as follows:
def estimate_house_price(sqft, location): price = < DO MAGIC HERE > return price
Any command-line input or output is written as follows:
/usr/bin/ruby -e "$(curl -fsSL \ https://raw.githubusercontent.com/Homebrew/install/master/install)"
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: "Let's select Single View App
from the initial screen, illustrated in this screenshot."
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected]
.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected]
with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.