View on GitHub

Machine Learning Final Project By Jaxson Hawkins

A Neural Algorithm of Artistic Style

In this project I attempted to recreate the findings from the paper title ‘A Neural Algorithm of Artistic Style’ by Gatys, Ecker, and Bethge. The paper explains an approach to produce artistic images using convolutional neural networks. This is achieved by taking the content of one image and combining it with the style of another. The main finding of this paper were that content and style in a convolutional neural network can be independantly manipulated to produce meaningful artistic images.

Procedure

To reproduce the results I used Kautenja’s python implementation found here. This implementation used the CPU (default) version of tensorflow. On my personal machine this was incredibly slow and would have taken around 7 hours to compute one artistic image. I instead installed the GPU version of tensorflow. Paired with the CUDA drivers, I was able to use my graphics card to aid in the computations. I also reduced the original content image by half to speed up the process. These tricks brought down the computation time to around 10 minutes per image.

One drawback to using a reduced image size was that the resulting images were not as high of quality as the images in the paper. Despite this, the results were still very much identifiable.

Results

First, I used the content of the image above and combined it with each of the styles of the images on the left side of the table below. Their results are located on the right side of the table.

Style Images My Artistic Result

I then used two different content images with different style images. The first content image is the classic windows desktop background and the second is an image of Burrus Hall at Virginia Tech. The results are below in their respective tables. This gives validity to the process even with different datasets (style and content).

Content Image
Style Images My Artistic Result
Content Image
Style Images My Artistic Result

In conclusion, I think my results validate the conclusions from the original paper. Extracting style from one image and content from another produces a combined image that results in a relatively artistic image. Viewing only the output images, one is able to identify the image that the style came from without fail. Choosing the input content image is a little more dificult but still possible.

References To Relevant Papers

  1. “A Neural Algorithm of Artistic Style”
  2. “Image Style Transfer Using Convolutional Neural Networks”
  3. “Separating style and content on a nonlinear manifold”