This is the GitHub repository for an end-to-end tutorial on How to Create a Cartoonizer with TensorFlow Lite, published on the official TensorFlow blog. The tutorial demonstrates the steps for TFLite model saving, conversion and all the way up to model deployment on an Android App. It's one of a series of the End-to-End TensorFlow Lite Tutorials. See the full list of TensorFlow Lite samples and learning resources on awesome-tflite.
Authors: (ML GDEs: Google Developers Experts for Machine Learning) Margaret Maynard-Reid and Sayak Paul
Reviewers: (Google TensorFlow team) Khanh LeViet and Hoi Lam
In this project repo, the ml folder contains the model files, and the instructions on how to save the model, and convert it to selfe2anime.tflite, and add metadata to it via either command line or a Colab notebook.
The android folder contains the Android source code and the instructions on how to build the Android app.
We used a Generative Adversarial Network (GAN) model proposed in this CVPR 2020 paper Learning to Cartoonize Using White-box Cartoon Representations. The pretrained weights were provided by the authors of the paper and available in their project GitHub repository here.
The original authors of White-box CartoonGAN are Xinrui Wang and Jinze Yu.
@InProceedings{Wang_2020_CVPR,
author = {Wang, Xinrui and Yu, Jinze,
title = {Learning to Cartoonize Using White-Box Cartoon Representations,
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June}, year = {2020} }
We would like to thank Khanh LeViet and Lu Wang (TensorFlow Lite team), Hoi Lam (Android ML), and Soonson Kwon (ML GDEs Google Developers Expert Program), for their collaboration and continuous support.