Update instructions in readme
Browse files
README.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: depth-anything/Depth-Anything-V2-Small-hf
|
| 4 |
+
tags:
|
| 5 |
+
- depth
|
| 6 |
+
- depth_anything
|
| 7 |
+
- relative depth
|
| 8 |
+
- vision.cpp
|
| 9 |
+
pipeline_tag: depth-estimation
|
| 10 |
---
|
| 11 |
+
# GGUF models for Depth-Anything V2
|
| 12 |
+
|
| 13 |
+
Depth-Anything is a model for monocular depth estimation. The weights in this
|
| 14 |
+
repository are converted for lightweight inference on consumer hardware with
|
| 15 |
+
[vision.cpp](https://github.com/Acly/vision.cpp).
|
| 16 |
+
|
| 17 |
+
* Original repository: [DepthAnything/Depth-Anything-V2 (Github)](https://github.com/DepthAnything/Depth-Anything-V2)
|
| 18 |
+
* Original weights: [depth-anything (HuggingFace)](https://huggingface.co/depth-anything)
|
| 19 |
+
|
| 20 |
+
## Run
|
| 21 |
+
|
| 22 |
+
Example inference with [vision.cpp](https://github.com/Acly/vision.cpp):
|
| 23 |
+
|
| 24 |
+
#### CLI
|
| 25 |
+
```sh
|
| 26 |
+
vision-cli depth-anything -m Depth-Anything-V2-Small-F16.gguf -i input.png -o depth.png
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
#### C++
|
| 30 |
+
```c++
|
| 31 |
+
image_data image = image_load("input.png");
|
| 32 |
+
backend_device device = backend_init();
|
| 33 |
+
depthany_model model = depthany_load_model("Depth-Anything-V2-Small-F16.gguf", device);
|
| 34 |
+
image_data depth = depthany_compute(model, image);
|
| 35 |
+
image_data image = image_f32_to_u8(depth, image_format::alpha_u8);
|
| 36 |
+
image_save(image, "depth.png");
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
## License
|
| 40 |
+
|
| 41 |
+
* Depth-Anything-V2-Small: Apache-2.0
|
| 42 |
+
* Depth-Anything-V2-Base: CC-BY-NC-4.0
|
| 43 |
+
* Depth-Anything-V2-Large: CC-BY-NC-4.0
|