BillLin66's picture
Publish reviewed SpatialGen export
77b5c05 verified
|
Raw History Blame Contribute Delete
7.11 kB

SpatialGen 导出

目录

SpatialGen_exported/
├── README.md
├── data/
│   ├── scene_00000/room_layout.json
│   ├── ...
│   ├── scene_00048/room_layout.json
│   ├── test_split.txt
│   └── test_split_caption.jsonl
├── kits/
│   ├── download_spatialgen.py
│   ├── convert_spatialgen.py
│   ├── unify_spatialgen.py
│   └── verify_spatialgen.py
├── spatialgen.jsonl
└── spatialgen.json

源场景编号为 scene_00000 至 scene_00048,缺少 scene_00028,共 48 个。data/ 保留房间布局、划分与描述;kits/ 保留下载、转换、汇总和验收脚本。spatialgen.jsonl 每行一个场景,spatialgen.json 将相同记录保存为 JSON 数组;共 48 个房间、977 条家具包围盒,源布局中的包围盒全部保留。

本地 .git/、.gitignore 可保留,上传 Hugging Face 时排除。

上游源数据

源数据为官方 manycore-research/SpatialGen-Testset 的公开测试集。场景来自设计师制作的室内布局,不是实景扫描。下载脚本从上游压缩包中选择 room_layout.json、test_split.txt,另取 test_split_caption.jsonl;不需要图像与相机文件来填充当前 schema。

当前下载地址使用上游 main,未固定提交版本;本次转换以 data/ 中保留的 48 份布局和描述文件为准。源许可为 CC BY-NC 4.0。这里的 48 个测试场景不代表论文所述完整数据集。

schema 字段表

字段以转换脚本为准。长度为米,面积为平方米,旋转为度。源包围盒已使用米;floor、ceil 线段坐标使用毫米,计算房间几何时乘 0.001,source_fields 中保留原毫米值。输出为右手 Z-up、场景局部坐标,不交换轴。

场景字段

字段 类型 来源与取值
scene_id string spatialgen_<源scene_id>。
sample_id string 与 scene_id 相同。
dataset string SpatialGen。
source_dataset string SpatialGen。
source_subset string test。
room_count integer 固定 1。
total_area number / null 与唯一房间的 room_area_m2 相同。
building_style null 不生成风格标签。
description string / null 源 test_split_caption.jsonl 中的原始 caption,缺失则 null。
description_source null 当前脚本固定为 null,不填描述文件路径。
provenance object source_file 为 data/<源scene_id>/room_layout.json,split 为 test,license_tag 为 CC BY-NC 4.0 (attribution, non-commercial)。
rooms array 源布局对应的唯一房间。

房间字段

字段 类型 来源与取值
room_id string <scene_id>::room_0。
room_index integer 固定 0。
room_type string / null 项目决定:依据源 caption 首句人工确定的 48 场景固定映射;当前取值为 bedroom、bathroom、kitchen、living room、living dining room、office。未列入映射的场景为 null。
room_type_source string 41 个为 description_explicit_keyword,7 个为 inferred_from_description。
room_boundary array<[number, number]> / null 从 floor 线段端点连接得到单个至少三点的闭环,转为米,按逆时针及最小起点规范化,保留 6 位小数;不能形成该闭环则 null。
room_boundary_type string / null 有边界为 polygon,否则 null。
room_area_m2 number / null 上述闭环的鞋带面积,保留 6 位小数;无边界则 null。
room_height number 源 ceil 全部线段端点的平均 Z 减 floor 全部端点的平均 Z,转为米并保留 6 位小数;当前实现要求两个端点列表均非空。
coordinate_system string 固定说明米制、右手 Z-up、场景局部原点、包围盒中心、缩放后尺寸、旋转规则,以及残留 floor/ceil 使用毫米。
doors array {furniture_index:n},引用源类别去首尾空白后精确为 screen door, screen 的家具;无记录为 []。
windows array 同 doors,精确类别为 window。
furniture_quantity integer len(furniture)。
furniture array 源包围盒按原数组顺序转换,不过滤实例。
source_fields object 原始 room_uid、floor、ceil,线段保持源毫米坐标。

家具字段

字段 类型 来源与取值
furniture_category string 源 class 精确匹配下述三项已确定的类别改名;其余仅去首尾空白。
furniture_instance_id string <scene_id>::obj_<源包围盒数组索引>。
furniture_position object 源 transform 的平移列对应 {x,y,z},保留 6 位小数;是包围盒中心,不是底部。
furniture_rotation object 对 transform 轴列归一化后取偏航角 z;直立时 x/y 为 0,倾斜时 x/y 为 null,偏航不可确定时 z 为 null。
furniture_size object 源 size 各分量乘 transform 对应轴列的范数,XYZ 对应 {width,length,height},保留 6 位小数。
source_fields object 原 class、transform、size,源数组索引 index,以及 transform_scale、transform_mirrored。

类别改名为 traffic light → ceiling lamp(traffic light)、screen door, screen → door(screen door, screen)、street lamp → lamp(street lamp),分别涉及 261、82、6 条记录。名称保留原词,原始 class 另存于 source_fields。

transform_scale 为三条轴列范数,保留 9 位小数;transform_mirrored 记录源变换是否含镜像。source_fields.transform 保留完整源变换,不将镜像伪装为纯旋转。

已知缺陷

  • 上游布局包围盒本身经过筛选,不代表场景内全部物体;caption 提及的对象也不保证存在对应包围盒。当前 977 条中有 204 条类别为 other。
  • 房型是针对这 48 个场景的人工映射,不是通用分类器;7 个非显式标签依赖对描述的解释,不能直接推广到新增场景。
  • 边界只按线段连接为闭环,不检测或修复自交。当前 scene_00019 的源地板与交付边界已存在自交,仍输出 polygon;其 54.889039 m² 是鞋带公式结果,不能视为有效简单多边形的物理面积。层高使用端点均值,不保证为最小净高。
  • 当前有 8 条倾斜变换、360 条镜像变换,导出的欧拉角不足以单独恢复这些完整姿态,需结合保留的源 transform。另有 266 个框最小尺寸小于 0.02 米,可能为源平面或薄片,未人为加厚。
  • 门窗只按上述精确源类别建立索引;其他类别写法不自动纳入。下载引用未固定上游提交,重新下载时文件可能与本次保留源数据不同。