Comparing Artificial Artists

Kyle McDonald
Sep 1, 2015 · 6 min read
Excerpt of figure 2 from “A Neural Algorithm of Artistic Style”

Content reconstruction, excerpt from figure 1.
Style reconstruction, excerpt from figure 1.
In the style of “Composition VII” by Kandinsky
In the style of “The Scream” by Munch
In the style of “Seated Nude” by Picasso
In the style of “The Shipwreck of the Minotaur” by Turner.
In the style of “The Starry Night” by Gogh
Tübingen in the style of Kandinsky, in an attempt to recreate figure 3.
Comparison of Kai’s implementation without smoothing (left) and with.
Gandalf in the style of Picasso. Left image produced by Andrej Karpathy.

Generated using Satoshi’s example.

Update

In the style of “Composition VII” by Kandinsky.
In the style of “The Scream” by Munch.
In the style of “Seated Nude” by Picasso
In the style of “The Shipwreck of the Minotaur” by Turner
In the style of “The Starry Night” by Gogh
Gandalf in the style of “A Muse” by Picasso

Final Update

In the style of “Seated Nudeby Picasso

Footnotes

def gram(layer):
N = layer.shape[1]
F = layer.reshape(N, -1)
M = F.shape[1]
G = np.zeros((N, N))
for i in range(N):
for j in range(N):
for k in range(M):
G[i,j] += F[i,k] * F[j,k]
return G
function gram(input)
local k = input:size(2)
local flat = input:view(k, -1)
local gram = torch.mm(flat, flat:t())
return gram
end
conv1_1F,conv2_1F,conv3_1F,conv4_1F,conv5_1F, = [ reshape2(x) for x in [conv1_1,conv2_1, conv3_1, conv4_1,conv5_1]]
conv1_1G,conv2_1G,conv3_1G,conv4_1G,conv5_1G, = [ Fu.matmul(x, x, transa=False, transb=True) for x in [conv1_1F,conv2_1F, conv3_1F, conv4_1F,conv5_1F]]
def gram(x):
F = layer.reshape(layer.shape[1], -1)
return np.dot(F, F.T)

Kyle McDonald

Written by

Artist working with code.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade