How to Create a Cartoonizer with TensorFlow Lite?

3 views
Skip to first unread message

Margaret Maynard-Reid

unread,
Sep 9, 2020, 12:30:18 PM9/9/20
to ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, natal...@google.com

Hi All,


We are excited to announce that we have published another end-to-end tutorial of How to Create a Cartoonizer with TensorFlow Lite


Here’s the link to the tutorial: https://blog.tensorflow.org/2020/09/how-to-create-cartoonizer-with-tf-lite.html

Please retweet / like it on Twitter: https://twitter.com/TensorFlow/status/1303727371841875969


The tutorial covers the following:


  • Export model checkpoints as SavedModel with TF 1.x

  • Convert the SavedModel to a TFLite model in TF 2.x with different quantization recipes

  • Model inference in Python

  • Add metadata to the TFLite models

  • Benchmark the TFLite models

  • Deploy TFLite model to Android in just a few lines of code with ML Model Binding


The Android app uses TensorFlow Lite models converted from the state of art White-box CartoonGAN.

Unlike the Selfie2Anime project, this one does not have the biased data issues which is why we were able to publish the tflite models on TensorFlow Hub.

The models are smaller and faster, and cartoonizes not only the selfies but also other types of images.


It has been an incredible learning and collaboration experience.

Many thanks to the support of the TensorFlow Lite team, TF Hub team, and the ML Kit team; and the ML GDE community for making this happen. 

Thanks to the TensorFlow team for your help publishing it on the official TF blog.


This is part of an ongoing effort writing a series of E2E TFLite tutorials with sample code, and we are looking forward to more upcoming ones!


Best,


Margaret / Sayak


Sayak Paul

unread,
Sep 9, 2020, 12:32:04 PM9/9/20
to Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, Natalie Dao
Cheers, Margaret! 

We would really appreciate it if you could quickly try out the models and share the outputs with us over Social Media. All the instructions are available in the blog post. 

Sayak Paul | sayak.dev


Luiz Gustavo Martins

unread,
Sep 9, 2020, 12:50:20 PM9/9/20
to Lesly Zerna, Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Shuangfeng Li, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, Natalie Dao
This is great!!! well done!!! I'll retweet!!!


   Gus

On Wed, Sep 9, 2020 at 5:32 PM Lesly Zerna <lesly.ze...@gmail.com> wrote:
guys! this is awesome! 
sharing right now! and i'll try to make some time this weekend to try it out! 

cheers! 


Best regards,
Lesly



--
You received this message because you are subscribed to the Google Groups "ML GDE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml-gde+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ml-gde/CAA2dEiW43VTSDCCFq5d6A923ZfvNJei1mZbxmCQK95O0n_P0Dw%40mail.gmail.com.

jerry kurata

unread,
Sep 9, 2020, 4:16:12 PM9/9/20
to Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, natal...@google.com
How cool!!  Good work!

--
You received this message because you are subscribed to the Google Groups "ML GDE Project - E2E Model Deployment" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml-gde-e2e-deplo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ml-gde-e2e-deployment/CAA2dEiW43VTSDCCFq5d6A923ZfvNJei1mZbxmCQK95O0n_P0Dw%40mail.gmail.com.

Soonson Kwon

unread,
Sep 9, 2020, 6:58:52 PM9/9/20
to Christiaan Prins, Sebastian Trzcinski-Clément, Dawid Ostrowski, Alina Rakhmatoullina, jerry kurata, Lei Yu, Yi Zhou, Shiyu Hu, Scott Swarthout, Paris Hsu, Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Vinit Modi, Josh Gordon, Natalie Dao
+Sebastian Trzcinski-Clément +Dawid Ostrowski +Alina Rakhmatoullina 

Congrats Margaret, Sayak for publishing it!
And really happy to see continued outcome from the E2E project. :-)

On Thu, Sep 10, 2020 at 7:00 AM Christiaan Prins <cpr...@google.com> wrote:
+Lei Yu +Yi Zhou +Shiyu Hu +Scott Swarthout +Paris Hsu who worked on ML Model Binding

Very cool post Margaret - looking forward to trying it out!
--Christiaan

Khanh LeViet

