Introduction

Can artificial intelligence make your photo a Van Gogh painting? The blending of technology and art has been an interesting topic, particularly the power to convert images into famous artistic styles. Using Convolutional Neural Networks (CNNs), Leon A. Gatys et al. in their 2015 paper, A Neural Algorithm of Artistic Style, split and re-mix an image's content and style to produce beautiful artistic interpretations. I coded this up in Python using PyTorch last week, and this post delves into the mathematics behind it. Look forward to seeing major figures from the paper explain how it works. (along with some cool ass visualizations)

image.png

Background on Convolutional Neural Networks (CNNs)

image.png

Separating Content and Style Representations

What are Gram Matrices: Capturing Style

For a layer $l$ with a feature map $F^l \in \mathbb{R}^{N_l \times M_l},$ the matrix is $G^l_{ij} = \sum_k F^l_{ik} F^l_{jk}$ where $N_l$ is the number of filters and $M_l$ is the spatial size (height * width)