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 the image captioning model in iOS

As the CNN part of the model is based on Inception v3, the same model we used in Chapter 2, Classifying Images with Transfer Learning, we can and will use the simpler TensorFlow pod to create our Objective-C iOS app. Follow the steps here to see how to use both the image2text_frozen_transformed.pb and image2text_frozen_transformed_memmapped.pb model files in a new iOS app:

  1. Similar to the first four steps in Chapter 2, Classifying Images with Transfer Learning, in the Adding TensorFlow to your Objective-C iOS app section, create a new iOS project named Image2Text, add a new file named Podfile with the following content:
target 'Image2Text'
pod 'TensorFlow-experimental'

Then run pod install on a Terminal and open the Image2Text.xcworkspace file. Drag and drop ios_image_load.h, ios_image_load.mm, tensorflow_utils...