From 39ea0cc132feaca9617bae0f8a70d22bdf0526ef Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 20 Jun 2026 09:18:13 +0000 Subject: [PATCH] feat(gallery): add Depth Anything V2 models + bump native version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Depth Anything V2 (DA2) support to the depth-anything backend. DA2 is depth-only (no camera pose, no confidence) and ships both relative (relative inverse depth) and metric (depth in metres) variants. The Go backend is model-agnostic, so no backend code changes are required — only a native version bump and new gallery entries. - backend/go/depth-anything-cpp/Makefile: pin DEPTHANYTHING_VERSION to the depth-anything.cpp commit that adds the DA2 engine + C-API routing (e3dec57f13a52366bbc4f279ef44804915960a6b, kept alive by the upstream tag da2-support so it survives a squash-merge). - gallery/index.yaml: add 12 DA2 entries (4 base quants, small, large, plus Hypersim indoor and VKITTI outdoor metric models in S/B/L). Metric models carry the metric-depth tag; none carry camera-pose. Assisted-by: Claude:claude-opus-4-8 --- backend/go/depth-anything-cpp/Makefile | 10 +- gallery/index.yaml | 227 +++++++++++++++++++++++++ 2 files changed, 233 insertions(+), 4 deletions(-) diff --git a/backend/go/depth-anything-cpp/Makefile b/backend/go/depth-anything-cpp/Makefile index 815d2b0db..455fdc43a 100644 --- a/backend/go/depth-anything-cpp/Makefile +++ b/backend/go/depth-anything-cpp/Makefile @@ -8,11 +8,13 @@ JOBS?=$(shell nproc --ignore=1) # depth-anything.cpp. Pin to a specific commit for a stable build; a squash # merge upstream can orphan a branch, so the native version is pinned by SHA. -# This SHA adds the nested two-file metric C-API (abi_version 4, -# da_capi_load_nested) required by the depth-anything-3-nested gallery model; -# tag it (e.g. v0.1.3) upstream to keep the SHA alive. +# This SHA adds the Depth Anything V2 engine + C-API routing (depth-only, +# relative + metric) on top of the nested two-file metric C-API (abi_version 4, +# da_capi_load_nested) required by the depth-anything-3-nested gallery model. +# It is kept alive by the upstream tag da2-support (survives a squash-merge); +# repoint to the master merge commit once mudler/depth-anything.cpp PR #1 lands. DEPTHANYTHING_REPO?=https://github.com/mudler/depth-anything.cpp.git -DEPTHANYTHING_VERSION?=cce5edc395fd1843806093d7ccc0c8b0d0b97b72 +DEPTHANYTHING_VERSION?=e3dec57f13a52366bbc4f279ef44804915960a6b ifeq ($(NATIVE),false) CMAKE_ARGS+=-DGGML_NATIVE=OFF diff --git a/gallery/index.yaml b/gallery/index.yaml index 903000158..95b2ba6d7 100644 --- a/gallery/index.yaml +++ b/gallery/index.yaml @@ -8343,6 +8343,233 @@ - filename: depth-anything-nested-metric.gguf uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything-nested-metric.gguf sha256: "b54ed50cbc0b0c14fae1f8edd0fea8bd1cac0850485fd6e7eb2422c7a19e570e" +- &depth-anything-2-base + name: depth-anything-2-base + url: github:mudler/LocalAI/gallery/virtual.yaml@master + urls: + - https://github.com/mudler/depth-anything.cpp + - https://huggingface.co/depth-anything/Depth-Anything-V2 + - https://huggingface.co/mudler/depth-anything.cpp-gguf + description: | + Depth Anything V2 (base / ViT-B) monocular depth, served via the native + depth-anything.cpp backend (C++/ggml + purego, no Python at inference). + Given an image it returns a dense monocular depth map only — no camera pose, + no confidence. This is the relative variant (relative inverse depth). Use + GenerateImage (src -> normalized depth PNG at dst) or the Depth endpoint. + q4_k is the recommended CPU default. + license: apache-2.0 + icon: https://avatars.githubusercontent.com/u/53104118?s=200&v=4 + tags: + - depth-estimation + - depth-anything + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-base-q4_k.gguf + files: + - filename: depth-anything2-base-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-base-q4_k.gguf + sha256: "49e77ec7e593080111242fa76017cae3e26498d550841cf8a70dfcd36bb175f2" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-base-q8_0 + description: | + Depth Anything V2 (base / ViT-B), q8_0 — near-lossless 8-bit quant. Same + relative monocular depth output as the q4_k default at higher fidelity. Use + GenerateImage (src -> depth PNG) or the Depth endpoint. + overrides: + backend: depth-anything + parameters: + model: depth-anything2-base-q8_0.gguf + files: + - filename: depth-anything2-base-q8_0.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-base-q8_0.gguf + sha256: "11920ec7a8dfc2fa7fe8ed44811a46fafe415c641d13144bb733d1437832291b" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-base-f16 + description: | + Depth Anything V2 (base / ViT-B), f16 — half precision, no measurable + accuracy loss vs f32. Relative monocular depth only (no pose). Use + GenerateImage (src -> depth PNG) or the Depth endpoint. + overrides: + backend: depth-anything + parameters: + model: depth-anything2-base-f16.gguf + files: + - filename: depth-anything2-base-f16.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-base-f16.gguf + sha256: "e91c011fbbf90a44639fea55b8d61ca9e80dfb5541220946c8b6e6261fe67ab1" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-base-f32 + description: | + Depth Anything V2 (base / ViT-B), f32 — maximum reference fidelity. Relative + monocular depth only (no pose). Use GenerateImage (src -> depth PNG) or the + Depth endpoint. + overrides: + backend: depth-anything + parameters: + model: depth-anything2-base-f32.gguf + files: + - filename: depth-anything2-base-f32.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-base-f32.gguf + sha256: "2d3d2e4d8fae9646c17577b84c870c7d77a34ded8cf8d5da0a60b2bee1530ccc" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-small + description: | + Depth Anything V2 (small / ViT-S), f32 — the smallest, fastest backbone for + relative monocular depth on CPU. Depth only (no pose). Use GenerateImage + (src -> depth PNG) or the Depth endpoint. + overrides: + backend: depth-anything + parameters: + model: depth-anything2-small-f32.gguf + files: + - filename: depth-anything2-small-f32.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-small-f32.gguf + sha256: "1f6622aa70cbd0eba34d34e2f635a156ed8c3f8e158fb149eb355366e2deb899" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-large + description: | + Depth Anything V2 (large / ViT-L), f32 — higher-quality relative monocular + depth than base. Depth only (no pose). Use GenerateImage (src -> depth PNG) + or the Depth endpoint. + overrides: + backend: depth-anything + parameters: + model: depth-anything2-large-f32.gguf + files: + - filename: depth-anything2-large-f32.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-large-f32.gguf + sha256: "e187658b01b6df62e1553b03df9973606a7287551d4771b09802fc10b26f19f3" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-metric-hypersim-small + description: | + Depth Anything V2 Metric (Hypersim, indoor / ViT-S), q4_k — metric monocular + depth in METRES (indoor, max_depth 20). Depth only (no pose). Use + GenerateImage (src -> depth PNG) or the Depth endpoint. + tags: + - depth-estimation + - depth-anything + - metric-depth + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-metric-hypersim-small-q4_k.gguf + files: + - filename: depth-anything2-metric-hypersim-small-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-metric-hypersim-small-q4_k.gguf + sha256: "decd99f5c756b564aae5ca1a1612f896e7f76889060e1d25ba610549bbc39b52" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-metric-hypersim-base + description: | + Depth Anything V2 Metric (Hypersim, indoor / ViT-B), q4_k — metric monocular + depth in METRES (indoor, max_depth 20). Depth only (no pose). Use + GenerateImage (src -> depth PNG) or the Depth endpoint. + tags: + - depth-estimation + - depth-anything + - metric-depth + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-metric-hypersim-base-q4_k.gguf + files: + - filename: depth-anything2-metric-hypersim-base-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-metric-hypersim-base-q4_k.gguf + sha256: "c7c6a8628ac154f2ad43db09b8146518e863375be2cb03b8b46caec49a4fcf3a" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-metric-hypersim-large + description: | + Depth Anything V2 Metric (Hypersim, indoor / ViT-L), q4_k — highest-quality + metric monocular depth in METRES (indoor, max_depth 20). Depth only (no + pose). Use GenerateImage (src -> depth PNG) or the Depth endpoint. + tags: + - depth-estimation + - depth-anything + - metric-depth + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-metric-hypersim-large-q4_k.gguf + files: + - filename: depth-anything2-metric-hypersim-large-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-metric-hypersim-large-q4_k.gguf + sha256: "3664506bea55e64926fff2cb112ea5a9ad923d13647b9c69617184a89dd1e473" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-metric-vkitti-small + description: | + Depth Anything V2 Metric (Virtual KITTI, outdoor / ViT-S), q4_k — metric + monocular depth in METRES (outdoor, max_depth 80). Depth only (no pose). Use + GenerateImage (src -> depth PNG) or the Depth endpoint. + tags: + - depth-estimation + - depth-anything + - metric-depth + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-metric-vkitti-small-q4_k.gguf + files: + - filename: depth-anything2-metric-vkitti-small-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-metric-vkitti-small-q4_k.gguf + sha256: "8dcaa5d0f8475c3dc5de59e28faacd6d46e5ef73c73ecc58e365d7751bc2279f" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-metric-vkitti-base + description: | + Depth Anything V2 Metric (Virtual KITTI, outdoor / ViT-B), q4_k — metric + monocular depth in METRES (outdoor, max_depth 80). Depth only (no pose). Use + GenerateImage (src -> depth PNG) or the Depth endpoint. + tags: + - depth-estimation + - depth-anything + - metric-depth + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-metric-vkitti-base-q4_k.gguf + files: + - filename: depth-anything2-metric-vkitti-base-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-metric-vkitti-base-q4_k.gguf + sha256: "1de5a7aae674df6afb8fa5e06d67843dccfbab92cd64b7c816c1218229446d6d" +- !!merge <<: *depth-anything-2-base + name: depth-anything-2-metric-vkitti-large + description: | + Depth Anything V2 Metric (Virtual KITTI, outdoor / ViT-L), q4_k — + highest-quality metric monocular depth in METRES (outdoor, max_depth 80). + Depth only (no pose). Use GenerateImage (src -> depth PNG) or the Depth + endpoint. + tags: + - depth-estimation + - depth-anything + - metric-depth + - native + - cpp + - cpu + overrides: + backend: depth-anything + parameters: + model: depth-anything2-metric-vkitti-large-q4_k.gguf + files: + - filename: depth-anything2-metric-vkitti-large-q4_k.gguf + uri: huggingface://mudler/depth-anything.cpp-gguf/depth-anything2-metric-vkitti-large-q4_k.gguf + sha256: "3b72e9a34262a7025ffba2fc4b760553398ac0622c26f164bff3d2c93991c757" - name: rfdetr-cpp-base url: github:mudler/LocalAI/gallery/virtual.yaml@master urls: