Skip to content
/ cppn-tf Public

Generate high resolution abstract images with vanilla neural networks

Notifications You must be signed in to change notification settings

jbial/cppn-tf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compositional Pattern Producing Networks in Tensorflow

Generate high resolution, intensely stimulating images with random neural networks.

Arguments

python generate.py takes as arguments:

  • --im-size: Size of the image.
  • --batch-size: Number of images to generate.
  • --units: Number of units per layer.
  • --z-dim: Size of input latent vector.
  • --layers: Number of layers in the network.
  • --channels: Number of channels in output images.
  • --scale: Scaling factor for the images.
  • --name: Name of image for saving. Default is None, specify for saving.
  • --frames: Number of frames for the gif. Default is None, specify an integer to save a gif file.
  • --scale-list: Comma-separated list of scales for the images.
  • --display-cols: Number of columns for showing image batches.
  • --same-z: Use the same latent vector for all param lists.

Usage

Generating Images: python generate.py

alt text

Generating Gifs: python generate.py --frames=10 --name="tanhtanh.gif"

alt text

Experiments

  • The --scale parameter acts as a "zooming" parameter in the image space.

  • The --z-dim parameter acts a control parameter on the frequency of generated features.

  • Both --units and --layers control the noise level in the generated images, which makes sense since these parameters adjust the number of weights which dictate the 'representational power' of the neural network. Try setting --layers or --units to 0 and then 64 for yourself.

  • There are a lot of experiments that can be performed. In this case, hyperparameter tuning can be fun!

The effect of exponentially increasing the scale parameter (all other params default): --scale-list=1,5,25,125

The effect of exponentially increasing the z dimension (all other params default): --z-dim from {1,8,64,512}

Acknowledgement

This project was adapted from David Ha's amazing blog post

About

Generate high resolution abstract images with vanilla neural networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages