Depth Anything 3 (V3) 和 V2 的 区别、 用法 与 商用
关于本文:由 Owl3D 根据公开资料撰写,15 条参考资料列于文末。
简单来说
Depth Anything 是

左:
要
- 区
别: V2 从一 张 照片 生成 深度 图。 V3 能 从 多 张 照片 同时 估计 深度 和 相机 位 置[1][2]。 - 商用: 在 GitHub 和 Hugging Face 上
都 标为 Apache 2.0 的, 是 V2 Small、 DA3-SMALL、 DA3-BASE、 DA3METRIC-LARGE 和 DA3MONO-LARGE。 V2 度量 版 Small 要 注意 训练 数据 的 许可证。 其余 模型 是 非商用 (CC BY-NC 4.0), 或 两 边 标注 不 一 致 [1] [2][5]。 - 马
上 不试: 写 代码 的话, 可以 用免费 的 深度 ,图生 成 工具 在 浏览器 里 运行 V2 Small (工具 和 本文 都 由 Owl3D 制作)。 - 有
三 种 用法: ① 免 代 码 用 浏览器 工具; ② Python (V2 用 Transformers 几 行 就 能 跑, V3 要 装 专用 包); ③ ComfyUI 节点 (用法)。 - V2 和 V3 的
数值 方向 相反, 直接 并 排 看会 黑白颠倒 (常见 问题 )。
V2 和 V3 的区别
最
| Depth Anything V2 | Depth Anything 3 | |
|---|---|---|
| 发布 | 2024 年 6 月 14 日 | 2025 年 11 月 14 日 |
| 开发 | 香港 | ByteDance Seed[2][6] |
| 输入 | 一 | 一 |
| 输出 | 深度 | 深度 |
| 尺寸 | Small 24.8M、 | Small 0.08B、 |
| 输 | 越近 | 越 |
V3 的
开发
选哪个模型?
先
快速
DA3METRIC-LARGE 的
能商用吗?按尺寸的许可证一览
Depth Anything 的
| 模型 | GitHub 标注 | Hugging Face 标注 | 商 |
|---|---|---|---|
| V2 Small | Apache 2.0 | apache-2.0 | 可以 |
| V2 Base / Large | CC BY-NC 4.0 | cc-by-nc-4.0 | 不 |
| V2 度量 | 未 | apache-2.0 | 注意 |
| V2 度量 | 未 | apache-2.0 | 标注 |
| DA3-SMALL / DA3-BASE | Apache 2.0 | apache-2.0 | 可以 |
| DA3METRIC-LARGE / DA3MONO-LARGE | Apache 2.0 | apache-2.0 | 可以 |
| DA3-LARGE | CC BY-NC 4.0 | cc-by-nc-4.0 | 不 |
| DA3-LARGE-1.1 | CC BY-NC 4.0 | apache-2.0 | 标注 |
| DA3-GIANT | CC BY-NC 4.0 | cc-by-nc-4.0 | 不 |
Apache 2.0 的
此
用法:免代码、Python、ComfyUI
免代码试用
Owl3D 的
Python(V2)
V2 已pip install transformers torch pillow。
from transformers import pipeline
from PIL import Image
pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Small-hf")
image = Image.open("photo.jpg")
depth = pipe(image)["depth"] # 用于显示的 8 位图像(近处为白)
depth.save("depth.png")
用于pipe(image)["predicted_depth"] 取得。model= 改成 "depth-anything/Depth-Anything-V2-Large-hf" 就
Python(V3)
V3 要
pip install xformers "torch>=2" torchvision
git clone https://github.com/ByteDance-Seed/Depth-Anything-3
cd Depth-Anything-3
pip install -e .
import numpy as np, torch
from PIL import Image
from depth_anything_3.api import DepthAnything3
model = DepthAnything3.from_pretrained("depth-anything/DA3-SMALL").to(torch.device("cuda"))
prediction = model.inference(["photo.jpg"])
depth = prediction.depth[0] # [高, 宽] 的 float32 数组,值越大越远
# 尺寸是计算时的尺寸(1280×853 的照片为 504×336)
d = 1.0 / np.maximum(depth, 1e-6) # 取倒数,让近处值大(与 V2 方向相同)
d = (d - d.min()) / (d.max() - d.min()) # 归一化到 0~1
Image.fromarray((d * 255).astype("uint8")).save("depth_v3.png")
上面
需要什么电脑、速度多快
V2 的
| 模型 | 运行 |
单 |
GPU 显存 |
|---|---|---|---|
| V2 Small | RTX 4090 | 约 0.04 秒 | 约 0.3GB |
| V2 Small | CPU |
约 0.5 秒 | — |
| DA3-SMALL | RTX 4090 | 约 0.05 秒 | 约 0.3GB |
处理
ComfyUI 和 Blender
ComfyUI 方面,
什么是单目深度估计
深度
想用在视频上
V2 仓库里
Owl3D 软件
{{cta}}
常见问题
V2 和 V3,到底该用哪个?
只要
Depth Anything 免费吗?可以商用吗?
模型
用非商用模型生成的深度图,不能商用吗?
如果
为什么 V2 和 V3 的深度图黑白是反的?
V2 的
Depth Anything 能算出以米为单位的距离吗?
标准 V2 不
参考资料 (15)
- Lihe Yang 等,
〈Depth Anything V2〉GitHub README。 https://github.com/DepthAnything/Depth-Anything-V2 (2026-12-03 查阅,英文) - Haotong Lin 等
(ByteDance Seed), 〈Depth Anything 3〉GitHub README。 https://github.com/ByteDance-Seed/Depth-Anything-3 (2026-12-03 查阅,英文) - Hugging Face,
〈Monocular depth estimation〉Transformers 文档。 https://huggingface.co/docs/transformers/en/tasks/monocular_depth_estimation (2026-12-02 查阅,英文) - Lihe Yang 等,
〈Depth Anything V2 for Metric Depth Estimation〉GitHub。 https://github.com/DepthAnything/Depth-Anything-V2/tree/main/metric_depth (2026-12-03 查阅,英文) - Hugging Face,
Depth Anything V2 和 Depth Anything 3 的 模型 列表 (depth-anything) 及 各 模型 的 许可 证 标注。 https://huggingface.co/depth-anything 、https://huggingface.co/api/models?author=depth-anything (2026-12-03 查阅,英文) - Hugging Face,
〈DA3-LARGE-1.1〉模型 页面。 https://huggingface.co/depth-anything/DA3-LARGE-1.1 (2026-12-03 查阅,英文) - Apache Software Foundation,
〈Apache License, Version 2.0〉。 https://www.apache.org/licenses/LICENSE-2.0 (2026-12-02 查阅,英文) - Creative Commons,
〈署 名 —非 商业性 使用 4.0 协议 国际 版 (CC BY-NC 4.0)〉 协议 摘要。 https://creativecommons.org/licenses/by-nc/4.0/deed.zh-hans (2026-12-02 查阅) - Depth Anything V2,
LICENSE (GitHub)。 https://github.com/DepthAnything/Depth-Anything-V2/blob/main/LICENSE (2026-12-03 查阅,英文) - Depth Anything 3,
LICENSE (GitHub)。 https://github.com/ByteDance-Seed/Depth-Anything-3/blob/main/LICENSE (2026-12-03 查阅,英文) - GitHub issue #259〈LARGE-1.1 model license〉
(Depth Anything 3)。 https://github.com/ByteDance-Seed/Depth-Anything-3/issues/259 (2026-12-03 查阅,英文) - NAVER LABS Europe,
〈Virtual KITTI 2 Dataset〉。 https://europe.naverlabs.com/research/computer-vision/proxy-virtual-worlds-vkitti-2/ (2026-12-03 查阅,英文) - Apple,
〈Hypersim〉GitHub README。 https://github.com/apple-aiml-research/ml-hypersim (2026-12-03 查阅,英文) - Sili Chen 等,
〈Video Depth Anything〉 GitHub README。 https://github.com/DepthAnything/Video-Depth-Anything (2026-12-03 查阅,英文) - Lihe Yang 等,
〈Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data〉arXiv:2401.10891 (2024 年 1 月 19 日)。 https://arxiv.org/abs/2401.10891 (2026-12-03 查阅,英文)