a photo, reduced to 256 numbers, rebuilt by something that's never seen it

Afterimage

Stare at something bright, close your eyes, and for a second it's still there — not the thing itself, just an impression of it, already fading. This is roughly that, except the thing doing the remembering is a small neural network, and the impression is exactly 256 numbers.

Upload a photo below and nothing gets stored, uploaded, or looked up anywhere — it never leaves your browser. What comes back isn't a copy of your photo; it's a fresh reconstruction, built in real time by a decoder that's never seen it before, using only 256 numbers as its guide. The full mechanics — what a CNN and an autoencoder actually are, and why training and rendering turn out to be two completely separate things — are in "how this actually works," further down, once you've seen it do something.

01 — upload

Give it a photo

Any photo works, but treat this as a memory made real, not a print of your original — the goal was never a pixel-perfect copy.

Works well: one clear subject filling most of the frame — a face, a pet, a skyline, a single object — with decent light and a simple background. Works less well: busy group shots, subjects that are small or far away, heavy text, or anything so dark or blurry the subject isn't obvious to begin with. The network only gets 256 numbers to describe whatever you give it — the simpler the ask, the more faithful the impression.

Choose a photo or drag one here

Debug: reference latent check

Loaded via ?debugLatent=reference. The two images below should match pixel-for-pixel — if they don't, the JavaScript decoder has diverged from the exported weights.

computed in this browser
reference output
training/reference_output.png