mudler commited on
Commit
dffb352
·
verified ·
1 Parent(s): cd999e8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +132 -0
README.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: ggml
4
+ pipeline_tag: depth-estimation
5
+ tags:
6
+ - depth-anything
7
+ - depth-anything-3
8
+ - depth-estimation
9
+ - monocular-depth
10
+ - camera-pose
11
+ - gguf
12
+ - ggml
13
+ - cpp
14
+ - localai
15
+ base_model:
16
+ - depth-anything/DA3-SMALL
17
+ - depth-anything/DA3-BASE
18
+ - depth-anything/DA3-LARGE
19
+ - depth-anything/DA3-GIANT
20
+ - depth-anything/DA3MONO-LARGE
21
+ - depth-anything/DA3METRIC-LARGE
22
+ - depth-anything/DA3NESTED-GIANT-LARGE
23
+ ---
24
+
25
+ # Depth Anything 3 — GGUF weights for [depth-anything.cpp](https://github.com/mudler/depth-anything.cpp)
26
+
27
+ **Brought to you by the [LocalAI](https://github.com/mudler/LocalAI) team.**
28
+
29
+ GGUF conversions of [ByteDance Depth Anything 3](https://github.com/bytedance-seed/depth-anything-3),
30
+ for use with **[depth-anything.cpp](https://github.com/mudler/depth-anything.cpp)** — a from-scratch
31
+ C++17 / [ggml](https://github.com/ggml-org/ggml) port. No Python, no PyTorch, no CUDA toolkit at
32
+ inference: one self-contained GGUF file plus a small native library and CLI, **faster than PyTorch
33
+ on CPU** and **bit-exact** against the original (correlation 1.0, verified component by component).
34
+
35
+ Given an image, the engine recovers a dense **depth** map, per-pixel **confidence**, camera
36
+ **extrinsics (3×4)** and **intrinsics (3×3)**, an optional **sky** mask, a back-projected **3D point
37
+ cloud**, and exports to **glb / COLMAP / PLY**.
38
+
39
+ ## Files in this repo
40
+
41
+ Each GGUF is fully self-contained — every dimension, hyperparameter and preprocessing constant is
42
+ baked into the file; the loader reads them, nothing is hardcoded.
43
+
44
+ | File | Source checkpoint | Backbone | Depth type | Output |
45
+ |------|-------------------|----------|-----------|--------|
46
+ | `depth-anything-small-f32.gguf` | `DA3-SMALL` | ViT-S | relative | depth + conf + pose |
47
+ | `depth-anything-base-f32.gguf` | `DA3-BASE` | ViT-B | relative | depth + conf + pose |
48
+ | `depth-anything-base-f16.gguf` | `DA3-BASE` | ViT-B | relative | depth + conf + pose |
49
+ | `depth-anything-base-q8_0.gguf` | `DA3-BASE` | ViT-B | relative | depth + conf + pose (near-lossless) |
50
+ | `depth-anything-base-q4_k.gguf` | `DA3-BASE` | ViT-B | relative | depth + conf + pose (**99 MB**) |
51
+ | `depth-anything-large-f32.gguf` | `DA3-LARGE` | ViT-L | relative | depth + conf + pose |
52
+ | `depth-anything-giant-f32.gguf` | `DA3-GIANT` | ViT-g | relative | depth + conf + pose + 3D Gaussians |
53
+ | `depth-anything-mono-large-f32.gguf` | `DA3MONO-LARGE` | ViT-L | relative (monocular) | depth + sky |
54
+ | `depth-anything-metric-large-f32.gguf` | `DA3METRIC-LARGE` | ViT-L | **metric** | metric depth + sky |
55
+ | `depth-anything-nested-anyview.gguf` | `DA3NESTED-GIANT-LARGE` (anyview branch) | ViT-g | relative | depth + conf + pose |
56
+ | `depth-anything-nested-metric.gguf` | `DA3NESTED-GIANT-LARGE` (metric branch) | ViT-L | **metric** | depth + sky |
57
+
58
+ > The nested model is a **two-file pair**: the engine loads the anyview (ViT-g) branch and the
59
+ > metric (ViT-L) branch together and aligns them to produce metric-scale depth + pose. Download
60
+ > both `depth-anything-nested-anyview.gguf` and `depth-anything-nested-metric.gguf`.
61
+
62
+ ### Which one should I use?
63
+
64
+ - **Just trying it out / CPU:** `depth-anything-base-q4_k.gguf` (99 MB, near-lossless).
65
+ - **Best quality/speed default:** `depth-anything-base-q8_0.gguf`.
66
+ - **Smallest / fastest:** `depth-anything-small-f32.gguf`.
67
+ - **Highest quality + 3D reconstruction (point cloud / Gaussians):** `depth-anything-giant-f32.gguf`.
68
+ - **Single-image depth with sky mask:** `depth-anything-mono-large-f32.gguf`.
69
+ - **Metric-scale depth (meters), single model:** `depth-anything-metric-large-f32.gguf`.
70
+ - **Best metric-scale depth + pose:** the nested pair (`depth-anything-nested-anyview.gguf` +
71
+ `depth-anything-nested-metric.gguf`).
72
+
73
+ ## Usage
74
+
75
+ ### depth-anything.cpp (CLI)
76
+
77
+ ```bash
78
+ git clone https://github.com/mudler/depth-anything.cpp && cd depth-anything.cpp
79
+ cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
80
+
81
+ # download a weight from this repo
82
+ hf download mudler/depth-anything.cpp-gguf depth-anything-base-q4_k.gguf --local-dir models
83
+
84
+ ./build/da3 depth models/depth-anything-base-q4_k.gguf image.jpg --out depth.png
85
+ ./build/da3 depth models/depth-anything-base-q4_k.gguf image.jpg --pose poses.json
86
+ ./build/da3 reconstruct models/depth-anything-giant-f32.gguf image.jpg --ply cloud.ply
87
+
88
+ # metric-scale depth from the single metric model
89
+ ./build/da3 depth models/depth-anything-metric-large-f32.gguf image.jpg --out depth.png
90
+
91
+ # metric-scale depth + pose from the nested pair (anyview + metric branches)
92
+ ./build/da3 depth models/depth-anything-nested-anyview.gguf image.jpg \
93
+ --metric-model models/depth-anything-nested-metric.gguf --pfm depth.pfm
94
+ ```
95
+
96
+ See the [README](https://github.com/mudler/depth-anything.cpp) for multi-view, glb/COLMAP export,
97
+ quantization and the flat C API.
98
+
99
+ ### LocalAI
100
+
101
+ ```bash
102
+ local-ai run depth-anything-3-base
103
+ ```
104
+
105
+ ## Performance
106
+
107
+ Faster than PyTorch on CPU at half the memory, bit-exact. AMD Ryzen 9 9950X3D, `threads=16`,
108
+ 504×336, sustained:
109
+
110
+ | engine | quant | model MB | load ms | infer ms | peak RAM MB | vs PyTorch |
111
+ |--------|-------|---------:|--------:|---------:|------------:|-----------:|
112
+ | PyTorch | f32 | 516 | 749 | 416.9 | 1328 | 1.00× |
113
+ | **C++/ggml** | f32 | 393 | **112** | **346.4** | **614** | **1.20×** |
114
+ | **C++/ggml** | q8_0 | 142 | **40** | **319.4** | **363** | **1.31×** |
115
+ | **C++/ggml** | q4_k | **99** | **25** | 395.2 | **320** | 1.05× |
116
+
117
+ Full methodology in [`benchmarks/BENCHMARK.md`](https://github.com/mudler/depth-anything.cpp/blob/master/benchmarks/BENCHMARK.md).
118
+
119
+ ## License
120
+
121
+ The GGUF weights are derived from the official Depth Anything 3 checkpoints and inherit their
122
+ **Apache-2.0** license. The depth-anything.cpp code is MIT.
123
+
124
+ ## Citation
125
+
126
+ ```bibtex
127
+ @article{depthanything3,
128
+ title = {Depth Anything 3: Recovering the Visual Space from Any Views},
129
+ author = {ByteDance Seed},
130
+ year = {2025}
131
+ }
132
+ ```