Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Intelligent Mobile Projects with TensorFlow
  • Toc
  • feedback
Intelligent Mobile Projects with TensorFlow

Intelligent Mobile Projects with TensorFlow

By : Tang
5 (4)
close
Intelligent Mobile Projects with TensorFlow

Intelligent Mobile Projects with TensorFlow

5 (4)
By: Tang

Overview of this book

As a developer, you always need to keep an eye out and be ready for what will be trending soon, while also focusing on what's trending currently. So, what's better than learning about the integration of the best of both worlds, the present and the future? Artificial Intelligence (AI) is widely regarded as the next big thing after mobile, and Google's TensorFlow is the leading open source machine learning framework, the hottest branch of AI. This book covers more than 10 complete iOS, Android, and Raspberry Pi apps powered by TensorFlow and built from scratch, running all kinds of cool TensorFlow models offline on-device: from computer vision, speech and language processing to generative adversarial networks and AlphaZero-like deep reinforcement learning. You’ll learn how to use or retrain existing TensorFlow models, build your own models, and develop intelligent mobile apps running those TensorFlow models. You'll learn how to quickly build such apps with step-by-step tutorials and how to avoid many pitfalls in the process with lots of hard-earned troubleshooting tips.
Table of Contents (14 chapters)
close

What this book covers

Chapter 1, Getting Started with Mobile TensorFlow, discusses how to set up TensorFlow on Mac and Ubuntu and NVIDIA GPU on Ubuntu and how to set up Xcode and Android Studio. We'll also discuss the difference between TensorFlow Mobile and TensorFlow Lite and when you should use them. Finally, we'll show you how to run the sample TensorFlow iOS and Android apps.

Chapter 2, Classifying Images with Transfer Learning, covers what is transfer learning and why you should use it, how to retrain the Inception v3 and MobileNet models for more accurate and faster dog breed recognition, and how to use the retrained models in sample iOS and Android apps. Then, we'll show you how to add TensorFlow to your own iOS app, both in Objective-C and Swift, and your own Android app for dog breed recognition.

Chapter 3, Detecting Objects and Their Locations, gives a quick overview of Object Detection, and then shows you how to set up the TensorFlow Object Detection API and use it to retrain SSD-MobileNet and Faster RCNN models. We'll also show you how to use the models used in the example TensorFlow Android app in your iOS app by manually building the TensorFlow iOS library to support non-default TensorFlow operations. Finally, we'll show you how to train YOLO2, another popular object detection model, which is also used in the example TensorFlow Android app, and how to use it in your iOS app.

Chapter 4, Transforming Pictures with Amazing Art Styles, first gives an overview of neural style transfer with their rapid progress in the last few years. Then, it shows you how to train fast neural style transfer models and use them in iOS and Android apps. After that, we'll cover how to use the TensorFlow Magenta multi-style model in your own iOS and Android apps to easily create amazing art styles.

Chapter 5, Understanding Simple Speech Commands, outlines speech recognition and shows you how to train a simple speech commands recognition model. We'll then show you how to use the model in Android as well as in iOS using both Objective-C and Swift. We'll also cover more tips on how to fix possible model loading and running errors on mobile.

Chapter 6, Describing Images in Natural Language, describes how image captioning works, and then it covers how to train and freeze an image captioning model in TensorFlow. We'll further discuss how to transform and optimize the complicated model to get it ready for running on mobile. Finally, we'll offer complete iOS and Android apps using the model to generate natural language description of images.

Chapter 7, Recognizing Drawing with CNN and LSTM, explains how drawing classification works, and discusses how to train, predict, and prepare the model. Then, we'll show you how to build another custom TensorFlow iOS library to use the model in a fun iOS doodling app. Finally, we'll show you how to build a custom TensorFlow Android library to fix a new model loading error and then use the model in your own Android app.

Chapter 8, Predicting Stock Price with RNN, takes you through RNN and how to use it to predict stock prices. Then, we'll inform you of how to build an RNN model with the TensorFlow API to predict stock prices, and how to build a RNN LSTM model with the easier-to-use Keras API to achieve the same goal. We'll test and see whether such models can beat a random buy or sell strategy. Finally, we'll show you how to run the TensorFlow and Keras models in both iOS and Android apps.

Chapter 9, Generating and Enhancing Images with GAN, gives an overview of what GAN is and why it has such great potential. Then, it oultines how to build and train a basic GAN model that can be used to generate human-like handwritten digits and a more advanced model that can enhance low resolution images to high resolution ones. Finally, we'll cover how to use the two GAN models in your iOS and Android apps.

Chapter 10, Building AlphaZero-like Mobile Game App, begins with how the latest and coolest AlphaZero works, and how to train and test a AlphaZero-like model to play a simple but fun game called Connect 4 in Keras with TensorFlow as backend. We'll then show you the complete iOS and Android apps to use the model and play the game Connect 4 on your mobile devices.

Chapter 11, Using TensorFlow Lite and Core ML on Mobile, demonstrates TensorFlow Lite and then shows you how to use a prebuilt TensorFlow model, a retrained TensorFlow model for TensorFlow Lite, and a custom TensorFlow Lite model in iOS. We'll also show you how to use TensorFlow Lite in Android. After that, we'll give an overview of Apple's Core ML and show you how to use Core ML with standard machine learning using Scikit-Learn. Finally, we'll cover how to use Core ML with TensorFlow and Keras.

Chapter 12, Developing TensorFlow Apps on Raspberry Pi, first looks at how to set up Raspberry Pi and make it move, and how to set up TensorFlow on Raspberry Pi. Then, we'll cover how to use the TensorFlow image recognition and audio recognition models, along with text to speech and robot movement APIs, to build a Raspberry Pi robot that can move, see, listen, and speak. Finally, we'll discuss in detail how to use OpenAI Gym and TensorFlow to build and train a powerful neural network-based reinforcement learning policy model from scratch in a simulated environment to make the robot learn to keep its balance.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete