Book Image

Intelligent Mobile Projects with TensorFlow

By : Jeff Tang
Book Image

Intelligent Mobile Projects with TensorFlow

By: Jeff 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)

Using TensorFlow Lite in Android

For simplicity, we'll just show how to add TensorFlow Lite with a prebuilt TensorFlow Lite MobileNet model in a new Android app, uncovering some helpful tips along the way. There's an example Android app using TensorFlow Lite that you may want to run with Android Studio first (https://www.tensorflow.org/mobile/tflite/demo_android), on an Android device with an API Level of at least 15 (version at least 4.0.3), before going through the following steps to use TensorFlow Lite in a new Android app. If you successfully build and run the demo app, you should be able to see the recognized objects by the device camera and the TensorFlow Lite MobileNet model, when you move around your Android device.

Now perform the following steps to create a new Android app and add the TensorFlow Lite support to classify an image, as we did in the HelloTensorFlow...