Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.82 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.82 KB

CartoonGan for iOS with TensorFlow Lite

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.

Screenshots

Original 1 Original 2
Original 1 Original 2
Cartoon 1 Original 2
Cartoon 1 Cartoon 2
Main Screen Loading Screen
Main Screen Loading Screen

Objectives

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

App

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.