ONNX Runtime Mobile Super Resolution iOS sample application with Ort-Extensions support for pre/post processing
This is a basic Super Resolution example application for ONNX Runtime on iOS with Ort-Extensions support for pre/post processing. The demo app accomplishes the task of recovering a high resolution (HR) image from its low resolution counterpart.
The model used here is from source: Pytorch Super Resolution and accomodated into ONNX version with pre/post processing support.
- Install Xcode 13.0 and above (preferably latest version)
- A valid Apple Developer ID
- An iOS device or iOS simulator
- Xcode command line tools
xcode-select --install - Clone the
onnxruntime-inference-examplessource code repo
-
Install CocoaPods.
sudo gem install cocoapods -
In terminal, run
pod installunder<ONNXRuntime-inference-example-root>/mobile/examples/super_resolution/ios/ORTSuperResolutionto generate the workspace file and install required pod files.Note: At the end of this step, you should get a file called
ORTSuperResolution.xcworkspace. -
Open
<ONNXRuntime-inference-example-root>/mobile/examples/super_resolution/ios/ORTSuperResolution.xcworkspacein Xcode and make sure to select your corresponding development team underTarget-General-Signingfor a proper codesign procedure to run the app (only on device required, if running on iOS simulator can skip this step.) -
Connect your iOS device/simulator, build and run the app. Click
Perform Super Resolutionbutton to see performed result on displayed sample image.
Here's an example screenshot of the app:
