Buy me a coffee
Image

Depth Map Generator

Generate a depth map from any image with an on-device AI model. Grayscale or colormap output, downloadable PNG. Free, private, no upload. Runs on your device — nothing is uploaded, nothing is stored.

Original
Depth map

Your depth map will appear here

Runs a small AI depth-estimation model entirely in your browser. The model downloads once from a CDN on first use, then estimates depth on-device with WebGPU when available — nothing is uploaded.

About Depth Map Generator

This depth map generator estimates how far away each part of a photo is and draws the result as an image. Drop in a PNG, JPG or WebP, press Generate, and you get a depth map the same shape as your picture, ready to download as a PNG. It is free, needs no account, and the AI model runs inside your browser rather than on a server.

The model is Depth Anything V2 (small), loaded through Transformers.js and ONNX Runtime. It uses WebGPU when your browser offers it and falls back to WebAssembly otherwise. The output is grayscale by default, which is the form 3D and parallax tools expect, and you can switch the display to the Inferno or Viridis colour maps to read the depth more easily. Changing the colour map recolours the existing result instantly without running the model again.

The depth is relative, not measured: it tells you which parts are nearer or farther than others, not distances in metres.

Why this runs on your device

The honest trade-off is the first run. The model has to be downloaded before it can do anything — roughly 27 MB on the WebAssembly path and about 99 MB when WebGPU is used — so the first depth map takes noticeably longer than later ones, and a progress bar shows the download. The browser keeps the model afterwards, and nothing about your photo is ever uploaded. In exchange you get no queue, no daily limit and no watermark.

How to use Depth Map Generator
  1. Drop a PNG, JPG or WebP photo onto the original panel or click to choose one.
  2. Pick Grayscale for a depth channel you will reuse, or Inferno or Viridis for a colour view.
  3. Press Generate. On the first run, wait for the model to download; after that it runs from the browser's stored copy.
  4. Download the depth map as a PNG. You can switch the colour map before downloading without regenerating.
Limitations and trade-offs
  • The first run downloads the model (about 27 MB on WebAssembly, about 99 MB on WebGPU) and is slow on a weak connection. Later runs reuse what the browser has stored.
  • The result is a relative depth estimate from a single image. It is not a metric measurement and it can be wrong on mirrors, glass, fog, very dark scenes and flat or repetitive surfaces.
  • Inputs are limited to PNG, JPG and WebP files up to 15 MB. The only export is a PNG of exactly what is shown, so a colour map you picked is baked into the file; choose Grayscale before downloading if you need a clean depth channel.
  • Speed depends on your hardware. Without WebGPU the model runs on the CPU and a large photo can take a while.
Frequently asked questions