Monocular Depth Estimation: Predict Relative Depth from One Image

TL;DR
Monocular Depth Estimation is a Dense Prediction Transformer (DPT) built on a DINOv2 Base vision backbone and fine-tuned on the KITTI Vision Benchmark.
It converts a single RGB image into a dense relative-depth visualization without requiring stereo cameras or LiDAR.
What the Model Is
Monocular Depth Estimation, now listed on AIOZ AI, estimates relative scene depth from a single image.
The underlying model, facebook/dpt-dinov2-base-kitti, combines the dense-prediction architecture of DPT with a pre-trained DINOv2 Base ViT-B/14 backbone, then adapts it to autonomous-driving imagery from KITTI.
Its output represents relative spatial structure across the image, helping identify which regions appear closer or farther away.

How the Model Processes an Image
The workflow includes five main stages:
- Load the image: Prepare a single RGB image for processing
- Extract visual features: Process the image through the DINOv2 Base backbone
- Predict dense depth: Use DPT to estimate depth across the image
- Normalize the result: Convert the prediction into an 8-bit disparity representation
- Create the output: Render the resulting depth visualization
Input and Output
input_image: Required local path or HTTP(S) URL for a JPEG, PNG, WebP, or BMP image
device: Optional cpu, cuda, or gpu; defaults to CUDA with CPU fallback
output_image: A normalized disparity PNG named depth_map.png
Each output is normalized independently, so pixel values should not be compared numerically across different images.
Technical Design and Runtime
The model uses DPT for dense prediction and DINOv2 Base ViT-B/14 as its visual backbone.
Developer requirements include:
- Python 3.10 or newer
- Git LFS for the model checkpoint
- Optional CUDA-capable GPU
A compatible GPU can accelerate inference, while CPU execution is also supported. Large source images may require additional memory during output interpolation.
Key Technical Details
- Task: Monocular depth estimation
- Architecture: DPT (Dense Prediction Transformer)
- Backbone: DINOv2 Base, ViT-B/14
- Model:
facebook/dpt-dinov2-base-kitti - Training domain: KITTI Vision Benchmark autonomous-driving imagery
- Backbone resolution: 518 pixels
- Patch size: 14
- Image sources: Local path or HTTP(S) URL
- Runtime devices: CPU, CUDA, or GPU selection with CPU fallback
- License: Apache License 2.0
Limitations
- Monocular depth does not preserve absolute metric scale
- Performance may decline on scenes that differ substantially from KITTI driving imagery
- Open-sky regions may contain artifacts because KITTI LiDAR ground truth does not include sky measurements
- No benchmark metrics are provided for this packaged implementation
Explore It on AIOZ AI
Monocular Depth Estimation provides a focused workflow for generating relative depth maps from single images.
Explore Monocular Depth Estimation on AIOZ AI and evaluate how its depth output fits your scene-understanding workflow.
FAQ
Q1: Does the model return absolute distance measurements?
No. It returns a relative disparity visualization normalized independently for each image, not directly comparable metric distances.
Q2: Why do closer objects appear brighter?
The output uses disparity, or inverse depth. Higher disparity represents regions estimated to be closer to the camera, so those areas appear brighter.
Q3: Can the model run without a GPU?
Yes. CPU execution is supported, while CUDA can be used for acceleration when available.