protodemo depth

A photograph forgot how far away everything was.

A 19 megabyte model reads the picture back and works it out again — then leans the scene as you move, as if it had been three-dimensional all along. It has no idea what any of the objects are.

Step one

Load the model

It downloads into this tab and runs on your machine. The smaller one lives on this site and needs your graphics chip; the larger one runs anywhere but has to be fetched from elsewhere, and takes its time.

Step two

Pick a picture

Your own photo never leaves this tab — there is no server here to send it to.

Step three

What it worked out

Load a model and pick a picture, and the depth map will appear here beside it.
What the lean is, and is not. It warps the flat photograph rather than rebuilding the scene, so edges smear if you push it hard. That is honest to what the model hands over: one distance per pixel, and no idea what is behind anything.
Why the small one is fast and the big one is slow

The same model can be stored several ways, and the choice decides more than file size. These three are all Depth Anything V2 Small, measured on the machine this was built on:

BuildSizeOn a graphics chipOn the processor
4-bit + half19.1 MB410 msrefuses to load
4-bit blockwise26.1 MB9 s20 s
8-bit27.3 MB20 s

The smallest file is also the fastest by a factor of twenty, and it is the one that will not run at all without a graphics chip — because the half-precision numbers it stores are native to a GPU and rejected outright by the processor-based runtime. Smaller, faster and fussier all arrive together.

The middle one looks like the sensible compromise and is the worst of the three: larger than the fast one and slower than the compatible one. It was the obvious pick on paper, and measuring it is the only thing that revealed otherwise.

The one megabyte that decides where a model can live

This site is served by Cloudflare Pages, which refuses to publish any single file over 25 MiB — about 26.2 megabytes. That line decides whether a model sits in the same place as the page or has to be fetched from someone else's servers.

The 19 MB build clears it with room to spare, so it lives here. The 27 MB one misses by about a megabyte and is fetched from a public model hub instead. A megabyte is nothing, and it is also the whole difference between a page that is self-contained and one that depends on somebody else staying online.

The newer model is better, and does not run

Depth Anything V3 was published in 2026 and is better at this job. The browser build of it will not run, because whoever converted it left out the small file describing how to prepare an image before feeding it in — what size, what colour range. Nothing is wrong with the weights; there is simply no instruction sheet.

It could be guessed at, and guessing wrong would not throw an error. It would produce a depth map that looked plausible and was quietly mismeasured, which is the worst of the available outcomes. So this tile stays on the older model until someone publishes the missing file.

How the lean is made

The model returns one number per pixel: roughly, how near that pixel is. To lean the picture, every output pixel is sampled from a slightly shifted place in the original — near things shifted a lot, far things barely at all. That is why it reads as parallax.

It is also why it smears. A real camera move would reveal what is behind the near objects, and a photograph does not contain that. The model can tell you how far away the railing is; it cannot tell you what the railing is hiding.

Where the photographs came from

All three samples are CC0 (public domain) from Wikimedia Commons, chosen for having real depth structure rather than for being pretty: a path receding into woodland, a bridge with hard architectural perspective, and a street with objects at several distances.

Forest path by Seaq68 · Bir-Hakeim bridge by Pierre Blaché · Maracaibo street by Wilfredor. CC0 asks for nothing in return, but it costs nothing to say so.