Add Depth Anything v2 metric depth
Author: NielsRogge
Pull request: no
Labels: name: Good First Issue

name: Feature request

name: Vision

### Feature request

We already have [Depth Anything v2](https://huggingface.co/docs/transformers/main/en/model_doc/depth_anything_v2) available in Transformers (compatible with v1). These are relative depth estimation models, capable of predicting the relative distance among pixels.

There are also absolute (also called metric) depth estimation models available here: https://github.com/DepthAnything/Depth-Anything-V2/tree/main/metric_depth. Would be great to make these also Transformers compatible.

The author also informed me that they are only minor differences compared to their relative counterparts:

> Our model definition for metric depth model in V2 is almost similar to our relative depth model: https://github.com/LiheYoung/Depth-Anything/blob/main/depth_anything/dpt.py. The only difference is we replace the final ReLU(out) (https://github.com/LiheYoung/Depth-Anything/blob/1e1c8d373ae6383ef6490a5c2eb5ef29fd085993/depth_anything/dpt.py#L99) to a sigmoid(out) * max_depth.

### Motivation

We currently only have one metric depth estimation model available, namely [ZoeDepth](https://huggingface.co/docs/transformers/main/en/model_doc/zoedepth). Would be great to expand this to more SOTA models

### Your contribution

Could work on this, but it's a great opportunity for a first open-source contribution!

Comments:
Hi! I am interested in taking this issue as a first contribution. Could I be assigned to it please? :) Thank you!

Pinging @gchhablani here as he might be interested as well. You can just open a PR :)

Hi @NielsRogge, is this issue still open. I would like to work on it. 

Hi @NouamaneELGueddarii, I was planning to work on it since @gchhablani didn't reply :) hope that's good with you. Thanks

As a personal remark: whoever works on it, it would be most helpful!

Hey first time contributor here! if the issue is still open I would like to work on it.

@NielsRogge is this available on huggingface now?

Yes, models are here: https://huggingface.co/models?other=absolute+depth

@NielsRogge is there going to be any documentation along with it similar to the relative depth model i.e https://huggingface.co/docs/transformers/en/model_doc/depth_anything_v2 ?

Hi @elvistheyo it would be great to add documentation around this. Would be up for adding a PR?

HI! is there a onnx model version of https://huggingface.co/docs/transformers/en/model_doc/depth_anything_v2? I'm not finding it, but it would be very useful.

I'll ping @xenova on that

Hi there @frittatelle  👋  Yes, I made a couple of conversions for them here:
- https://huggingface.co/onnx-community/depth-anything-v2-small
- https://huggingface.co/onnx-community/depth-anything-v2-base
- https://huggingface.co/onnx-community/depth-anything-v2-large

:) Hopefully they work for your use-cases!

Hi @xenova ☺️, are those onnx conversions from the metric depth ones? If that's not the case I'll try to work on them in a new PR as soon as I can ✌🏼

Oh right, I haven't made conversions for those (https://huggingface.co/models?other=absolute+depth,depth_anything). Would appreciate some contributions!