Skip to content

A simple script for feeding an image to a dreaming neural network.

Notifications You must be signed in to change notification settings

andreasoprani/dreamify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dreamify

Let inception_v3 dream about images and see what happens.

Based on a blog post by Google AI and a notebook by François Chollet.

Requirements:

  • numpy
  • tensorflow
  • tqdm

Instructions

python3 dreamify.py + arguments

Arguments:

--path (default=""): path to the image to use (provide if no url is provided).
--url (default=""): url of the image to use (provide if no path is provided).
--name (default=""): name of the folder inside Images to store the image retrieved through the url.
--depth (default=3): number of iterations of the dreaming process.
--n_images (default=1): number of outputs.
--seed (default=0): random seed for reproducibility.
--max_coeff (default=10): maximum value for the layer coefficient in the loss function (sampled between 0 and max_coeff).
--max_loss (default=20): maximum loss function value before breaking loop.

At each iteration until depth is reached, a random layer is selected for dreaming.

Result

Originally, this project was about album covers. So, here's an example of the result when the input is Yoshimi Battles the Pink Robots by The Flaming Lips (all settings as default).

Original album cover.

Layer 172 is selected with a coefficient of 5.93.

Then, Layer 192 is selected with a coefficient of 6.03.

Finally, Layer 195 is selected with a coefficient of 8.47.

About

A simple script for feeding an image to a dreaming neural network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages