TensorFlow Hub — Create an Artistic Picture by a ML App

2 min readMar 8, 2022

I think many readers are not good at Python coding like me, but are interested in using ML (Machine Learning) applications. So today I will introduce a new platform: TensorFlow Hub, where many pre-trained Python apps are provided. The pre-trained ML programs can be used directly on Google Colab. For example, here I want to introduce one of the example apps for making a photo with an artistic style by machine learning.

Make a photo in an artistic style

This pre-trained program can be found in the tutorials on the tf hub at: https://www.tensorflow.org/hub/tutorials/tf2_arbitrary_image_stylization?authuser=1, and it can be run on Google Colab platform.

Figure 1 shows an example of what it can create. The first picture on the left is a photo of a turtle, which is used as a content image, the second picture in the middle is the masterpiece “The Scream” painted by Edvard Munch in 1893. The third picture on the right is the one created by the pre-trained machine learning program which is claimed to synthesize an artistic turtle painting in Edvard Munch’s The Scream style.

Figure 1 A machine learning program for creating art paintings. Source: TensorFlow Hub — Tutorial (https://www.tensorflow.org/hub/tutorials/tf2_arbitrary_image_stylization?authuser=1)

How to Run the Program at COLAB?

A step by step video is prepared to show how to run the program at COLAB, it is available at my Youtube: https://youtu.be/vzMqIE60v04

TensorFlow Hub Community

TensorFlow Hub not only provides pre-trained programs, but also a ML programming community with some learning courses. We can learn and discuss more about machine learning together from this platform, and you are welcome to share your learning experience and machine learning programs with us.


ecyY (Edward Yiu) — easy to understand why, easy to study why. Finding the truths scientifically is the theme.