企业级安全防护: 符合 ISO 27001 + SOC 2 Type I 标准。

Link to this sectionHypersim 深度数据集#

Hypersim 是一个专为全方位室内场景理解而设计的逼真合成室内场景数据集。其图像由专业打造的 Evermotion 3D 室内环境进行光线追踪生成,呈现出高度逼真的渲染效果,并配有完美、密集的逐像素深度真值。

由于 Hypersim 是完全合成的,因此每个像素都具有精确的深度值,没有传感器噪声、漏检或测量伪影。这使其成为训练单目 深度估计 模型时获取干净、密集室内几何结构的出色来源。

Link to this section主要特性#

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

Link to this section数据集结构#

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

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

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

Link to this section获取数据#

Hypersim 没有自动下载功能——该数据集(约 1.9 TB 的分场景 ZIP 文件)由 Apple 根据 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")

Link to this section在 YOLO26-Depth 中的角色#

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

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

Link to this section数据集 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

Link to this section用法#

若要在图像尺寸为 640 的 Hypersim 数据集上训练 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)

Link to this section预训练模型#

YOLO26 深度系列(yolo26n-depth.ptyolo26s-depth.ptyolo26m-depth.ptyolo26l-depth.ptyolo26x-depth.pt)会自动从 v8.4.0 版本 下载,并基于包含 Hypersim 的庞大多数据集组合进行训练。

Link to this section引用与致谢#

如果你在研究或开发工作中使用了 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 的创作者们,感谢他们将这一逼真的合成室内数据集提供给计算机视觉社区。

贡献者

评论