3dvlm-hypersim
收藏资源简介:
本数据集是Hypersim(Apple,ICCV 2021)经过重新转换后的版本,采用了3DVLM项目的统一格式。Hypersim是一个用于整体室内场景理解的光照真实合成数据集,包含457个室内场景,总计约77,400帧图像数据,并提供了V-Ray渲染生成的真实深度信息。数据以场景为单位组织,每个场景包含RGB彩色图像、深度文件、相机内参和外参矩阵、有效掩码以及元数据文件,所有数据严格对齐。数据集适用于三维视觉、视觉语言模型、场景理解、深度估计、新视图合成和三维重建等任务,遵循CC BY-SA 3.0许可协议。
This dataset is a re-converted version of Hypersim (Apple, ICCV 2021), adopting the unified format of the 3DVLM project. Hypersim is a photorealistic synthetic dataset for holistic indoor scene understanding, containing 457 indoor scenes with approximately 77,400 image frames, and provides realistic depth information generated by V-Ray rendering. The data is organized by scene, with each scene including RGB color images, depth files, camera intrinsic and extrinsic matrices, valid masks, and metadata files, all strictly aligned. The dataset is suitable for tasks such as 3D vision, vision-language models, scene understanding, depth estimation, novel view synthesis, and 3D reconstruction, and is licensed under CC BY-SA 3.0.
数据集概述
3DVLM Hypersim — §6 depth format 是苹果公司 Hypersim 数据集(ICCV 2021)的重制版本,遵循 3DVLM 项目的统一 §6 磁盘格式。该数据集包含 457 个场景,约 77,400 帧 图像,并提供 V-Ray 渲染的 ground truth 数据。
- 许可协议: CC BY-SA 3.0(继承自原始 Hypersim 数据集)
- 数据规模: 10,000 < n < 100,000 帧
- 语言: 英语
- 标签: 深度 (depth)、3D、视觉语言模型 (VLM)、场景理解 (scene-understanding)、Hypersim
数据布局
数据集以每个场景一个未压缩的 .tar 文件形式存储于仓库根目录的 hypersim/ 文件夹下:
hypersim/ ai_001_001.tar ai_001_002.tar ... ai_055_010.tar # 共457个tar文件,每个约620 MB,总计约303 GB
每个 tar 文件解压后生成一个 {scene_id}/ 目录,遵循 §6 格式,包含以下文件:
| 文件 | 格式 | 描述 |
|---|---|---|
images/{frame_id}.jpg |
JPEG | RGB 图像,分辨率 1024 × 768 |
depth.npy |
float32, (N, H, W) | z 深度(沿相机 z 轴),单位为米 |
intrinsics.npy |
float32, (N, 3, 3) | 相机内参矩阵 |
extrinsics.npy |
float32, (N, 4, 4) | w2c 外参矩阵(OpenCV 坐标系) |
valid_mask.npy |
bool, (N, H, W) | 有效像素掩码,True 表示有效 |
meta.json |
JSON | 场景元数据 |
meta.json 示例:
json
{
"scene_id": "hypersim/ai_001_001",
"dataset": "hypersim",
"is_pseudo": false,
"frame_ids": ["cam_00_frame_0001", "..."],
"image_size": [768, 1024]
}
数据约定
- 深度: 使用 z 深度(沿相机 z 轴),而非欧几里得距离。原始 Hypersim 的欧几里得深度已在转换过程中进行余弦校正。
- 外参: w2c 格式,遵循 OpenCV 坐标系(x 向右,y 向下,z 向前)。原始 OpenGL 的 c2w 姿态已反转,且旋转矩阵列 1 和 2 已翻转。
- 有效掩码:
False表示 NaN、超出范围、天空、玻璃等无效像素。 - 帧索引:
frame_ids的顺序与所有.npy文件的第一个维度严格对应,images/{frame_ids[i]}.jpg与索引i对齐。 - 光线图 (Raymap): 不直接存储,需根据
(intrinsics, extrinsics)在模型端推导(遵循 DA3 约定:未归一化方向 + z 深度 + w2c)。
固定内参
内参在每个场景内恒定,但为保持格式统一,仍为每帧单独存储。
| 参数 | 值 |
|---|---|
| fx, fy | 886.81 |
| cx | 511.5 |
| cy | 383.5 |
| 图像尺寸 | 768 × 1024 |
下载与解压
完整数据集: bash hf auth login hf download helioom/3dvlm-hypersim --repo-type dataset --local-dir ./hypersim_raw mkdir -p hypersim for t in hypersim_raw/hypersim/*.tar; do tar -xf "$t" -C hypersim/; done
单个场景: bash hf download helioom/3dvlm-hypersim --repo-type dataset --include "hypersim/ai_001_001.tar" --local-dir ./hypersim_raw tar -xf hypersim_raw/hypersim/ai_001_001.tar -C ./
最小加载器示例
python import json, numpy as np, torch from pathlib import Path from PIL import Image
class SceneFrames(torch.utils.data.Dataset): """One scene → N frames. Returns (rgb, depth, K, w2c, valid)."""
def __init__(self, scene_dir: str):
root = Path(scene_dir)
self.meta = json.loads((root / "meta.json").read_text())
self.depth = np.load(root / "depth.npy", mmap_mode="r")
self.K = np.load(root / "intrinsics.npy", mmap_mode="r")
self.E = np.load(root / "extrinsics.npy", mmap_mode="r")
self.V = np.load(root / "valid_mask.npy", mmap_mode="r")
self.imgs = [root / "images" / f"{fid}.jpg"
for fid in self.meta["frame_ids"]]
def __len__(self) -> int:
return len(self.imgs)
def __getitem__(self, i: int):
rgb = np.asarray(Image.open(self.imgs[i]).convert("RGB"))
return {
"rgb": torch.from_numpy(rgb),
"depth": torch.from_numpy(self.depth[i].copy()),
"K": torch.from_numpy(self.K[i].copy()),
"w2c": torch.from_numpy(self.E[i].copy()),
"valid": torch.from_numpy(self.V[i].copy()),
}
来源与引用
- 原始仓库: https://github.com/apple/ml-hypersim
- 论文: Roberts et al., Hypersim: A Photorealistic Synthetic Dataset for Holistic Indoor Scene Understanding, ICCV 2021.
- 许可协议: CC BY-SA 3.0(Apple Inc. 版权所有,衍生数据需继承相同许可条款)




