Icon designed by Freepik from www.flaticon.es
The CartoonGan model can be found in tfhub and was developed by Sayak Paul. In this repo we build an iOS application to perform the cartoonization with an iPhone.
Original 1 | Original 2 |
---|---|
Cartoon 1 | Original 2 |
Main Screen | Loading Screen |
- Use the TensorFlow Lite Swift API
- Understand the pre & post processing of images with Swift, using the CoreGraphics framework. The main challenge is that the TensorflowLite Swift API takes the raw Data and it needs a lot of pre/post processing and understanding of the images and its content.
The app is built with UIKit using programmatic components only. The class CartoonGanModel contains the logic to perform inference, pre/post processing and error handling for all of these cases.
To get the app started, run pod install
to install the dependencies. The model is already downloaded and uploaded into the repo in CartoonGan/Model
since it weights ~1.7M.