Machine learning explained with gifs: style transfer

About style transfer

Pioneered in 2015, style transfer is a concept that uses transfers the style of a painting to an existing photography, using neural networks. The original paper is A Neural Algorithm of Artistic Style by Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge.

Here are a few examples taken from it:

Style transfer example from the original paper

Style transfer example from the original paper

How it works

This gif is meant to give you a rough idea on how style transfer works in the orignal paper:

Style transfer explained with a gif (click to enlarge)

Style transfer explained with a gif (click to enlarge)

Although I tried to make the gif self-explanatory, here are a few more details:

The paper is really easy to read, I really recommend having a look

Bonus: how to calculate a Gram Matrix

(This explanation comes from Alexander Jung’s summary of the paper)

More ressources

Style transfer today

Since the original paper, style transfer improved a lot, both in speed and quality. Here’s an example of what you can do with the latest paper: