Coder Social home page Coder Social logo

avik-pal / deepdream.jl Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 2.0 5.43 MB

Implementation of Google's Deep Dream in Julia using Flux

License: Other

Julia 100.00%
deepdream flux generated-dreams deep-learning visualization julia machine-learning

deepdream.jl's Introduction

DeepDream

NOTE : This project was meant for Julia 0.6. So it will fail to work with Julia 1.0 and the latest tagged version of Flux. However, an update is WIP

NOTE : If there is no GPU support available please checkout the cpu branch of this repo. The cpu code is not thoroughly tested.

INSTALLATION INSTRUCTIONS

Run this command in the Julia REPL

julia> Pkg.clone("https://github.com/avik-pal/DeepDream.jl.git")

USAGE INSTRUCTIONS

  1. Inorder to generate dreams without using octaves run the following command with your own parameters
julia> img = load_image("./examples/sky.jpg")
julia> load_model(5)
julia> DeepDream.make_step(img, 10, 0.005, true, "./examples/sky_dream_new.jpg")

Make sure to pass all the arguments to the make_step function call to avoid errors. Refer to the function definition to understand what each parameter means.

  1. To make use of octaves run the following commands
julia> img = load_image("./examples/sky.jpg")
julia> load_model(5)
julia> deepdream(img, 10, 0.005, 1.4, 4, "./examples/sky_dream_new.jpg")

Also be sure to checkout the function definition

  1. Incase you want to use any other model than the VGG19 model make sure to pass a function to load_model() which returns the model you want to use

  2. To generate guided dreams run the following code.

julia> guide = load_guide_image("./examples/rio.jpg")
julia> img = load_image("./examples/sky.jpg")
julia> load_model(5)
julia> deepdream(img, 10, 0.005, 1.4, 4, "./examples/sky_dream_guided_new.jpg", guided = true)

The guided_step function might be used independently like the make_step function.

  1. Even easier method is to place all your images in a ./images directory and call the function dream_batch function. Send a guiding image if necessary.

  2. recurdream might be used to generate frames from a given image and using writevideo after that generates a video file.

More indepth documentation is available for each and every function.

SOME EXAMPLES

Original Image Generated Image
Sky Deepdream on Sky
Game Deepdream on Game
Rio Deepdream on Rio
Rio Deepdream on Rio
Statue of Liberty Deepdream on Statue of Liberty
Original Image Guiding Image Generated Image
Sky Flowers Sky Dream guided by Flower
Sky Flowers Sky Dream guided by Flower

IMPLEMENTED

  1. Utilities to load, save and generate images
  2. Perform operations on Image
    • Zoom
  3. Utilities to load models
  4. Deep Dream Generator (non-guided)
  5. Generate deep dreams using Octaves
  6. Guided Deep Dreams

deepdream.jl's People

Contributors

avik-pal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jcdavie dave7895

deepdream.jl's Issues

Make project work for current version of Julia

I would be willing to put some work in to make this package compatible to Julia-1.0 or at least 1.6 with current versions of Flux, Metalhead, etc.

It wouldn't be ready very soon but can do it if there isn't any work ongoing.

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.