Skip to content

Neural Cellular Automata for texture generation in tinygrad following Self-Organising Textures by Eyvind Niklasson et. al..

License

Notifications You must be signed in to change notification settings

0xekez/neural-cellular-automata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an implementation of Self-Organising Textures by Eyvind Niklasson et. al. using a neural network framework called tinygrad.

Install dependencies:

python3 -m pip install Pillow numpy matplotlib tinygrad torchvision

To train a model:

python3 train.py

To create a gif called agif.gif of the trained or currently training model:

python3 -i
>>> from viz import create_gif
>>> create_gif("agif.gif")

Model hyperparamaters can be adjusted in train.py, vgg16.py contains a tinygrad VGG-16 model which loads its weights from the torchvision pretrained model. loss.py contains various loss functions for minimizing style-loss, or maximizing the activation of a unit the Resnet image classifier.

Tinygrad is much slower than pytorch for training. See pytorch.py for a pytorch version of this software which has been modified to produce monochrome textures.

About

Neural Cellular Automata for texture generation in tinygrad following Self-Organising Textures by Eyvind Niklasson et. al..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages