A generative neural network (DCGAN) built from scratch in PyTorch. It learns to draw pixel-art islands in side view.
- Resolution: 64×64 (saved as 512×512 PNGs)
- Data: synthetic dataset generated procedurally (
data.py) - Model: DCGAN - generator and discriminator built from scratch (
model.py) - Training: ~30 minutes on CPU
pip install -r requirements.txtpython3 train.pyEach epoch saves a preview of a single island to out/epoch_*.png,
and a generator checkpoint to checkpoints/gen_latest.pt.
python3 generate.py --count 5 --out out/island.pngCreates out/island_0.png ... out/island_4.png - one island per file.
Without --count, a single island is written to out/island.png.
Useful flags:
| Flag | Default | Description |
|---|---|---|
--ckpt |
checkpoints/gen_latest.pt |
Generator checkpoint |
--count |
1 |
How many islands to generate |
--seed |
42 |
Seed for reproducibility |
--scale |
8 |
Upscale factor (64->512) |
data.py # procedural island generation 64×64
model.py # DCGAN: Generator + Discriminator
train.py # training loop
generate.py # generate islands from a checkpoint
utils.py # PNG saving / CLI
MIT - see LICENSE.



