Giter Club home page Giter Club logo

deepdreamer's Introduction

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

Requirements

Installation

  1. Install NumPy, SciPy, Pillow and Caffe. On Ubuntu 17.10 installing caffe will usually install all other dependencies.
  2. Clone this project. git clone https://github.com/kesara/deepdreamer.git
  3. Go to project directory. cd deepdeamer
  4. Download deploy.prototxt from bvlc_googlenet into the project directory.
  5. Add line force_backward: true to deploy.prototxt file.
  6. Download bvlc_googlenet.caffemodel from bvlc_googlenet into the project directory.
  7. (Optional) Download 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.

Usage

  • Just deep dreaming python3 deepdreamer.py image.jpg
  • Create a deepdream gif python3 deepdreamer.py --gif true image.jpg
  • Create a deepdream video (requires ffmpeg) python3 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]
                      [image]

positional arguments:
  image

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

Examples

Deepdream Deepdream Deepdream Deepdream

deepdreamer's People

Contributors

kesara avatar fabioperez avatar isomerase avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.