This repository is reimplementation on PyTorch code from this blog
We can formulate task as using self-organizing model of cellular automata to reconstruct predefined pattern from any state.
Example of output from trained model:
All experiments was on running Ubuntu OS, NVDIA 2080 TI GPU.
* Python 3.6+
* **16GB+ RAM Memory**
* CUDA 9.1+ (For GPU training)
* 10GB GPU Memory (For GPU training)
- Run
pip install -r requirements.txt
. - Run
python main.py
to use CPU orpython main.py --use-cuda
to use GPU - Wait while training ends, in sonic/infer_log folder will be generated images
- (Optional) Run for resize in <images_folder> folder
for X in *; do convert $X -interpolate Nearest -filter point -resize 480x480 $X; done
- To make GIF run
convert -delay 20 -loop 1 <images_folder>/*.jpg myimage.gif
-
For GPU(with --use-cuda parameter) or CPU(w/o --use-cuda parameter) you can change next parameters in config:
- decrease both values in ITER_NUMBER tuple
- decrease BATCH_SIZE
- decrease TARGET_SIZE
-
For CPU only usage:
- decrease POOL_SIZE