Explaining a new state-of-the-art monocular depth estimation model: Depth Anything ✨ 🧶
text
Explaining a new state-of-the-art monocular depth estimation model: Depth Anything ✨ 🧶
new_line
Before we begin: Depth Anything is recently integrated to 🤗 transformers and you can use it with three lines of code! ✨ 
text
Before we begin: Depth Anything is recently integrated to 🤗 transformers and you can use it with three lines of code! ✨ 
new_line
from transformers import pipeline

pipe = pipeline(task="depth-estimation", model="LiheYoung/depth-anything-small-hf")
depth = pipe(image)["depth"]
python
```python
from transformers import pipeline

pipe = pipeline(task="depth-estimation", model="LiheYoung/depth-anything-small-hf")
depth = pipe(image)["depth"]
```
code_fence
new_line
We have also built an app for you to compare different depth estimation models 🐝 🌸  
text
We have also built an app for you to compare different depth estimation models 🐝 🌸  
https://huggingface.co/spaces/merve/compare_depth_models
merve/compare_depth_models
space
resource
https://huggingface.co/spaces/merve/compare_depth_models
new_line
Check out Depth Anything in Web by 
text
Check out Depth Anything in Web by 
@Xenova
mention
Xenova
text
https://huggingface.co/spaces/Xenova/depth-anything-web
Xenova/depth-anything-web
space
resource
https://huggingface.co/spaces/Xenova/depth-anything-web
new_line
new_line
The model's success heavily depends on unlocking the use of unlabeled datasets, although initially the authors used self-training and failed.
text
The model's success heavily depends on unlocking the use of unlabeled datasets, although initially the authors used self-training and failed.
new_line
What the authors have done:
text
What the authors have done:
new_line
➰ Train a teacher model on labelled dataset
text
➰ Train a teacher model on labelled dataset
new_line
➰ Guide the student using teacher and also use unlabelled datasets pseudolabelled by the teacher
text
➰ Guide the student using teacher and also use unlabelled datasets pseudolabelled by the teacher
new_line
However, this was the cause of the failure, as both architectures were similar, the outputs were the same.
text
However, this was the cause of the failure, as both architectures were similar, the outputs were the same.
new_line
So the authors have added a more difficult optimization target for student to learn additional knowledge on unlabeled images that went through color jittering, distortions, Gaussian blurring and spatial distortion, so it can learn more invariant representations from them.
text
So the authors have added a more difficult optimization target for student to learn additional knowledge on unlabeled images that went through color jittering, distortions, Gaussian blurring and spatial distortion, so it can learn more invariant representations from them.
new_line
The architecture consists of DINOv2 encoder to extract the features followed by DPT decoder. At first, they train the teacher model on labelled images, and then they jointly train the student model and add in the dataset pseudo-labelled by ViT-L.
text
The architecture consists of DINOv2 encoder to extract the features followed by DPT decoder. At first, they train the teacher model on labelled images, and then they jointly train the student model and add in the dataset pseudo-labelled by ViT-L.
new_line
Thanks to this, Depth Anything performs very well! I have also benchmarked the inference duration of the model against different models here. I also ran torch.compile benchmarks across them and got nice speed-ups 🚀 
text
Thanks to this, Depth Anything performs very well! I have also benchmarked the inference duration of the model against different models here. I also ran torch.compile benchmarks across them and got nice speed-ups 🚀 
https://huggingface2.notion.site/DPT-Benchmarks-1e516b0ba193460e865c47b3a5681efb?pvs=4
https://huggingface2.notion.site/DPT-Benchmarks-1e516b0ba193460e865c47b3a5681efb?pvs=4
link
new_line
Explaining a new state-of-the-art monocular depth estimation model: Depth Anything ✨ 🧶
Before we begin: Depth Anything is recently integrated to 🤗 transformers and you can use it with three lines of code! ✨ 
```python
from transformers import pipeline

pipe = pipeline(task="depth-estimation", model="LiheYoung/depth-anything-small-hf")
depth = pipe(image)["depth"]
```
We have also built an app for you to compare different depth estimation models 🐝 🌸  https://huggingface.co/spaces/merve/compare_depth_models
Check out Depth Anything in Web by @Xenova https://huggingface.co/spaces/Xenova/depth-anything-web

The model's success heavily depends on unlocking the use of unlabeled datasets, although initially the authors used self-training and failed.
What the authors have done:
➰ Train a teacher model on labelled dataset
➰ Guide the student using teacher and also use unlabelled datasets pseudolabelled by the teacher
However, this was the cause of the failure, as both architectures were similar, the outputs were the same.
So the authors have added a more difficult optimization target for student to learn additional knowledge on unlabeled images that went through color jittering, distortions, Gaussian blurring and spatial distortion, so it can learn more invariant representations from them.
The architecture consists of DINOv2 encoder to extract the features followed by DPT decoder. At first, they train the teacher model on labelled images, and then they jointly train the student model and add in the dataset pseudo-labelled by ViT-L.
Thanks to this, Depth Anything performs very well! I have also benchmarked the inference duration of the model against different models here. I also ran torch.compile benchmarks across them and got nice speed-ups 🚀 https://huggingface2.notion.site/DPT-Benchmarks-1e516b0ba193460e865c47b3a5681efb?pvs=4

❤️
osanseviero clem Xenova Ar4ikov tusk3d marooz
👍
alvarobartt osanseviero clem valcore
🤯
Ar4ikov