Giter VIP home page Giter VIP logo

weeddream's Introduction

WeedDream - A cannabis-trained DeepDream approach

Code to reproduce the findings presented at the "Can Artificial Intelligence Dream of Cannabis?" blog post.

Usage

Adding Images for Training

The images used to train Weedception_v1 are not my property, and therefore I cannot share them. To retrain the model you must provide your own images. To do this, in the TrainingImages/ folder there should be a sub-folder for each category to be used, and within each sub-folder its corresponding images. As an example, in each TrainingImages/ sub-folder, there is included one example image.

Training the Weedception_v1 Model

To retrain inception, file 01_retrain_inception.py should be executed, for this, run the following from a bash console:

weeddream$ mkdir Models # Create the folder to save the trained model.
weeddream$ python Script/01_retrain_inception.py 

Analyze Individual Layer Effects

To create dreams using only one layer and one weight run the following:

# Let's say we want to train layer 10 with weight 3, we should type:
weeddream$ python Script/02_analyze_individual_layers.py 10 3

# If we want to train each individual layer for each weight from 1 to 10, we should type:
weeddream$ for layer in {1..10}; do
>     for weight in {1..10}; do
>         python Script/02_analyze_individual_layers.py $layer $weight
>     done
> done

Using WeedDream to Dream With the Selected Setting

To use WeedDream to dream on a image, with the selected settings (layers 2 with weight 2, 6 with 5, and 9 with 4), run the following:

weeddream$ python Script/03_weeddream.py

weeddream's People

Contributors

jcrodriguez1989 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

weeddream's Issues

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.