{
 "id": "depth-anything-v2",
 "title": "Depth Anything V2",
 "aliases": [],
 "domain": "capture",
 "subdomain": "monocular depth",
 "stage": "capture",
 "realtime": "interactive",
 "platforms": [
  "cuda",
  "python",
  "webgpu"
 ],
 "year_introduced": 2024,
 "inputs": [
  "photos"
 ],
 "outputs": [
  "depth"
 ],
 "style": "both",
 "dynamic": "both",
 "summary": "A monocular relative-depth model trained on synthetic labels plus pseudo-labelled real images, giving sharp, fine-detail depth maps from a single RGB image at several model sizes.",
 "how_it_works": "Depth Anything V2 uses a DINOv2-based encoder with a DPT decoder. Its main contribution is the training recipe: a large teacher is first trained only on accurate synthetic depth, avoiding the noisy labels of real-world depth sensors, then used to pseudo-label millions of unlabelled real images. Smaller student models are trained on these pseudo labels, which transfers synthetic sharpness to real images. Output is affine-invariant relative inverse depth, not metric, so scale and shift must be recovered separately if needed; fine-tuned metric variants exist. It handles thin structures, transparency and reflective surfaces better than earlier V1 and MiDaS-style models.",
 "when_to_use": "Choose it for fast per-frame relative depth, depth conditioning for diffusion, parallax effects or depth priors for splat training. Prefer `depth-pro` or `moge` when you need metric scale or intrinsics, and `vggt` when multiple views are available and consistency matters.",
 "cost": {
  "class": "medium",
  "notes": "Small variants run in real time on modern GPUs; large ones are interactive. Only the small model carries a permissive Apache-2.0 licence."
 },
 "failure_modes": [
  "Output is relative, so depth scale and shift are inconsistent across frames in video (flicker)",
  "Sky and far regions can be unreliable",
  "Edges are sharp visually but not metrically accurate for geometry",
  "Metric conversion needs fine-tuned variants or external scale"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "arxiv:2406.09414",
   "type": "paper",
   "title": "Depth Anything V2",
   "authors": [
    "Lihe Yang",
    "Bingyi Kang",
    "Zilong Huang",
    "Zhen Zhao",
    "Xiaogang Xu",
    "Jiashi Feng",
    "Hengshuang Zhao"
   ],
   "year": 2024,
   "venue": "arXiv preprint (cs.CV)",
   "url": "https://arxiv.org/abs/2406.09414",
   "ids": {
    "arxiv": "2406.09414"
   },
   "license": null,
   "extra": {
    "arxiv_version": "1",
    "category": "cs.CV"
   },
   "provenance": {
    "title": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2406.09414",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2406.09414",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2406.09414",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2406.09414",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2406.09414",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "yang2024depth"
  },
  {
   "role": "implementation",
   "key": "gh:depthanything/depth-anything-v2",
   "type": "code",
   "title": "DepthAnything/Depth-Anything-V2",
   "description": "[NeurIPS 2024] Depth Anything V2. A More Capable Foundation Model for Monocular Depth Estimation",
   "authors": [
    "DepthAnything"
   ],
   "year": 2024,
   "venue": "GitHub",
   "url": "https://github.com/DepthAnything/Depth-Anything-V2",
   "ids": {
    "repo": "DepthAnything/Depth-Anything-V2"
   },
   "license": "Apache-2.0",
   "extra": {
    "stars": 9246,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-03-24T10:59:06Z",
    "language": "Python",
    "homepage": "https://depth-anything-v2.github.io",
    "license_name": "Apache License 2.0"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/DepthAnything/Depth-Anything-V2",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/DepthAnything/Depth-Anything-V2",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/DepthAnything/Depth-Anything-V2",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/DepthAnything/Depth-Anything-V2",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/DepthAnything/Depth-Anything-V2",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/DepthAnything/Depth-Anything-V2",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "depthanything2024depthanything"
  },
  {
   "role": "tutorial",
   "key": "url:https://depth-anything-v2.github.io/",
   "type": "tutorial",
   "title": "Depth Anything V2 project page",
   "authors": [
    "Yang et al."
   ],
   "year": null,
   "venue": "depth-anything-v2.github.io",
   "url": "https://depth-anything-v2.github.io/",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20260810183504/https://depth-anything-v2.github.io/",
     "timestamp": "20260810183504"
    },
    "page_title": "Depth Anything V2",
    "host": "depth-anything-v2.github.io",
    "title_confirmed_by_page": true,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "http",
     "endpoint": "GET https://depth-anything-v2.github.io/ → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://depth-anything-v2.github.io/ → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "http",
     "endpoint": "GET https://depth-anything-v2.github.io/ → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 0.95,
   "__bib": "aldepth"
  }
 ],
 "presets": [
  {
   "id": "depth-anything-v2-live",
   "title": "Depth Anything V2 — single RGB input view (left) vs fine-detail monocular relative depth (right)",
   "runtime": "glsl-fragment",
   "params": {
    "P_DEPTH_CONT": 1,
    "P_CAM_SWAY": 0.75,
    "P_EDGE_SHARP": 1,
    "P_SPLIT": 0.48
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_DEPTH_CONT = 1.0; // P Depth Contrast [0.4, 1.8, 0.05]\nconst float P_CAM_SWAY = 0.75; // P Camera Sway [0.0, 2.0, 0.05]\nconst float P_EDGE_SHARP = 1.0; // P Fine Structure [0.2, 1.5, 0.05]\nconst float P_SPLIT = 0.48; // P RGB / Depth Split [0.0, 1.0, 0.02]\n\nfloat sdBox(vec3 p, vec3 b) {\n  vec3 q = abs(p) - b;\n  return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);\n}\n\n// Architectural colonnade with thin foreground railings, mid-ground arch, and distant tower\nvec2 mapScene(vec3 p) {\n  vec2 res = vec2(p.y + 0.85, 1.0); // stone floor\n  // Foreground thin railing posts & handrail (showcases Depth Anything V2 fine thin-structure fidelity!)\n  float rx = mod(p.x + 0.25, 0.5) - 0.25;\n  float post = sdBox(vec3(rx, p.y + 0.42, p.z - 0.15), vec3(0.022, 0.42, 0.022));\n  float rail = sdBox(p - vec3(0.0, -0.02, 0.15), vec3(2.4, 0.025, 0.03));\n  float dRail = min(post, rail);\n  if (dRail < res.x) res = vec2(dRail, 2.0);\n\n  // Midground colonnade pillars & floating bronze sphere\n  float colL = sdBox(p - vec3(-0.78, 0.05, -1.15), vec3(0.18, 0.90, 0.18));\n  float colR = sdBox(p - vec3(0.78, 0.05, -1.15), vec3(0.18, 0.90, 0.18));\n  float lintel = sdBox(p - vec3(0.0, 0.82, -1.15), vec3(1.15, 0.14, 0.22));\n  float dArch = min(min(colL, colR), lintel);\n  if (dArch < res.x) res = vec2(dArch, 3.0);\n\n  float dOrb = length(p - vec3(0.02, -0.18, -1.10)) - 0.34;\n  if (dOrb < res.x) res = vec2(dOrb, 4.0);\n\n  // Distant monumental obelisk / tower\n  float dTower = sdBox(p - vec3(-0.18, 0.35, -3.45), vec3(0.36, 1.25, 0.36));\n  if (dTower < res.x) res = vec2(dTower, 5.0);\n  return res;\n}\n\nvec3 calcNormal(vec3 p) {\n  vec2 e = vec2(0.003, 0.0);\n  return normalize(vec3(\n    mapScene(p + e.xyy).x - mapScene(p - e.xyy).x,\n    mapScene(p + e.yxy).x - mapScene(p - e.yxy).x,\n    mapScene(p + e.yyx).x - mapScene(p - e.yyx).x\n  ));\n}\n\n// Inferno-like perceptual disparity colormap (bright yellow-white = near, crimson = mid, deep indigo = far)\nvec3 infernoRamp(float d) {\n  float t = clamp(d, 0.0, 1.0);\n  vec3 c0 = vec3(0.03, 0.02, 0.14);\n  vec3 c1 = vec3(0.36, 0.07, 0.44);\n  vec3 c2 = vec3(0.84, 0.26, 0.24);\n  vec3 c3 = vec3(0.98, 0.68, 0.16);\n  vec3 c4 = vec3(0.99, 0.97, 0.68);\n  if (t < 0.25) return mix(c0, c1, t * 4.0);\n  if (t < 0.50) return mix(c1, c2, (t - 0.25) * 4.0);\n  if (t < 0.75) return mix(c2, c3, (t - 0.50) * 4.0);\n  return mix(c3, c4, (t - 0.75) * 4.0);\n}\n\nvec3 aces(vec3 x) {\n  x = max(x, 0.0);\n  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  float screenX = fragCoord.x / max(iResolution.x, 1.0);\n  float split = clamp(P_SPLIT, 0.0, 1.0);\n  bool isDepth = screenX >= split;\n  float cont = clamp(P_DEPTH_CONT, 0.3, 2.0);\n  float sway = clamp(P_CAM_SWAY, 0.0, 2.0);\n  float sharp = clamp(P_EDGE_SHARP, 0.1, 1.6);\n\n  vec3 ro = vec3(sin(iTime * 0.55 * sway) * 0.36, 0.24, 1.65);\n  vec3 rd = normalize(vec3(uv.x - sin(iTime * 0.55 * sway) * 0.08, uv.y - 0.06, -1.35));\n\n  float t = 0.05;\n  vec2 hit = vec2(12.0, 0.0);\n  for (int i = 0; i < 60; i++) {\n    vec2 h = mapScene(ro + rd * t);\n    if (h.x < 0.003) { hit = vec2(t, h.y); break; }\n    t += h.x;\n    if (t > 12.0) break;\n  }\n\n  vec3 col;\n  if (!isDepth) {\n    // Left: Standard monocular RGB camera view\n    vec3 sky = mix(vec3(0.86, 0.66, 0.50), vec3(0.24, 0.44, 0.74), smoothstep(-0.08, 0.52, rd.y));\n    col = sky;\n    if (hit.y > 0.5) {\n      vec3 p = ro + rd * hit.x;\n      vec3 n = calcNormal(p);\n      vec3 lDir = normalize(vec3(0.58, 0.78, 0.48));\n      float diff = max(dot(n, lDir), 0.0);\n      float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), 32.0);\n      vec3 alb = vec3(0.76, 0.72, 0.66);\n      if (hit.y < 1.5) {\n        vec2 tile = floor(p.xz * 2.0);\n        alb = mix(vec3(0.32, 0.30, 0.28), vec3(0.52, 0.48, 0.44), mod(tile.x + tile.y, 2.0));\n      } else if (hit.y < 2.5) alb = vec3(0.16, 0.20, 0.26);\n      else if (hit.y < 3.5) alb = vec3(0.82, 0.74, 0.64);\n      else if (hit.y < 4.5) alb = vec3(0.88, 0.46, 0.22);\n      else alb = vec3(0.46, 0.52, 0.62);\n      col = alb * (0.28 + 0.85 * diff) + vec3(1.0) * spec * (hit.y > 3.5 && hit.y < 4.5 ? 0.55 : 0.16);\n      col = mix(col, sky, 1.0 - exp(-hit.x * 0.08));\n    }\n  } else {\n    // Right: Crisp affine-invariant inverse-depth disparity (1/z) predicted by Depth Anything V2\n    float invZ = (hit.y > 0.5) ? (1.28 / max(hit.x, 0.35)) : 0.02;\n    float disp = clamp(pow(clamp(invZ, 0.0, 1.0), 0.85 / cont), 0.0, 1.0);\n    // Subtle iso-depth contours to reveal smooth continuous metric gradient\n    float iso = 0.90 + 0.10 * cos(disp * 42.0 * sharp);\n    col = infernoRamp(disp) * iso;\n  }\n\n  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));\n  col = mix(col, vec3(0.95, 0.97, 1.0), sep);\n\n  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-30",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "depth-anything-v2",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-30T20:35:47.000Z",
     "renderer": "Headless EGL Tesla T4/PCIe/SSE2, OpenGL 3.30 Core, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.6697,
      "std": 0.1926,
      "min": 0.2067,
      "max": 0.9014
     },
     "image": "/specimens/depth-anything-v2-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "depth-pro",
  "moge",
  "vggt"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "gaussian-splatting-3dgs",
   "why": "Monocular depth priors regularise Gaussian training in sparse-view settings."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/capture/depth-anything-v2.json"
 },
 "solves": [
  "need depth from a single photo quickly",
  "want parallax effect from one image",
  "depth prior to condition a diffusion model",
  "monocular depth maps look blurry and lose fine detail",
  "get a depth guide for splat training without extra sensors"
 ],
 "authority": "Yang et al., 2024",
 "url": "https://texelatlas.vercel.app/t/depth-anything-v2/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 34.92,
  "tier": "heavy",
  "p50_ms": 1.1488,
  "p95_ms": 1.2269,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 32,
  "preset_id": "depth-anything-v2-live",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 34.72,
   "tier": "heavy",
   "p50_ms": 0.5521,
   "p95_ms": 0.5574,
   "speedup_x": 2.08,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 23.1,
   "tier": "heavy",
   "p50_ms": 0.6653,
   "p95_ms": 0.6689,
   "speedup_x": 1.73,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}