YOLO Vision 2026:

Hypersim 深度数据集#

Hypersim 是一个用于整体室内场景理解的光度真实感合成室内场景数据集。其图像由专业创建的 Evermotion 3D 室内环境进行光线追踪生成,能够产生高度逼真的渲染图,并带有完美、稠密的每像素深度真值。

由于 Hypersim 是完全合成的,每个像素都具有准确的深度值,且不存在传感器噪声、漏测或测量伪影。这使其成为训练单目深度估计模型的干净、稠密室内几何结构的极佳数据源。

主要特性#

  • 逼真的 合成 室内场景,由专业 Evermotion 3D 室内环境光线追踪生成。
  • 仅限 室内 环境。
  • 密集且完美的 逐像素深度 真值,无传感器噪声或缺失值。
  • 深度范围大多在 ≤10 m(包含部分更远的距离)。
  • 为 Ultralytics 深度训练组合贡献了 74,619 张图像(68,242 张训练集 / 6,377 张验证集)。

数据集结构#

Hypersim 深度数据集分为两个子集:

  1. Train:68,242 张配有密集深度图的图像,用于训练。
  2. Val:6,377 张配有密集深度图的图像,用于训练期间的验证。

每张 RGB 图像都配有一个存储以米为单位的每像素距离的 .npy float32 深度图,符合Ultralytics 深度数据集格式

获取数据#

Hypersim 不支持自动下载——该数据集(约 ~1.9 TB 的每场景 ZIP 文件)由苹果公司在 CC BY-SA 3.0 许可证下分发,并使用来自 ml-hypersim 仓库的官方脚本进行下载(contrib/99991 中提供了一个选择性下载器):

git clone https://github.com/apple/ml-hypersim && cd ml-hypersim
python code/python/tools/dataset_download_images.py --downloads_dir ./downloads --decompress_dir ./scenes

RGB 帧是 frame.*.tonemap.jpg 预览,深度位于 frame.*.depth_meters.hdf5。存储的值是到相机中心的射线距离,而非平面深度——请在保存前进行转换,并将 NaN 像素(窗户、天空)映射为 0(无效)。使用官方的 metadata_images_split_scene_v1.csv 场景划分来进行训练/验证分配。转换为Ultralytics 深度数据集格式的参考代码:

import shutil
from pathlib import Path

import h5py
import numpy as np

W, H, FOCAL = 1024, 768, 886.81  # Hypersim camera intrinsics
x, y = np.meshgrid(np.linspace(-W / 2, W / 2, W), np.linspace(-H / 2, H / 2, H))
ray2plane = (FOCAL / np.sqrt(x**2 + y**2 + FOCAL**2)).astype(np.float32)  # distance → planar depth

src, dst = Path("scenes"), Path("datasets/depth-hypersim")
out = "train"  # assign per scene from metadata_images_split_scene_v1.csv
(dst / f"images/{out}").mkdir(parents=True, exist_ok=True)
(dst / f"depth/{out}").mkdir(parents=True, exist_ok=True)
for h5 in sorted(src.rglob("*.depth_meters.hdf5")):
    scene, cam, frame = h5.parts[-4], h5.parent.name.split("_geometry")[0], h5.name.split(".")[1]
    rgb = h5.parents[1] / f"{cam}_final_preview" / f"frame.{frame}.tonemap.jpg"
    dist = np.asarray(h5py.File(h5)["dataset"], np.float32)
    depth = np.nan_to_num(dist * ray2plane, nan=0.0)  # NaN (sky, glass) → 0 = invalid
    name = f"{scene}_{cam}_{frame}"
    np.save(dst / f"depth/{out}/{name}.npy", depth)
    shutil.copy(rgb, dst / f"images/{out}/{name}.jpg")

在 YOLO26-Depth 中的作用#

Hypersim 是用于预训练 Ultralytics YOLO26-Depth 模型的庞大多数据集组合(约 219 万张图像)中的 训练源 之一。在此组合中,Hypersim 提供了干净、密集的室内几何数据,作为噪声较大的现实传感器数据的补充。

在此设置中没有独立的 Hypersim 基准测试。相反,生成的模型会在标准的单目深度基准上进行评估:NYU Depth V2、KITTI、Make3D、ETH3D 和 iBims-1。

数据集 YAML#

YAML(Yet Another Markup Language)文件用于定义数据集配置。它包含有关数据集路径、类别和其他相关信息。对于 Hypersim,depth-hypersim.yaml 文件定义了路径和单个 depth 类别。

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

# Hypersim dataset for monocular depth estimation — photorealistic synthetic indoor (ray-traced), dense depth up to ~10 m
# Documentation: https://docs.ultralytics.com/datasets/depth/hypersim
# Example usage: yolo depth train data=depth-hypersim.yaml model=yolo26n-depth.pt
# No autodownload — obtain the source data (see docs) and arrange it as below.
# parent
# ├── ultralytics
# └── datasets
#     └── depth-hypersim
#         ├── images/{train,val}  # RGB images
#         └── depth/{train,val}   # paired *.npy, float32 meters (images/ -> depth/)

path: depth-hypersim # dataset root dir (relative to Ultralytics settings 'datasets_dir')
train: images/train # train images (relative to 'path') 68242 images
val: images/val # val images (relative to 'path') 6377 images

nc: 1
names:
  0: depth

channels: 3

用法#

要在 Hypersim 数据集上训练图像大小为 640 的 YOLO26n-Depth 模型,你可以使用以下代码片段。有关可用参数的完整列表,请参考模型训练页面。

训练示例
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-depth.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="depth-hypersim.yaml", epochs=100, imgsz=640)

预训练模型#

YOLO26 深度系列(yolo26n-depth.ptyolo26s-depth.ptyolo26m-depth.ptyolo26l-depth.ptyolo26x-depth.pt)支持从 Ultralytics 发行版自动下载,并在 Hypersim 作为其中一部分的广泛多数据集混合上进行训练。在 Ultralytics Platform 上探索 YOLO26x-depth

引用与致谢#

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

引用
@inproceedings{roberts2021hypersim,
      title={Hypersim: A Photorealistic Synthetic Dataset for Holistic Indoor Scene Understanding},
      author={Mike Roberts and Jason Ramapuram and Anurag Ranjan and Atulit Kumar and Miguel Angel Bautista and Nathan Paczan and Russ Webb and Joshua M. Susskind},
      booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
      year={2021}
}

我们衷心感谢 Hypersim 的创作者们,感谢他们将这一逼真的合成室内数据集提供给计算机视觉社区。

评论