File size: 1,356 Bytes
064e854
 
dedf6ef
 
 
 
 
 
 
064e854
dedf6ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b91be7
 
dedf6ef
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---

license: apache-2.0
base_model: depth-anything/Depth-Anything-V2-Small-hf
tags:
  - depth
  - depth_anything
  - relative depth
  - vision.cpp
pipeline_tag: depth-estimation
---

# GGUF models for Depth-Anything V2

Depth-Anything is a model for monocular depth estimation. The weights in this
repository are converted for lightweight inference on consumer hardware with
[vision.cpp](https://github.com/Acly/vision.cpp).

* Original repository: [DepthAnything/Depth-Anything-V2 (Github)](https://github.com/DepthAnything/Depth-Anything-V2)
* Original weights: [depth-anything (HuggingFace)](https://huggingface.co/depth-anything)

## Run

Example inference with [vision.cpp](https://github.com/Acly/vision.cpp):

#### CLI
```sh

vision-cli depth-anything -m Depth-Anything-V2-Small-F16.gguf -i input.png -o depth.png

```

#### C++
```c++

image_data     image  = image_load("input.png");

backend_device device = backend_init();

depthany_model model  = depthany_load_model("Depth-Anything-V2-Small-F16.gguf", device);

image_data     depth  = depthany_compute(model, image);

image_data     output = image_f32_to_u8(depth, image_format::alpha_u8);

image_save(output, "depth.png");

```

## License

* Depth-Anything-V2-Small: Apache-2.0
* Depth-Anything-V2-Base: CC-BY-NC-4.0
* Depth-Anything-V2-Large: CC-BY-NC-4.0