ARKitScenes 深度数据集#
ARKitScenes 是一个使用配备激光雷达扫描仪的 iPad Pro 设备上的 Apple ARKit 拍摄的大规模真实世界室内 RGB-D 数据集。它是同类中最大的真实世界室内 RGB-D dataset,提供了多样化、自然拍摄的室内场景,并为 单目深度估计 提供了准确的深度真实真值。
主要特性#
- 通过 iPad Pro 上 Apple ARKit 的 LiDAR 扫描仪和 RGB 相机捕获,产生真实的(非合成)传感器数据。
- 涵盖用于 3D 室内场景理解的多样化 室内 场景。
- 深度范围较短,约为 0.5–6 米(中位最大深度约为 2.4 米),属于典型的室内手持设备捕获范围。
- 与 RGB 帧对齐的密集 LiDAR 衍生深度真值。
- Ultralytics 深度预训练混合数据中最大的单一真实世界来源。
数据集结构#
ARKitScenes 深度数据集分为两个子集:
- Train(训练集):676,080 张带有配对深度图的图像,用于训练。
- Val(验证集):21,559 张带有配对深度图的图像,用于模型训练期间的验证。
每个样本包含一个 RGB 图像和一个配对的 .npy float32 深度图,以米为单位存储每个像素的距离,遵循 Ultralytics 深度数据集格式。
获取数据#
ARKitScenes 没有自动下载功能——数据由 Apple 分发,下载需要接受 ARKitScenes 仓库 中的许可条款。克隆仓库并下载深度上采样子集,该子集将 RGB 帧与配准的深度进行配对:
git clone https://github.com/apple/ARKitScenes && cd ARKitScenes
python3 download_data.py upsampling --split Training --download_dir ./data
python3 download_data.py upsampling --split Validation --download_dir ./data深度帧是 毫米 单位的 uint16 PNG(0 = 无效),RGB/深度文件名是捕获时间戳,它们不完全匹配——将每个深度帧与最近时间戳的 RGB 帧配对。转换为 Ultralytics 深度数据集格式 的参考代码:
from pathlib import Path
import cv2
import numpy as np
src, dst = Path("data/upsampling"), Path("datasets/depth-arkitscenes")
for split, out in (("Training", "train"), ("Validation", "val")):
(dst / f"images/{out}").mkdir(parents=True, exist_ok=True)
(dst / f"depth/{out}").mkdir(parents=True, exist_ok=True)
for video in sorted((src / split).iterdir()):
rgbs = {float(p.stem.split("_")[-1]): p for p in (video / "lowres_wide").glob("*.png")}
if not rgbs:
continue
for depth_png in sorted((video / "lowres_depth").glob("*.png")):
t = float(depth_png.stem.split("_")[-1])
rgb = rgbs[min(rgbs, key=lambda k: abs(k - t))] # nearest-timestamp RGB frame
name = f"{video.name}_{depth_png.stem}"
depth = cv2.imread(str(depth_png), cv2.IMREAD_UNCHANGED).astype(np.float32) / 1000.0 # mm → m
np.save(dst / f"depth/{out}/{name}.npy", depth)
cv2.imwrite(str(dst / f"images/{out}/{name}.png"), cv2.imread(str(rgb)))在 YOLO26-Depth 中的作用#
ARKitScenes 是 Ultralytics YOLO26-Depth 多数据集预训练混合数据(约 219 万对图像-深度数据)中的一个 训练 源。作为该混合数据中最大的单一真实来源,它提供了丰富的真实室内 LiDAR 深度信息,从而稳固了模型在短距离室内环境下的准确性。生成的模型将在标准的 NYU、KITTI、Make3D、ETH3D 和 iBims-1 基准上进行评估。
数据集 YAML#
YAML (Yet Another Markup Language) 文件用于定义数据集配置。它包含有关数据集路径、类别和其他相关信息。
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# ARKitScenes dataset for monocular depth estimation — real indoor RGB-D from Apple ARKit (iPad Pro LiDAR), depth ~0.5-6 m
# Documentation: https://docs.ultralytics.com/datasets/depth/arkitscenes
# Example usage: yolo depth train data=depth-arkitscenes.yaml model=yolo26n-depth.pt
# No autodownload — obtain the source data (see docs) and arrange it as below.
# parent
# ├── ultralytics
# └── datasets
# └── depth-arkitscenes
# ├── images/{train,val} # RGB images
# └── depth/{train,val} # paired *.npy, float32 meters (images/ -> depth/)
path: depth-arkitscenes # dataset root dir (relative to Ultralytics settings 'datasets_dir')
train: images/train # train images (relative to 'path') 676080 images
val: images/val # val images (relative to 'path') 21559 images
nc: 1
names:
0: depth
channels: 3用法#
要在 ARKitScenes 数据集上训练 YOLO26n-depth 模型,图像大小为 640,你可以使用以下代码片段。有关可用参数的完整列表,请参考模型 Training 页面。
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-depth.pt") # load a pretrained depth model (recommended for training)
# Train the model
results = model.train(data="depth-arkitscenes.yaml", epochs=100, imgsz=640)预训练模型#
YOLO26 深度系列是在 ARKitScenes 所属的广泛的多数据集深度预训练混合上进行训练的。这些模型从最新的 Ultralytics 版本中自动下载,例如来自 v8.4.0 的 YOLO26x-depth,并且涵盖了适合不同准确度和资源要求的各种尺寸。
引用与致谢#
如果你在研究或开发工作中使用了 ARKitScenes 数据集,请引用以下论文:
@inproceedings{baruch2021arkitscenes,
title={ARKitScenes: A Diverse Real-World Dataset for 3D Indoor Scene Understanding Using Mobile RGB-D Data},
author={Baruch, Gilad and Chen, Zhuoyuan and Dehghan, Afshin and Dimry, Tal and Feigin, Yuri and Fu, Peter and Gebauer, Thomas and Joffe, Brandon and Kurz, Daniel and Schwartz, Arik and Shulman, Elad},
booktitle={Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
year={2021}
}我们感谢作者为计算机视觉社区创建并维护了这一宝贵的资源。