Google recently announced that it has open-sourced its code for creating (weird) “wild and crazy” images using a type of artificial intelligence known as deep learning. Deemed the deepdream project, it is now available on GitHub. Deepdream relies on the open-source Caffe deep learning framework. Deep learning involves training artificial neural networks on a large pile of data – for example, pictures of dogs – and then tossing them a new piece of data, like a picture of a wolf, to receive an educated guess about the pictures.This software release comes two weeks after Google Research demonstrated how it could visualize what neural networks are seeing when they’re deep learning.
“We have seen a lot of interest and received some great questions, from programmers and artists alike, about the details of how these visualizations are made,” software engineers Alexander Mordvintsev, Christopher Olah, and Mike Tyka wrote in a blog post on Wednesday, July 1st. “We have decided to open source the code we used to generate these images in an IPython notebook, so now you can make neural network inspired images yourself!”
The trio continued about the highly customizable software: “We encourage readers to experiment with layer selection to see how it affects the results,” Google says in the IPython notebook (.ipynb). “Execute the next code cell to see the list of different layers. You can modify the make_step function to make it follow some different objective, say to select a subset of activations to maximize, or to maximize multiple layers at once. There is a huge design space to explore!”
The code itself has been designed to be as independent as possible and Google suggests the following to get started:
- NumPy, SciPy, PIL, IPython, or a scientific distribution of python such as Anaconda or Canopy.
- Caffe deep learning framework (Installation instructions)
After you have everything set up you can supply an image, choose what layers of the network to enhance, how far to zoom in, and how many iterations to apply. Pre-trained networks can be plugged in as well. It’s going to be a lot of fun to see what images people are going to be able to generate. So, if you come up with something really cool be sure to post it to Google+, Facebook, or Twitter with #deepdream so other researchers, programmers, and artists can check out your stuff.