AI&Creativity: Style Transfer (and you can do it as well)

Popularization of Artificial Intelligence
As previously mentioned, the year 2018 is a milestone for popularity and accessibility of open source Artificial Intelligence applications. Previously you also could install the TensorFlow based solutions on your system, with appropriate know-how and programming skills.
Google Colaboratory helps with online “Nootbooks”, interactive installations of AI applications: AI researchers provides the application code with own comments, explanations and possibility to run and change the code.
It’s a perfect edut-AI-nment!
So for example Alex Mordvintsev, developer of Google Deep Dream, along with other AI researchers demonstrate various fascinating notebooks on topic of “Differentiable Image Parameterization”.
Transfer the style
In this experiment the Deep Learned systems examine two source images — and transfer their style. Not only colors, but also the shapes and patterns. You can find and play around with this experiment here.
Already default image demonstration is very convincing.
As a initial style source is used a painting by Van Gogh:

As a target image is used a photo by Big Ben

Both images are analyzed by the system in layers (style layer, content layer etc.) — then, simply said, the layer options and parameters are transfered, merged and a new image is generated.

Look at the sky with new generated stars, look at the perfect colors and bridge shapes! Doesn’t it look amazing? (Small note: interestingly, the time on Big Ben is changed).
Let’s experiment
And so if we choose our own source and target images, we can try out, how precisely the artistic style is transferred. Of course, it’s rather AI based re-interpretation of the style. The art value of the result is in the eye of the beholder.
I always use my userpic for testing issues — a selfie I’ve once shot in a polished iron marble in the experiment museum Schloss Freudenberg, Hesse, Germany.

So this is how my userpic would look like when Van Gogh would paint it:

The curvy paintbrush strokes, colors, dynamic of the skies and petrified movements of the trees — everything here looks perfect. The system even built in a star in the final result — where in original you can see just a road.
Let’s try my another favorite — René Magritte with his “La chateau des Pyrenees” (1959).

In this case the system probably cannot properly recognize the surreal motives of the both images, so the result is still interesting. The stone structure is everywhere.
And here comes MERZ-artist Kurt Schwitters with his Merz-Art (Mz 601, 1923).

Interestingly, the patterns of collage are perfectly reflected — you can almost recognize typographical artifacts. The picture is even segmented in collage-alike patterns.
Try out the system on your own — run the cells, change the image sources in the code and see, what you get. Post in comments your interesting style transfer experiments!
In my series “AI & Creativity” I want to observe with you the newest tendencies, try out new tools and present the #AI artists.
