Free downloadA Picture Painted by Maths
A small trainer that repaints one photo with tens of thousands of soft blobs of colour, trained by gradient descent on your own Mac. No camera, no image model. With the exact prompt that made Claude Code write it, a setup guide in plain words and my example run: the result, the blob view and the training video.
What is inside
- train.py The trainer: blobs, renderer, loss, Adam, blurry first then sharp.
- make_video.py Turns the saved frames into a side-by-side video.
- PROMPT.txt The exact prompt that wrote the trainer.
- examples/ My result, the blob view and the training video.
- Guide The idea in plain words, setup, your own picture and honest limits.
A Mac with Apple Silicon (or a PC with an NVIDIA GPU), Python 3.10+ and about 1 GB for PyTorch. A full run takes about 20 minutes on an M-series Mac. ffmpeg for the video. The guide is in English.