Creating iOS apps with a DL model
In this section, we will cover how to write inference code for TF Lite and TorchScript models for an iOS app. While Swift and Objective-C are the native languages for iOS and can be used together for a single project, we will mainly look at Swift use cases as it is more popular than Objective-C nowadays.
The chapter would be lengthy if we explain every step of iOS app development. Therefore, we relegate the basics to the official tutorial provided by Apple: https://developer.apple.com/tutorials/app-dev-training.
Running TF Lite model inference on iOS
In this section, we show how a TF Lite model can be loaded in an iOS app using TensorFlowLiteSwift
, the native iOS library for TF Lite (https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/swift). Installing TensorFlowLiteSwift
can be achieved through CocoaPods, the standard package manager for iOS app development (https://cocoapods.org). To download CocoaPods on macOS, you can...