Depth Anything Small
Xenova/depth-anything-small-hf
published Jan 2024 · updated Jun 2025
Depth Anything Small is a depth estimation model that predicts a depth map from a single image using a DPT architecture with a DINOv2 backbone.
specs
| Task | Depth Estimation |
| Architecture | DPT with DINOv2 backbone |
| Parameters | 24.8M |
| License | Apache-2.0 |
about this model
Key capabilities
- Produces a per-pixel depth map from a single RGB image
- Supports zero-shot inference on unseen domains and randomly captured photos
- Optimized for client-side inference with ONNX weights
Output example
The model outputs both a raw depth tensor and a visualizable depth image. For example, given an input image of bread, the model generates a depth map as shown below:
The model is licensed under Apache-2.0 and is part of the Depth Anything release collection on Hugging Face, with over 70 community Spaces using the original PyTorch version.
best for
- ·Monocular depth estimation in web or Node.js applications
- ·Zero-shot depth prediction on diverse, unlabeled images
FAQ
The API accepts an image URL or base64-encoded image data; the model outputs a depth map as a tensor and a visual depth image.
Depth Anything Small has 24.8M parameters, making it faster and more lightweight than the base or large variants, while still offering strong zero-shot performance.
The model is licensed under Apache-2.0.
Use the OpenAI-compatible endpoint with your API key, sending a request with the image input and specifying the model name.
The model was trained on approximately 62 million images, including about 1.5 million labeled and 62 million unlabeled images.
We're benchmarking and onboarding Depth Anything Small as a hosted, OpenAI-compatible API. Sign in for free credit and be ready when it lands, or tell us you want it and we'll prioritize it.