TotalApp Docs

Depth Estimation

Find out what is nearer to the camera and what is farther in a photo.

Overview

Depth Estimation looks at an ordinary photo and works out, for every point, how near or far it is from the camera. The result is a depth map: a picture in which colour (or brightness) tells the distance. Depth maps are used for 3D photo effects, background blur and focus changes, and to help robots and other software understand a scene. It runs the Depth Anything V2 (small) model.

You find it in the Computer Vision group. Unlike the other screens in that group, it runs entirely in your browser: the picture never leaves your device and no AI credits are used.

How to use it

  1. Drag a picture onto the drop area, or click it to choose a file. PNG, JPEG and WebP files up to 20 MB are accepted.
  2. Click Estimate depth. The first time, the model is downloaded; this takes a moment and happens once. After that the browser keeps it.
  3. The depth map appears on the right. Warm colours are near, cool colours are far. Move the pointer over the map to read how near a point is compared with the closest point in the picture.
  4. Under View choose the Colour map, Grey-scale (white is near, black is far) or Over the photo, which blends the colours over your picture; the Strength slider sets how strongly. Click Download PNG to save what you see.

Tip

Photos with a clear foreground and background, such as a person in front of a room or a street scene, give the clearest maps. Save the grey-scale view to use it as a depth layer in an editing tool.

Good to know

  • Depth is relative. The map ranks the points of this one picture from near to far; it does not give distances in metres, and two different pictures cannot be compared.
  • Mirrors, glass, water and very dark or featureless areas can confuse the model.
  • The model is tens of megabytes and is downloaded once from the Hugging Face Hub, then kept in the browser’s cache. Your computer does the work, so it is faster with a graphics card that supports WebGPU and slower without one.
  • Because nothing is sent to a server, this screen has no plan restrictions, no AI credits and no per-minute limit. The picture is scaled down to 1,024 pixels on its long side first.

Frequently asked questions

Why does the first run take longer?
The model is downloaded the first time. The progress is shown next to the button. Later runs start straight away.
Can it tell me how many metres away something is?
No. It shows which things are nearer than others in the same picture, not real distances.
Is my picture uploaded?
No. It is processed in your browser and does not leave your device.