项目作者: jcrodriguez1989

项目描述 :
A cannabis-trained DeepDream.
高级语言: Python
项目地址: git://github.com/jcrodriguez1989/weeddream.git
创建时间: 2021-01-12T14:29:01Z
项目社区:https://github.com/jcrodriguez1989/weeddream

开源协议:

下载


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:

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

Analyze Individual Layer Effects

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

  1. # Let's say we want to train layer 10 with weight 3, we should type:
  2. weeddream$ python Script/02_analyze_individual_layers.py 10 3
  3. # If we want to train each individual layer for each weight from 1 to 10, we should type:
  4. weeddream$ for layer in {1..10}; do
  5. > for weight in {1..10}; do
  6. > python Script/02_analyze_individual_layers.py $layer $weight
  7. > done
  8. > 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:

  1. weeddream$ python Script/03_weeddream.py