Easy to configure Python program that make use of Google's DeepDream.
Switch branches/tags
Nothing to show
Latest commit c02a589 Nov 14, 2015 @kesara kesara Fixed typos.
Failed to load latest commit information.
deepdreamer Minor changes. Nov 14, 2015
.gitignore Updated .gitignore. Jul 13, 2015
LICENSE Initial commit Jul 6, 2015
README.md Fixed typos. Nov 14, 2015
deepdreamer.py Add GPU mode Oct 24, 2015
requirements.txt Initial commit Jul 6, 2015


Deep Dreamer

Easy to configure Python program that make use of Google's DeepDream



  1. Install NumPy, SciPy, Pillow and Caffe. NumPy, SciPy & Pillow can be installed via PIP.
  2. Download deploy.prototxt from bvlc_googlenet.
  3. Add line force_backward: true to deploy.prototxt file.
  4. Download bvlc_googlenet.caffemodel from bvlc_googlenet.
  5. (Optional) If instead you want to incept using MIT's "Places" neural net, download the Places205-GoogLeNet from their website. You need the deploy_places205.protxt and googlelet_places205_train_iter_2400000.caffemodel files from the archive.
  6. Make sure the files are in the root directory of DeepDreamer.


  • Just deep dreaming python deepdreamer.py image.jpg
  • Create a deepdream gif python deepdreamer.py --gif true image.jpg
  • Create a deepdream video (requires ffmpeg) python deepdreamer.py --video video.mp4

Configuration options

usage: deepdreamer.py [-h] [--zoom {true,false}] [--scale SCALE]
                      [--dreams DREAMS] [--itern ITERN] [--octaves OCTAVES]
                      [--octave-scale OCTAVE_SCALE] [--layers LAYERS]
                      [--clip {true,false}] [--gpuid GPUID]
                      [--network {bvlc_googlenet,googlenet_place205}]
                      [--gif {true,false}] [--reverse {true,false}]
                      [--duration DURATION] [--loop {true,false}]
                      [--framerate FRAMERATE] [--list-layers] [--video VIDEO]

positional arguments:

optional arguments:
  -h, --help            show this help message and exit
  --gpuid GPUID         enable GPU with id GPUID (default: disabled)
  --zoom {true,false}   zoom dreams (default: true)
  --scale SCALE         scale coefficient for zoom (default: 0.05)
  --dreams DREAMS       number of images (default: 100)
  --itern ITERN         dream iterations (default: 10)
  --octaves OCTAVES     dream octaves (default: 4)
  --octave-scale OCTAVE_SCALE
                        dream octave scale (default: 1.4)
  --layers LAYERS       dream layers (default: inception_4c/output)
  --clip {true,false}   clip dreams (default: true)
  --network {bvlc_googlenet,googlenet_place205}
                        choose the network to use (default: bvlc_googlenet)
  --gif {true,false}    make a gif (default: false)
  --reverse {true,false}
                        make a reverse gif (default: false)
  --duration DURATION   gif frame duration in seconds (default: 0.1)
  --loop {true,false}   enable gif loop (default: false)
  --framerate FRAMERATE
                        framerate for video (default: 24)
  --list-layers         list layers
  --video VIDEO         video file


Original Image Deepdream
Original Deepdream
From completely black (#000000) image Deepdream
From completely white (#ffffff) image Deepdream
Original Deepdream
Original Deepdream