A couple of weeks ago Google Research blogged about a visualization technique which they named as “INCEPTIONISM” that could be used to make a pre-trained neural network generate intriguing picture. Alternatively, this technique can also be used to understand how well the neural network is learning at each layer. To get a high-level idea of what Google did, I recommend reading the original blog post Inceptionism: Going Deeper into Neural Networks.

This blog post got a lot of publicity in both the Computer Vision community and print media. So yesterday, Google announced in this blog post that it had open sourced the code. The code is available on GitHub. To clone the repository, enter the below command in the terminal.

git clone https://github.com/google/deepdream.git

In order to run the code, there are a few dependencies -

  1. Scientific Python Stack – IPython Notebook, numpy, scipy, matplotlib.
  2. Caffe

You will also need to download the GoogLeNet model.

wget http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel
mv bvlc_googlenet.caffemodel <path to Caffe installation>/caffe/models/bvlc_googlenet/

Now let’s take a look at some of the mind blowing results!!

NSA Headquarters

NEBULA

Since the neural network was trained mostly with images of animals, in most of the images you will see animals beings rendered in the images with dogs outnumbering any other creature on the planet. So, I decided to render crocodiles and was lucky to find some!!

CROCODILES

TAJ MAHAL INCEPTIONISM

I also created a ~ 66 frame TAJ MAHAL INCEPTIONISM video (20fps).

Here are some of the frames from the video.

Frame 5 -- TAJ MAHAL INCEPTIONISM
Figure 1: Frame 5 -- TAJ MAHAL INCEPTIONISM [JPG]
Frame 18 -- TAJ MAHAL INCEPTIONISM
Figure 2: Frame 18 -- TAJ MAHAL INCEPTIONISM [JPG]
Frame 30 -- TAJ MAHAL INCEPTIONISM
Figure 3: Frame 30 -- TAJ MAHAL INCEPTIONISM [JPG]
Frame 56 -- TAJ MAHAL INCEPTIONISM
Figure 4: Frame 56 -- TAJ MAHAL INCEPTIONISM [JPG]

To discover more, use the hashtag #deepdream on Twitter.

If this wasn’t enough some researchers even released a few projects related to “INCEPTIONISM”. Here are a couple of them.

Dockerized deepdream: Generate ConvNet Art in the Cloud

git clone https://github.com/VISIONAI/clouddream.git

Let’s make it brain-dead simple to launch your very own deepdreaming server (in the cloud, on an Ubuntu machine, Mac via Docker, and maybe even Windows if you try out Kitematic by Docker)!

cnn-vis

git clone https://github.com/jcjohnson/cnn-vis.git

Inspired by Google’s recent Inceptionism blog post, cnn-vis is an open-source tool that lets you use convolutional neural networks to generate images.


Update

Check out my friend Adrian’s bat-county repository on GitHub.

A lightweight, extendible, easy to use Python package for deep dreaming and image generation with Caffe and CNNs.


A lot of people wanted to try the deepdream code, but were unable to setup the environment. As a follow-up, I will soon blog about setting up Caffe on Ubuntu 14.04(CPU) and running the deepdream code.

UPDATE - Check out my new post on Caffe Installation on Ubuntu 14.04 (CPU).