Using a prebuilt TensorFlow Lite model in iOS

Perform the following steps to create a new iOS app and add TensorFlow Lite support to it, using a prebuilt TensorFlow Lite model for image classification:

  1. Create a new Xcode iOS project with Single View called HelloTFLite, set Objective-C as the language, then add the ios_image_load.mm and ios_image_load.h files from the tensorflow/contrib/lite/examples/ios folder to the project.
If you prefer Swift as the programming language, you can refer to Chapter 2, Classifying Images with Transfer Learning, or Chapter 5, Understanding Simple Speech Commands, after following the steps here, to see how to convert the Objective-C app to a Swift app. But be aware that the TensorFlow Lite inference code ...

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.