You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This work presents Depth Anything V2. It significantly outperforms [V1](https://github.com/LiheYoung/Depth-Anything) in fine-grained details and robustness. Compared with SD-based models, it enjoys faster inference speed, fewer parameters, and higher depth accuracy.
19
19
20
20

21
21
22
+
22
23
## News
23
24
25
+
-**2024-07-06:** Depth Anything V2 is supported in [Transformers](https://github.com/huggingface/transformers/). See the [instructions](https://huggingface.co/docs/transformers/main/en/model_doc/depth_anything_v2) for convenient usage.
26
+
-**2024-06-25:** Depth Anything is integrated into [Apple Core ML Models](https://developer.apple.com/machine-learning/models/). See the instructions ([V1](https://huggingface.co/apple/coreml-depth-anything-small), [V2](https://huggingface.co/apple/coreml-depth-anything-v2-small)) for usage.
24
27
-**2024-06-22:** We release [smaller metric depth models](https://github.com/DepthAnything/Depth-Anything-V2/tree/main/metric_depth#pre-trained-models) based on Depth-Anything-V2-Small and Base.
25
28
-**2024-06-20:** Our repository and project page are flagged by GitHub and removed from the public for 6 days. Sorry for the inconvenience.
26
29
-**2024-06-14:** Paper, project page, code, models, demo, and benchmark are all released.
@@ -37,6 +40,7 @@ We provide **four models** of varying scales for robust relative depth estimatio
depth = model.infer_image(raw_img) # HxW raw depth map in numpy
76
80
```
77
81
82
+
If you do not want to clone this repository, you can also load our models through [Transformers](https://github.com/huggingface/transformers/). Below is a simple code snippet. Please refer to the [official page](https://huggingface.co/docs/transformers/main/en/model_doc/depth_anything_v2) for more details.
83
+
84
+
- Note 1: Make sure you can connect to Hugging Face and have installed the latest Transformers.
85
+
- Note 2: Due to the [upsampling difference](https://github.com/huggingface/transformers/pull/31522#issuecomment-2184123463) between OpenCV (we used) and Pillow (HF used), predictions may differ slightly. So you are more recommended to use our models through the way introduced above.
***Our larger model has better temporal consistency on videos.***
107
124
108
-
109
125
### Gradio demo
110
126
111
127
To use our gradio demo locally:
@@ -119,7 +135,6 @@ You can also try our [online demo](https://huggingface.co/spaces/Depth-Anything/
119
135
***Note: Compared to V1, we have made a minor modification to the DINOv2-DPT architecture (originating from this [issue](https://github.com/LiheYoung/Depth-Anything/issues/81)).*** In V1, we *unintentionally* used features from the last four layers of DINOv2 for decoding. In V2, we use [intermediate features](https://github.com/DepthAnything/Depth-Anything-V2/blob/2cbc36a8ce2cec41d38ee51153f112e87c8e42d8/depth_anything_v2/dpt.py#L164-L169) instead. Although this modification did not improve details or accuracy, we decided to follow this common practice.
120
136
121
137
122
-
123
138
## Fine-tuned to Metric Depth Estimation
124
139
125
140
Please refer to [metric depth estimation](./metric_depth).
@@ -129,11 +144,21 @@ Please refer to [metric depth estimation](./metric_depth).
129
144
130
145
Please refer to [DA-2K benchmark](./DA-2K.md).
131
146
147
+
132
148
## Community Support
133
149
134
150
**We sincerely appreciate all the community support for our Depth Anything series. Thank you a lot!**
We are sincerely grateful to the awesome Hugging Face team ([@Pedro Cuenca](https://huggingface.co/pcuenq), [@Niels Rogge](https://huggingface.co/nielsr), [@Merve Noyan](https://huggingface.co/merve), [@Amy Roberts](https://huggingface.co/amyeroberts), et al.) for their huge efforts in supporting our models in Transformers and Apple Core ML.
173
+
174
+
We also thank the [DINOv2](https://github.com/facebookresearch/dinov2) team for contributing such impressive models to our community.
0 commit comments