Back to floatbird
Live · browser · on-device

diorama

Drop in any photo and diorama estimates its depth right in your browser, then turns the flat image into a little 3D relief you can tilt. The foreground slides against the background like a shoebox diorama. Export a short looping “3D photo” to share. A built-in sample is interactive the moment the page loads, no upload and no account. Nothing ever leaves the browser.

Why it exists

Turning a single flat photo into a 3D scene you can move through normally means uploading it to a service that wraps the trick in an account and credits. diorama runs the whole thing in the browser tab instead: the depth model and the rendering are both on-device, so you get the “huh, that has depth now” moment the instant you tilt, and your photo never leaves your machine.

How it works

A monocular depth model (Depth-Anything V2 Small) runs on-device through transformers.js, with a WebGPU fast path and a WebAssembly fallback. From one ordinary photo it predicts how near or far every pixel is: no second camera, no depth sensor.

That depth map is handed to a small WebGL shader (via three.js) that maps the photo onto a finely subdivided plane and pushes each point toward or away from the camera by its depth. Tilting the plane, with your mouse or your phone’s gyroscope, reveals real parallax between the foreground and the background. Hit export and a scripted tilt sweep is recorded to a looping WebM.

The model weights (a few tens of MB) download once and are cached, and they only load the first time you bring your own photo. The built-in sample is a procedurally drawn layered landscape with its own hand-authored depth, so it tilts immediately with nothing to download. No backend, no account, no API key.