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 ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.