Create your own Basquiat with Deep Learning for much less than $110 million

You may have read today that a painting by Jean-Michel Basquiat was just sold for $110 million. Is this a tribute to his genius or a sign of very, very broken times? Probably both!

Illustration for Create your own Basquiat with Deep Learning for much less than $110 million

This is a beautiful haunting piece. However, most of us don’t have that kind of money to spend on art (or anything else, for that matter), so we can forget about hanging a Basquiat on our walls.

Or can we? Is there a way we could create artwork in the same style as Basquiat automatically? Enter Deep Learning once again :)

“A Neural Algorithm of Artistic Style”

This fascinating research paper was authored by Leon A. Gatys, Alexander S. Ecker and Matthias Bethge in 2015. In their own words, they use “neural representations to separate and recombine content and style of arbitrary images, providing a neural algorithm for the creation of artistic images”.

In a nutshell, they use a Convolutional Neural Network (VGG-19, which we’ve used before) to extract style elements from a well-known painting and apply them to an arbitrary image.

This means that we can take any painting by a famous artist and apply its style to one of our own pictures. MXNet provides all the code that we need to do this, so let’s build our own Basquiat right away.

Neural style with MXNet

It couldn’t be simpler. Just fire up a GPU instance running the Deep Learning AMI or run the MXNet Docker image on your own machine. In the MXNet source directory, go to example/neural-style.

Now, you have two options. You can either load the neuralart.ipynb notebook in Jupyter and follow along, or run the nstyle.py script directly from the CLI.

With the CLI, this is how to run the script. There are a few parameters that you can tweak, but the most important are obviously the path to the style image (in our case, the Basquiat painting) and the path to the content image (here, my silly mug).

Yeah… I know.
Yeah… I know.

Once you launch the script, it will run for 1000 epochs and save intermediate images to the output directory every 50 epochs. Here are some (resized) examples as well as the final image.

Yeah… I know.
Epoch 50
Yeah… I know.
Epoch 250
Yeah… I know.
Epoch 500
Yeah… I know.
Epoch 750
Yeah… I know.
Final image

So there you go. Pretty impressive result! The main elements of Basquiat’s style are clearly visible. I should use this as my profile picture on LinkedIn :D

Anyway, now you can build a picture in the style of your favorite artist in just a few minutes! Maybe one day we’ll see AI-inspired art being sold at auction houses for ridiculous prices, who knows?

Until then, thanks for reading and have fun with AI art!

Epoch 500
Final image
Step 6 screenshot from Create Your Own Basquiat with Deep Learning for Much Less Than  110 Million
Step 9 screenshot from Create Your Own Basquiat with Deep Learning for Much Less Than  110 Million