What actually runs
DepthSnap does the conversion inside your browser tab: a monocular depth model estimates distance per pixel, then a stereo pass rebuilds a left and right view from it. Nothing is uploaded and there is no server in the loop. This page is for people who want the details.
Pipeline
- Depth — a small vision transformer (Depth Anything V2, ViT-S, fp16) runs through WebGPU. Video frames use a 392×392 input; photos use 518×518 for a little more detail.
- Stereo rebuild — forward reprojection with a z-buffer, background-side hole filling and a 3-tap edge softening, then bilinear sub-pixel sampling. Disparity is expressed as a fraction of eye width, so soft = 0.003, medium = 0.007, strong = 0.010.
- Encode — the browser's own encoder (WebCodecs) produces H.264 in mp4, falling back to VP9/WebM. The mp4 is then tagged as stereoscopic (
st3d, pasp) so players switch to side-by-side on their own.
Measured on an M2 MacBook Air, Chrome
| Stage | Before | Now |
| Depth inference, one pass | 626 ms | 88 ms |
| Stereo rebuild, per frame | 206 ms | 33 ms |
| Frame decode, per frame | 108 ms | 16 ms |
| 3-second clip, depth on every frame (72 frames) | — | 18.4 s |
| 3-second clip, default (depth every 2nd frame) | — | 7.9 s |
Timed in the page itself, not in a benchmark harness. Nobody is promising real-time here: a 30-second clip at 24 fps takes roughly 80 seconds with the default settings, and about half again as long with depth on every frame. Machines without a usable GPU are several times slower again.
What changed
- Half-precision weights — the model file went from 96 MB to 48 MB and inference from 519 ms to 312 ms with no visible quality change (correlation with the fp32 output: 0.99991).
- LayerNorm fusion — the original export had each normalisation split into eight tiny operations, which means eight GPU dispatches instead of one, 28 times over. Fusing them into single nodes took the graph from 895 to 615 nodes and inference to 223 ms.
- A newer model — Depth Anything V2 small is both better and cheaper here: 161 ms at the same 518 input, with cleaner edges on thin structures.
- Smaller video input — video frames run at 392 instead of 518: 88 ms. Photos keep 518 because they are a single pass and worth the extra detail.
What this is not
Depth from a single 2D image is a guess, not a measurement. Thin structures, mirrors, transparent objects and fast motion can land at the wrong distance, and a scene with almost no parallax (a flat wall, a telephoto shot) will look flat no matter what the settings say. When that happens, lower the 3D strength rather than raising it — strong settings amplify the errors along with the depth.
Open the converter to try it on your own file, or read the conversion guide.