Skip to content

Latest commit

 

History

History
68 lines (40 loc) · 2.28 KB

README.md

File metadata and controls

68 lines (40 loc) · 2.28 KB

deep_dream_challenge

Deep Dream Challenge code by @SIrajology on Youtube

Overview

This is the code for the Deep Dream challenge for 'Learn Python for Data Science #5' by @Sirajology on YouTube. The code uses the Tensorflow Machine Learning library to generate a trippy image from a given input image.

Dependencies

Install missing dependencies using pip

Meanwhile I got problem with matplotlib: http://tkinter.unpythonic.net/wiki/How_to_install_Tkinter solves it.

do

wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip

extract to ../data/

copy paste the tensorflow_inception_graph.pb

in data folder

Use to extract frames : http://stackoverflow.com/questions/8679390/ffmpeg-extracting-20-images-from-a-video-of-variable-length

ffmpeg -i scenary.mov -r 2 -f image2 output_%05d.jpg

Put all frames in a folder ./video

Demo Usage

Once dependencies installed via pip, run the demo script in terminal via

python deep_dream_1.py

Use to make video ffmpeg -f image2 -r 2 -i output_%05d.jpg -vcodec mpeg4 -y movie.mp4

Challenge statement

The instructions are

  1. Add a function to the existing deep dream python file that converts not just an image, but a video clip to deep dream.

HINT Think of a video as a collection of images (frames).

Output

https://www.youtube.com/watch?v=VMuTKClTazk

Credits

Always Sirajology Thanks Google and Liu I've reformatted this code to make it easier to grok.

free video from : https://www.videezy.com/nature/3309-aerial-view-of-mountain-peaks-free-stock-footage