Depth Estimation from Image

Generate a depth map from any photo using AI. Visualize how far objects are from the camera with colorized depth maps.

Upload any photo and instantly generate a colorized depth map using Depth Anything v2, a state-of-the-art monocular depth estimation model. The tool runs entirely in your browser using AI to analyze visual cues like perspective, occlusion, and texture gradients to estimate the relative distance of every pixel from the camera. Choose from multiple color palettes and view modes to visualize depth information.

Your data stays in your browser
Tutorial

How to Use the Depth Estimator

1
1

Upload Your Image

Drop an image or take a photo with your camera. Supports JPG, PNG, and WebP formats.

2
2

Choose a Color Palette

Select Viridis, Inferno, or Grayscale to visualize depth information in your preferred color scheme.

3
3

Generate the Depth Map

Click Estimate Depth and wait a few seconds while the AI model analyzes your image.

4
4

Explore and Download

Switch between view modes to compare original and depth map, then download the result as PNG.

Guide

Understanding Depth Estimation

What Is Monocular Depth Estimation?

Monocular depth estimation is the task of predicting the distance of every pixel in an image from a single camera viewpoint. Unlike stereo vision which uses two cameras, monocular methods rely on learned visual cues. Modern AI models like Depth Anything v2 use vision transformers trained on millions of images to recognize patterns such as perspective convergence, texture density changes, and atmospheric haze that indicate spatial relationships in a scene.

How Depth Anything v2 Works

Depth Anything v2 uses a DINOv2 Vision Transformer encoder paired with a Dense Prediction Transformer decoder. The model was trained using a teacher-student pipeline on 595,000 labeled synthetic images and 62 million pseudo-labeled real images. This approach achieves state-of-the-art accuracy with an absolute relative error of just 4.3% on standard benchmarks, outperforming previous methods like MiDaS by over 35%.

Relative vs. Metric Depth

This tool produces relative depth maps, meaning it shows which objects are closer or farther but does not give exact distances in meters. Relative depth is reliable for ordering objects by distance with over 95% accuracy. For actual metric measurements, specialized hardware like LiDAR sensors or stereo camera systems would be needed, as a single camera cannot determine absolute scale.

Limitations and Best Practices

Depth estimation works best with well-lit scenes containing diverse textures and clear depth variation. It may struggle with reflective surfaces like mirrors, transparent objects like glass, and repetitive patterns like uniform tiles. Very distant objects beyond 100 meters may have unreliable depth values. For best results, use images with clear foreground and background separation.

Examples

Depth Estimation Examples

Indoor Room Scene

A photograph of a living room with furniture at various distances from the camera.

1

Upload the room photograph to the tool.

2

Select the Viridis color palette for clear depth visualization.

3

Click Estimate Depth and wait for processing.

The depth map clearly shows the coffee table in the foreground (warm colors), the sofa in the midground, and the wall and windows in the background (cool colors). Objects are correctly ordered by depth with smooth transitions.

Outdoor Street Scene

A street photograph with pedestrians, cars, buildings, and the sky at the horizon.

1

Upload the street photograph to the tool.

2

Select the Inferno color palette for high-contrast depth visualization.

3

Click Estimate Depth and compare using side-by-side view.

Nearby pedestrians appear in warm colors while distant buildings and sky appear in cool tones. The road surface shows a smooth gradient from near to far, demonstrating the model's understanding of perspective.

Use Cases

Use Cases for Depth Estimation

3D Photo Effects

Create parallax and 3D photo effects for social media by using the depth map to separate foreground and background layers. Depth maps enable realistic zoom and tilt-shift effects that bring flat photos to life.

Photography Composition Analysis

Analyze the spatial composition of your photographs by visualizing depth layers. Understand how foreground, midground, and background elements relate to each other and improve your compositional skills with clear depth visualization.

Robotics and Computer Vision Research

Prototype monocular depth estimation pipelines for autonomous navigation, obstacle avoidance, and scene understanding. Test how well AI perceives depth from single camera feeds before deploying on real hardware systems.

Visual Effects and Post-Production

Generate depth maps for adding depth-of-field blur, fog effects, and volumetric lighting in video post-production. Use the depth information to create realistic atmospheric effects that respond to actual scene geometry.

Frequently Asked Questions

?How does depth estimation work from a single image?

The AI model analyzes visual cues like perspective lines, texture gradients, object sizes, and occlusion patterns to estimate relative depth for every pixel.

?Are the distances in the depth map accurate in meters?

The tool produces relative depth maps showing which objects are closer or farther. It does not provide absolute metric distances in meters.

?What AI model is used for depth estimation?

We use Depth Anything v2 Small, an ONNX-optimized vision transformer model. It downloads once and is cached in your browser for future use.

?How long does it take to process an image?

First use requires downloading the model (about 50 MB). After that, processing takes 2 to 10 seconds depending on your device.

?Does it work on iPhone and Android?

Yes, it works on all modern browsers including Safari on iPhone and Chrome on Android. You can also use your camera directly.

?What do the colors in the depth map mean?

In Viridis mode, yellow areas are close to the camera and purple areas are far away. Inferno uses yellow for near and black for far.

?Is my data private?

Yes. Everything runs locally in your browser using WebAssembly. No images are uploaded to any server. Your photos never leave your device.

?Is this tool free?

Yes. Completely free with no limits, no sign-up required, and no watermarks on the output depth maps.

Related Tools

Help us improve

How do you like this tool?

Every tool on Kitmul is built from real user requests. Your rating and suggestions help us fix bugs, add missing features and build the tools you actually need.

Rate this tool

Tap a star to tell us how useful this tool was for you.

Suggest an improvement or report a bug

Missing a feature? Found a bug? Have an idea? Tell us and we'll look into it.

Recommended Reading

Recommended Books on Depth Estimation, 3D Vision & Photogrammetry

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Professional Distance Measurement Tools

As an Amazon Associate we earn from qualifying purchases.

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked