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:
- https://github.com/hochthom/cppn-keras
- https://github.com/hardmaru/cppn-tensorflow
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.
![]() |
![]() |
![]() |
See requirements.txt
. Install all of them via
pip3 install -r requirements.txt
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) [Default500
] image-width--y
(int) [Default500
] image-height--n
(int) [Default1
] 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
If you want to change the look of your results, try to tune the following parameters:
--variance
and--bw
script-parameterskernel_initializer
,depth
andactivation
of the CPPN inbuild_model()
- Implement Video-Functionality