├── Vagrantfile
├── README.md
└── dreamify.py
/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure(2) do |config|
5 | config.vm.box = "data-science-toolbox/dst"
6 |
7 | # Salt to taste
8 | config.vm.provider "virtualbox" do |v|
9 | v.memory = 2048
10 | v.cpus = 4
11 | end
12 |
13 | config.vm.provision "shell", inline: <<-SHELL
14 | sudo apt-get update
15 | sudo apt-get install -y git bc wget
16 | sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
17 | sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
18 | sudo apt-get install -y libopenblas-base libopenblas-dev
19 | git clone https://github.com/BVLC/caffe.git
20 | cd caffe
21 | cp Makefile.config.example Makefile.config
22 | sed -i "s/# CPU_ONLY := 1/CPU_ONLY := 1/" Makefile.config
23 | sed -i "s/BLAS := atlas/BLAS := open/" Makefile.config
24 | make -j`nproc` all
25 |
26 | # Uncomment the below if you're feeling paranoid. We're not running in production or anything, here.
27 | # make -j`nproc` test
28 | # make -j`nproc` runtest
29 |
30 | make -j`nproc` pycaffe
31 | for req in $(cat python/requirements.txt); do sudo pip install $req; done
32 | echo 'export PYTHONPATH=/home/vagrant/caffe/python:$PYTHONPATH' >> /home/vagrant/.profile
33 | if [ ! -f "/home/vagrant/caffe/models/bvlc_googlenet/bvlc_googlenet.caffemodel" ]; then
34 | wget -q http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel -O /home/vagrant/caffe/models/bvlc_googlenet/bvlc_googlenet.caffemodel
35 | fi
36 | SHELL
37 | end
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # image-dreamer
2 | "Dreams" images, such as shown in the [Google Research blog post on "Inceptionism"](http://googleresearch.blogspot.ch/2015/06/inceptionism-going-deeper-into-neural.html).
3 |
4 | ## What's it do?
5 | Using a deep neural network, it turns images like this:
6 |
7 | 
8 |
9 | Into this:
10 |
11 | 
12 |
13 | Read the [Google Research blog post on "Inceptionism"](http://googleresearch.blogspot.ch/2015/06/inceptionism-going-deeper-into-neural.html) to learn more about how it works.
14 |
15 | ## Installation
16 | * Install [Vagrant](https://www.vagrantup.com/)
17 | * Clone this repo
18 | * `cd image-dreamer`
19 | * `vagrant up`
20 | * Go grab a coffee, this will take a while
21 |
22 | ## Usage
23 | * Copy any JPEG images you want to "dreamify" into the `image-dreamer` directory
24 | * `vagrant ssh`
25 | * `cd /vagrant`
26 | * `ipython dreamify.py