Depth Anything
A local AI depth estimation model that processes images and video, with relative and metric depth models and Hugging Face Transformers support.

Depth Anything estimates depth from ordinary images for developers and researchers who need depth maps without a depth camera. Its pretrained models show which parts of a scene are nearer or farther away; separate fine-tuned models estimate metric depth.
- Relative depth maps: Estimate the depth relationships within a single image, with finer detail than Depth Anything V1.
- Metric depth: Use models fine-tuned for indoor or outdoor scenes to estimate distances rather than relative depth alone.
- Images and video: Process individual pictures, image collections or video, though the method estimates depth from images and larger models give better consistency between video frames.
- Model sizes: Choose Small, Base or Large pretrained models, or use their weights as a starting point for further fine-tuning.
The Python implementation runs locally, and a local Gradio demo provides a visual interface. An online demo is also available. Hugging Face Transformers offers another way to use the models, but that route requires a connection to Hugging Face and can produce slightly different predictions from the repository implementation.
The repository uses the Apache 2.0 license. The project also provides the DA-2K benchmark, with sparse depth annotations for evaluating depth estimation models.