Ultralytics YOLO27:
Get Started

NYU Depth V2 深度数据集#

NYU Depth V2 是标准的室内单目深度估计基准。它由使用 Microsoft Kinect v1 录制的 RGB-D 视频序列组成,涵盖各种室内场景。它是报告 YOLO26-Depth 精度时使用的主要基准。

在 Ultralytics Platform 上查看 NYU Depth V2,预览 RGB-深度图像对、检查数据集统计信息,并克隆数据集用于训练。

主要功能#

  • 使用 Microsoft Kinect v1 RGB-D 传感器采集。
  • 涵盖各种真实的室内场景(住宅、办公室、教室及类似空间)。
  • 深度范围最高约 10 m,符合消费级室内 RGB-D 采集的典型范围。
  • 在包含 654 张图像的标准 Eigen 测试集上进行评测。
  • 报告单目深度估计精度的主要基准。

在 YOLO26-Depth 中的作用#

NYU Depth V2 是 YOLO26-Depth 系列的主要零样本评测基准,深度任务页面上展示的主要指标均在该数据集上报告。已发布的 YOLO26-Depth 模型并未在 NYU 上训练;尽管该数据集包含训练集,但训练集不会使用,只报告留出测试集上的结果。

评估使用多尺度和水平翻转测试时增强(TTA),随后在计算指标前对预测深度图和真值深度图进行对数最小二乘尺度对齐。

结果#

下表按模型规模报告 NYU Depth V2 Eigen 测试集上的 delta1 精度(阈值为 1.25× 时像素所占比例,越高越好)。

模型delta1
YOLO26n-depth0.882
YOLO26s-depth0.896
YOLO26m-depth0.921
YOLO26l-depth0.930
YOLO26x-depth0.933

数据集 YAML#

数据集配置使用 YAML 文件定义,其中包含数据集路径、类别及其他相关信息。

ultralytics/cfg/datasets/nyu-depth.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# NYU Depth V2 dataset for monocular depth estimation
# Documentation: https://cs.nyu.edu/~fergus/datasets/nyu_depth_v2.html
# 795 train + 654 val (Eigen test split) images, 480x640, indoor scenes, depth in meters
# Example usage: yolo depth train data=nyu-depth.yaml model=yolo26n-depth.pt
# parent
# ├── ultralytics
# └── datasets
#     └── nyu-depth-png  ← downloads here (≈1.5 GB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: nyu-depth-png # dataset root dir (relative to Ultralytics settings 'datasets_dir')
train: images/train # train images (relative to 'path') 795 images
val: images/val # val images (relative to 'path') 654 images

# Depth maps are paired uint16 millimeter PNGs under depth/<split>/, resolved by
# swapping '/images/' -> '/depth/' on each image path.

# Classes
nc: 1
names:
  0: depth

channels: 3
depth_scale: 1000

# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/nyu-depth-png.zip

用法#

如需在 NYU Depth V2 基准上评测 YOLO26-Depth 模型,可以使用以下代码片段。可用参数的完整列表请参阅模型验证页面。

验证示例
from ultralytics import YOLO

# 加载模型
model = YOLO("yolo26x-depth.pt")  # 加载预训练深度模型

# 在 NYU Depth V2 基准上进行评测
results = model.val(data="nyu-depth.yaml")

预训练模型#

YOLO26 深度系列在 NYU Depth V2 基准上进行零样本评测。这些模型首次使用时会从 Ultralytics v8.4.0 资源发布版自动下载,例如 YOLO26x-depth;模型提供多种规模(yolo26n/s/m/l/x-depth),以满足不同的精度和资源需求。

引用与致谢#

如果你在研究或开发工作中使用 NYU Depth V2 数据集,请引用以下论文:

引用格式
@inproceedings{silberman2012indoor,
      title={Indoor Segmentation and Support Inference from RGBD Images},
      author={Silberman, Nathan and Hoiem, Derek and Kohli, Pushmeet and Fergus, Rob},
      booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
      year={2012}
}

我们感谢作者为计算机视觉社区创建并维护这一宝贵资源。

常见问题#

  • NYU Depth V2 是标准的室内单目深度基准,包含使用 Kinect v1 采集的住宅、办公室和教室 RGB-D 图像,深度范围约达 10 m,并采用广泛使用的 654 张图像 Eigen 测试集。YOLO26-Depth 的主要指标在深度估计任务页面上报告。

  • 不是。已发布模型采用零样本评测,因此 NYU 训练集不会使用,只报告留出测试集上的结果。已发表数值采用多尺度和翻转测试时增强,随后进行对数最小二乘尺度对齐。

  • 运行 yolo depth val data=nyu-depth.yaml model=yolo26x-depth.pt,或使用 Usage 部分中的 Python 示例。内置验证器使用带中值对齐的单尺度推理,因此其得分低于 Results 中的 TTA 数值;可查看任务页面了解可复现的数值。

  • 探索 Ultralytics Platform 上的 NYU Depth V2,预览 RGB-深度图像对、查看数据集统计信息,并克隆数据集以进行云端训练。

评论