Neural Art

comments

Fairly recently, a paper titled A Neural Algorithm of Artistic Style was released and several implementations of the algorithm appeared. Like many, I found it to be quite impressive and decided to try it out for myself. Below are some the results of applying that technique to some images from the popular television show Doctor Who, as well as to myself.

Note: You can click the resulting image for each of the outputs below to view a gif of the neural network applying the technique to the original image. It might take a bit to download the gif, so be patient. I decided not to inline the gif image to save those viewing this page on mobile from having to download a bunch of ~4mb gifs in order to save some bandwidth.

Doctor Who

Being a fan of Doctor Who, I figured that I would try this out on some photos from the show.

To start, Starry Night seems to be a good fit for this image of the TARDIS floating out in space.

Starry Night

TARDIS floating in space TARDIS styled using Starry Night </img>

You can see the dark tower from the original photo coming through in various places throughout the image. The TARDIS is still visible and is the brightest part of the image.

In the fifth series, there is an episode where the Doctor sees a painting of his TARDIS exploding, painted by — according to the episode — Vincent van Gogh himself. This would also seem to be a good fit for applying Starry Night.

TARDIS exploding TARDIS exploding styled using Starry Night </img>

Again you can see the dark tower in a few spots. I think this one turned out really well with a lot of the original artwork taking shape in this resulting image.

Earlier in that season, the Doctor and Amelia Pond travel back in time and meet up with van Gogh. The actor they found to play van Gogh bears a resemblance to the famous painter himself, so I decided to try using the style from one of his self portraits on the actor.

van Gogh self portrait

van Gogh actor van Gogh actor styled using a van Gogh self portrait </img>

I was curious to see the effect of applying it to the same image, but this time after having cropped the image around the actor.

van Gogh actor cropped van Gogh actor cropped styled using a van Gogh self portrait </img>

It looks like both turned out well, however I think the network did a better job on the cropped image. Cropping enlarged the details of the image so that the large brush strokes are still able to preserve a lot of detail. For example, compare the eyes in the two images. You can see the eyes in the first image, but they blend in to some extent with the rest of the face. The white of his eyes and the definition of his nose are more defined in the second image, which is more inline with the original self portrait.

I decided to also use a still from the episode where van Gogh, the Doctor, and Amelia are all together. Again, I applied the self portrait to the image.

van Gogh, the Doctor, and Amelia van Gogh, the Doctor, and Amelia styled using a van Gogh self portrait </img>

Aside from the BBC copyright notice making it's way into the result a bit, I'd like to think that van Gogh painted this himself and this is proof that the Doctor really did travel back in time. It looks pretty good!

Myself

I also attempted to run the network on an image of myself, styled to some famous paintings. Some results turned out better than others, but overall the network did a reasonable job.

an image of myself

donelli self portrait myself styled using the donelli self portrait </img>
frida self portrait myself styled using the frida self portrait </img>
mona lisa myself styled using the mona lisa </img>
picasso self portrait myself styled using the picasso self portrait </img>
seated nude myself styled using the seated nude </img>
shipwreck myself styled using the shipwreck </img>
starry night myself styled using the starry night </img>
the scream myself styled using the scream </img>
van gogh self portrait myself styled using the van gogh self portrait </img>
woman with hat by matisse myself styled using the woman with hat by matisse </img>

All the results look pretty good! The only one keeping me up at night is the Mona Lisa-styled image because the result is kinda creepy, but otherwise the styles applied were done reasonably well.

Overall I’d say that this technique is pretty cool and I think the results turned out pretty darned good.