Homework 4: Neural Style Transfer

Jason Zhang

Part 1: Content Reconstruction

I tried optimizing the content reconstruction loss at different convolutional layers. I found that optimizing the reconstruction loss at earlier layers was able to better re-create the original content image.

Original Content image:

Using only conv_8, I optimized with two different random noise initializations. The two images look slightly different due to the different initializations.

Part 2: Texture Synthesis

Similar to before, I ran the optimization to only minimize the texture loss at various layers of the network. I found that the earlier layers capture more of the original colors and textures of the style image.

These are generated from this style image:

Next, I used two different random noise vectors to optimize only with style loss. This time, I used conv layers 1 through 5. Using multiple layers seemed to help significantly.

Part 3: Style Transfer

I used a style weight of 2e7 and dropped the number of steps to 10 since I was running out of time.

Style transfer results:

The image can be initialized from the content image or from random noise. I found that initializing with the content made the optimization easier to match the content of the image.

Style transfer on some of my favorite images (including from past projects). Some of the results are a bit frightening.