Code Monkey home page Code Monkey logo

deepdreamanim's Introduction

DeepDream Animator

This tool helps to create animations with deepdream. Extract frames from videos, process them with deepdream and then output as new video file. Frame blending option is provided, to ensure "stable" dreams across frames. A preview function make rapid iterations possible. Optionally guided dreaming & optical flow can be used.

deepdreamanim

How to

  1. Extract Video
    python dreamer.py --input myvideo/video.mp4 --output myvideo --extract 1

  2. Run DeepDream
    python dreamer.py --input myvideo --output myvideo/frames

  3. Create Video
    python dreamer.py --input myvideo/frames --output myvideo/deepdreamvideo.mp4 --create 1

(change "myvideo" to your directory/file name)

(change the path of the caffe model inside dreamer.py to where your model is )

deepdreamanim

Settings

Use Optical Flow & Guided Dreams & GPU
python dreamer.py --input myvideo --output myvideo/frames --octaves 4 --octavescale 1 --iterations 10 --jitter 32 --zoom 1 --stepsize 1.5 --blend 0 --layers inception_3b/output --gpu 1 --flow 1 --guide guide/flowers.png

Create a preview (currently does not work with flow)
python dreamer.py --input myvideo --output myvideo/frames --preview 600

Tweak settings
python dreamer.py --input myvideo --output myvideo/frames --preview 600 --octaves 4 --octavescale 1.4 --iterations 10 --jitter 32 --zoom 1 --stepsize 1.5 --blend 0.5 --layers inception_3a/output inception_3b/output

(Preview changes Images to width of choice, original files not changed)

(Try using multiple layers, it will cycle through them from frame to frame.)

Batch Processing

Use the above commands and stack them by putting a ";" inbetween commands.
python dreamer.py --input myvideo --output myvideo/frames;python dreamer.py --input myvideo2 --output myvideo2/frames

deepdreamanim

Examples

DeepDream Music Video Musiv Video

Optical flow + Guided Dreaming tests test

Creative Request

It would be very helpful for other deepdream researchers, if you could include the used parameters in the description of your youtube videos.

Requirements

  • Python
  • Caffe (and other deepdream dependencies)
  • FFMPEG
  • CV2 (if you use optical flow)

Audio

The tool currently does not handle audio. Check out DeepDreamVideo by @graphific

deepdreamanim

Credits

Samim | Samim.io | @samim

deepdreamanim's People

Contributors

samim23 avatar

Watchers

 avatar  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.