unread,
Sep 9, 2020, 7:41:27 PM9/9/20
to Soonson Kwon, Christiaan Prins, Sebastian Trzcinski-Clément, Dawid Ostrowski, Alina Rakhmatoullina, jerry kurata, Lei Yu, Yi Zhou, Shiyu Hu, Scott Swarthout, Paris Hsu, Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Hoi Lam, Lu Wang, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Vinit Modi, Josh Gordon, Natalie Dao
Congrats Margaret and Sayak!

This is an amazing piece of work involving multiple TF products and also an excellent showcase of community contribution :)
--
    
Le Viet Gia Khanh (カン)
TensorFlow Developer Advocate


Shibuya Stream 
3-21-3 Shibuya, Shibuya-ku, Tokyo
150-0002, Japan

George Soloupis

unread,
Sep 10, 2020, 12:18:58 AM9/10/20
to Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, natal...@google.com
Congrats Margaret and Sayak,

Can't wait to build and try it myself!!



--
You received this message because you are subscribed to the Google Groups "ML on Mobile OS Working Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlwg-mobile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mlwg-mobile/CAA2dEiW43VTSDCCFq5d6A923ZfvNJei1mZbxmCQK95O0n_P0Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Siddhant Agarwal

unread,
Sep 10, 2020, 2:49:19 AM9/10/20
to George Soloupis, Google Developer Experts in India, Biswajeet Mallik, Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Shuangfeng Li, Luiz GUStavo Martins, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, natal...@google.com

Many congratulations Margaret and Sayak! 👍☺
Sharing this further with India GDE Group +Google Developer Experts in India :)

Regards,
Sid


Shuangfeng Li

unread,
Sep 10, 2020, 3:11:26 AM9/10/20
to Siddhant Agarwal, George Soloupis, Google Developer Experts in India, Biswajeet Mallik, Margaret Maynard-Reid, ML GDE, ML on Mobile OS Working Group, ML GDE Project - E2E Model Deployment, Sayak Paul, Khanh LeViet, Hoi Lam, Lu Wang, Soonson Kwon, Luiz GUStavo Martins, Arun Venkatesan, Christiaan Prins, Vinit Modi, Josh Gordon, natal...@google.com
Awesome work, Margaret and Sayak! 

Akshay Bahadur

unread,
Sep 10, 2020, 4:06:12 AM9/10/20
to Dawid Ostrowski, Jerry Wu, Khanh LeViet, Alina Rakhmatoullina, Arun Venkatesan, Christiaan Prins, Hoi Lam, Josh Gordon, Lei Yu, Lu Wang, Luiz GUStavo Martins, ML GDE, ML GDE Project - E2E Model Deployment, ML on Mobile OS Working Group, Margaret Maynard-Reid, Natalie Dao, Paris Hsu, Sayak Paul, Scott Swarthout, Sebastian Trzcinski-Clément, Shiyu Hu, Shuangfeng Li, Soonson Kwon, Vinit Modi, Yi Zhou, jerry kurata
Awesome tutorial.
I am definitely trying it out over the weekend.
--
Regards,
Akshay Bahadur


On Thu, Sep 10, 2020 at 1:20 PM 'Dawid Ostrowski' via ML GDE <ml-...@googlegroups.com> wrote:
This is awesome!

On Thu, Sep 10, 2020 at 1:45 AM Jerry Wu <je...@ap-mic.com> wrote:
Awesome!!!

'Khanh LeViet' via ML GDE <ml-...@googlegroups.com>於 2020年9月10日 週四,07:41寫道:
You received this message because you are subscribed to the Google Groups "ML GDE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml-gde+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ml-gde/CAMDTK-7zQfoxmZu8iU18xZzGMc_O-2kigwrY%2BmzBOD-sAo1AAg%40mail.gmail.com.
--

=====================================================
Jerry Wu Ph.D. Candidate
Chief Executive Officer
Google Developers Expert (Machine Learning)

2F., No.73, Ln. 72, Guangfu S. Rd., Da’an Dist., Taipei, Taiwan (R.O.C.)
WeChat: dsjerry2017
APMIC OpenTalk(歐奔頭殼股份有限公司)
=====================================================


--
Dawid Ostrowski | Program Manager | Google Developers Experts | Google Switzerland

--
You received this message because you are subscribed to the Google Groups "ML GDE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml-gde+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ml-gde/CAKCEWQp1N40NCN1BcoeM1mdZSci6xja7JHZ5ZQnu48Q3yVzp7g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages