Skip to content

wottpal/cppn-keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPPN in Keras 2

Implementation of a Compositional Pattern Producing Network in Keras 2 with some command-line utilities to easily generate your own images.

Code heavily borrowed from:

Wallpapers

I've generated a bunch of patterns in high resolution (2560×1600) and made them available as download. Feel free to tweet it out if you like them.

Wallpapers-Preview

Other Examples

Requirements

See requirements.txt. Install all of them via

pip3 install -r requirements.txt

Usage

Execute the script with -s to save generated images to disk and/or with -p to display plots of them with pyplot. Additionally the following options are available:

  • --x (int) [Default 500] image-width
  • --y (int) [Default 500] image-height
  • --n (int) [Default 1] amount of images to be generated
  • --variance (int) set this for a fixed variance of the initialized network-weights - Otherwise they will be generated randomly
  • --bw set this flag to generate images in b&w
  • --path (string) [Default ./results] specifies the save-path for images

Example: Save 5 black & white wallpapers for a 13'' Retina screen.

python3 cppn.py -s --n 5 --x 2560 --y 1600 --bw

Parameters to play with

If you want to change the look of your results, try to tune the following parameters:

  • --variance and --bw script-parameters
  • kernel_initializer, depth and activation of the CPPN in build_model()

Todo

  • Implement Video-Functionality

Releases

No releases published

Packages

No packages published

Languages