Google released the source code for an interesting project called: Deep Dream. I kind of find this interesting as it’s another try to get computers to learn, so maybe one day they posses some kind of artificial intelligence. So I decided to start my own experiments based on the information available on the internet. First of all it uses caffe which is a deep learning framework running only on Linux. As I have my workstation running on windows these days and didn’t want to reinstall or make it dual boot I decided to try it in a Virtual Box. I found a nice Wiki which explained the installation of caffe in Virtual Box and kubuntu with Cuda but without graphics driver support.
After Caffe was installed and tested. I got the source code from google which is actually an Ipython notebook, pretty cool! ones everything set-up my experiments could be started and I must say it’s mind boggling. I sort of tried to figure out the code but I’m a little bit lost at the moment I do understand the main functions but the results are pretty crazy.
So in short google has image recognition software that is used to determine what is in an image. the image recognition software has thousands of reference images of known things, which it compares to an image it is trying to recognize. So if you provide it with the image of let’s say a bird and tell it to recognize the image, it will compare the image to it’s references, find out that there are similarities in the image to images let’s say of birds, and it will tell you “there’s a bird in that image!”
But what if you use that software to make a program that looks for animals in images, and then you give it an image with no animals in and tell it that there is a bird in the image? The program will find whatever looks closest to a bird, and since it has been told there must be a bird in there somewhere, it tells you that is the bird. Now what if you take that program, and change it so that when it finds a bird-like feature, it changes the bird-like image to be even more bird-like? Then what happens if you feed the output image back in? What happens is the program will find the features that looks even the tiniest bit bird-like and it will make them more and more birdlike, making birds everywhere. Even if you feed it white noise, it will amplify the slightest most minuscule resemblance to a animal into a bird.
So google used a deep learning framework not only to recognize animals but a whole array of objects and their definitions. With the ipython notebook you kind of feed an image into the google learning model of objects and it tries to find the definitions which produces these altered images like in a dream.
You can see the Ipython notebook set-up on my Portfolio page on this subject.