hypersim-frustum-completion
收藏资源简介:
Hypersim Frustum Point Completion 是一个用于室内点云补全任务的大规模合成数据集,派生自 Hypersim 数据集。该数据集旨在解决现实世界三维捕获(如深度传感器、多视图重建)中常见的几何不完整问题(如遮挡、视野限制)。它通过模拟部分观察的房间来构建训练数据:一个真实的相机视图提供上下文(可见点云),而一个合成的邻近“缺失相机”视锥体则隐藏了场景的一部分。模型的任务是根据可见点来推断被遮挡(掩码)区域的几何和外观。数据集包含约 57,000 个记录(.npz 文件),覆盖了 Hypersim 中的 457 个公开室内场景。每个记录包含 8,192 个三维点,每个点都提供了丰富的属性:世界坐标系下的三维坐标(xyz,单位:米,float32)、RGB 颜色值(uint8)以及世界坐标系下的法向量(normal,float32)。关键特征是每个点都被标记为“可见”(在上下文相机视锥体外,作为模型输入)或“掩码”(在合成缺失相机视锥体内,作为补全目标),掩码区域占全部点数的 5% 到 40%。此外,每个记录还提供了有符号距离场(region_sdf)、缺失视锥体的边界框描述符(region_descriptor)、上下文相机和缺失相机的位姿矩阵(world-to-camera)、相机内参以及包含场景、帧、变体、数据分割等信息的元数据。数据按照场景组织,并在每个场景内基于帧索引进行分割:每第 10 帧用于测试(test);帧索引为 5, 15, 25... 的帧用于验证(val);其余帧用于训练(train)。为保障严格的训练/验证隔离,建议将十个场景作为物理保留集。该数据集专为监督式点云补全、三维修复和几何推理任务而设计,适用于需要从部分观测中预测完整三维几何的计算机视觉和机器人学应用。数据集遵循 CC-BY-SA 3.0 许可证。
Hypersim Frustum Point Completion is a large-scale synthetic dataset for indoor point cloud completion tasks, derived from the Hypersim dataset. It aims to address common geometric incompleteness issues (such as occlusion and field-of-view limitations) in real-world 3D capture (e.g., depth sensors, multi-view reconstruction). The dataset constructs training data by simulating partially observed rooms: a real camera view provides context (visible point cloud), while a synthetic adjacent missing camera frustum hides part of the scene. The models task is to infer the geometry and appearance of the occluded (masked) region based on visible points. The dataset contains approximately 57,000 records (.npz files), covering 457 public indoor scenes from Hypersim. Each record includes 8,192 3D points, with each point providing rich attributes: 3D coordinates in world coordinates (xyz, unit: meters, float32), RGB color values (uint8), and normal vectors in world coordinates (normal, float32). A key feature is that each point is labeled as visible (outside the context camera frustum, serving as model input) or masked (inside the synthetic missing camera frustum, serving as the completion target), with masked regions accounting for 5% to 40% of all points. Additionally, each record provides a signed distance field (region_sdf), a bounding box descriptor for the missing frustum (region_descriptor), pose matrices for the context and missing cameras (world-to-camera), camera intrinsics, and metadata including scene, frame, variant, and data split information. The data is organized by scene and split within each scene based on frame index: every 10th frame is used for testing (test); frames with indices 5, 15, 25... are used for validation (val); and the remaining frames are used for training (train). To ensure strict training/validation isolation, it is recommended to reserve ten scenes as a physical hold-out set. The dataset is designed for supervised point cloud completion, 3D inpainting, and geometric reasoning tasks, suitable for computer vision and robotics applications that require predicting complete 3D geometry from partial observations. The dataset follows the CC-BY-SA 3.0 license.
数据集概述:Hypersim Frustum Point Completion
该数据集是一个大规模室内点云补全数据集,源自 Hypersim 数据集(457个公开场景)。每个记录模拟一个部分观测的房间:一个真实相机视图提供上下文,而一个合成的“缺失相机”视锥体隐藏了场景的局部。模型被训练从可见点推断被遮蔽的区域。
数据集规模与结构
| 属性 | 值 |
|---|---|
| 来源 | Hypersim(457个公开场景) |
| 记录数 | 约 57k 个 .npz 文件(按场景划分 train/val/test) |
| 每记录点数 | 8,192 |
| 通道 | xyz(float32,米)、rgb(uint8)、normal(float32,世界坐标系) |
| 遮蔽比例 | 5%–40% 的上下文点被合成视锥体隐藏 |
| 每帧变体 | 20 个可接受的缺失相机姿态 |
| 许可证 | CC-BY-SA 3.0(Hypersim 的衍生作品) |
文件布局
场景目录位于仓库根目录下(每个 Hypersim 场景一个文件夹),结构如下:
ai_002_001/ ├── manifest.csv # 每记录一行(包含划分、遮蔽统计等) ├── stats.json # 每个场景的聚合统计 └── records/ ├── ai_002_001__f0000_v00.npz └── ... repro/ # 从 Hypersim 重建的脚本和加载器 ├── configs/ ├── scripts/ ├── prob3d/ └── requirements.txt
记录模式(.npz 文件)
| 键 | 形状 | 数据类型 | 描述 |
|---|---|---|---|
xyz |
(N, 3) | float32 | 世界坐标系位置(米) |
rgb |
(N, 3) | uint8 | 源像素 RGB |
normal |
(N, 3) | float32 | 世界坐标系真值法线 |
is_visible |
(N,) | bool | True 表示点在缺失视锥体之外 |
region_sdf |
(N,) | float32 | 到缺失视锥体边界的带符号距离(内部为正值) |
region_descriptor |
(6,) | float32 | 缺失视锥体 AABB 的质心 + 半范围 |
context_w2c |
(4, 4) | float64 | 上下文相机的世界到相机矩阵(OpenCV) |
missing_w2c |
(4, 4) | float64 | 合成缺失相机的世界到相机矩阵 |
intrinsics |
(8,) | float32 | fx, fy, cx, cy, W, H, znear, zfar |
meta |
object | dict | 场景、帧、变体、划分、遮蔽比例、随机种子 |
数据集划分(基于帧索引,每个场景独立):test 为每第10帧;val 为第5、15、25帧...;其余帧为 train。
快速开始(PyTorch 加载器)
-
安装依赖: bash cd repro pip install -r requirements.txt export PYTHONPATH=$(pwd)
-
加载训练集: python from pathlib import Path from prob3d.training.dataset import FrustumCompletionDataset
root = Path("..") # 数据集的根目录 ds = FrustumCompletionDataset(root, split="train") sample = ds[0]
可见点(is_visible 为 True)是模型输入;被遮蔽点(is_visible 为 False)是补全目标。
保留场景
建议将10个场景作为物理保留集(文件 repro/docs/HOLDOUT_SCENES.json,种子 0)。在训练前将它们移出训练根目录:
bash
cd repro
PYTHONPATH=$(pwd) python scripts/make_holdout_split.py
--dataset-root ..
--holdout-dir ../holdout_10scenes
--n 10 --seed 0
从 Hypersim 重建
完整流程从 Apple CDN 下载公开 Hypersim 场景压缩包,提取几何并构建记录: bash bash scripts/prepare_full_dataset.sh --out-dir /path/to/completion_dataset --workers 4
单场景测试: bash PYTHONPATH=$(pwd) python scripts/prepare_completion_dataset.py --scene-dir /path/to/raw/hypersim/ai_002_001 --out-dir /tmp/ai_002_001 --with-normals
验证: bash PYTHONPATH=$(pwd) python scripts/validate_completion_scene.py /tmp/ai_002_001
完整版本生成参数
| 参数 | 值 |
|---|---|
n_points |
8192 |
n_variants |
每帧 20 |
mask_min_frac / mask_max_frac |
0.05 / 0.40 |
z_near / z_far |
0.2 / 8.0 米 |
| 纹理子采样 | 7×7 亮度标准差,5% 阈值 |
seed |
0 |
val_frame_stride / test_frame_stride |
10 / 10 |
引用
该数据集是 Hypersim 数据集(Roberts 等,Apple)的衍生作品,使用 CC-BY-SA 3.0 许可证。如使用,请引用 Hypersim 原始论文。





