https://github.com/milosgajdos/creep-dreamz
Deep Dream experiments inspired by Keras Deep Dream
https://github.com/milosgajdos/creep-dreamz
deep-dream deep-dream-experiments deeplearning keras-deep-dream neural-networks
Last synced: about 2 months ago
JSON representation
Deep Dream experiments inspired by Keras Deep Dream
- Host: GitHub
- URL: https://github.com/milosgajdos/creep-dreamz
- Owner: milosgajdos
- License: apache-2.0
- Created: 2018-02-18T23:32:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T04:28:32.000Z (over 2 years ago)
- Last Synced: 2025-04-06T10:02:44.335Z (about 2 months ago)
- Topics: deep-dream, deep-dream-experiments, deeplearning, keras-deep-dream, neural-networks
- Language: Python
- Homepage:
- Size: 991 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# creep-dreamz
Deep Dream experiments
This project is a "cleaned up" rewrite of [keras Deep Dream](https://github.com/keras-team/keras/blob/master/examples/deep_dream.py). It provides a `CreepDream` class which implements Deep Dream based on the supplied parameters.
The project no longer depends on `scipy` module for image manipulation that was replaced by `TensorFlow` native [tf.image](https://www.tensorflow.org/api_guides/python/image) image manipulation module.# Example Usage
You can find a simple example in `main.py` file which demonstrates how to use `CreepDream`:
```
usage: main.py [-h] -i INPUT -o OUTPUT -m MODEL [-iter ITERATIONS] [-s STEP]
[-oct OCTAVE] [-ocs OCTAVESCALE] [-mxl MAXLOSS]Creep Dreamz with Keras.
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
Path to the input data
-o OUTPUT, --output OUTPUT
Path to the output data
-m MODEL, --model MODEL
Keras model name
-iter ITERATIONS, --iterations ITERATIONS
Number of gradient ascent steps per scale
-s STEP, --step STEP Gradient ascent step size
-oct OCTAVE, --octave OCTAVE
Number of scales at which to run gradient ascent
-ocs OCTAVESCALE, --octavescale OCTAVESCALE
Size ratio between scales
-mxl MAXLOSS, --maxloss MAXLOSS
Maximum gradient ascent loss
```# Example run results
```
python3 main.py -i "random_man.jpg" -o "random_man_creep.png" -m "InceptionV3" -oct 4 -ocs 1.4 -s 0.01 -iter 15 -mxl 10.0
```Original image:
Creep Dreamt image:
[1] Image source: [https://commons.wikimedia.org/wiki/File:Handsome-man-by-Willy-Volk-Creative-Commons.jpg](https://commons.wikimedia.org/wiki/File:Handsome-man-by-Willy-Volk-Creative-Commons.jpg)