3d-wm-atomic-v2
收藏资源简介:
3d-wm-atomic-v2 是一个合成计算机辅助设计(CAD)构建视频数据集,专门用于训练视频到动作(逆动力学,IDM)和图像到下一帧(视频生成)模型。数据集包含从 CadQuery 构建程序生成的每操作动画帧序列,每个帧都带有连续原始毫米单位的原子操作标签。数据来源于 filapro/cad-recode 数据集的训练分割,并经过重新渲染以生成每操作动画。每个数据片段对应一个(案例,视角)对,从五个兄弟视角(等轴测、前视、侧视、顶视、随机)渲染,共享相同的物理毫米/像素锚点。数据以压缩包形式组织,包含 256x256 像素的 PNG 渲染帧、元数据文件(如 meta.json、ops.json 和 frame_codes.json)。数据规模在 10 万到 100 万样本之间,原子操作词汇表包含 10 种操作类型(如 SKETCH_BEGIN、SEGMENT 等),每个操作有稳定的 ID 和连续毫米参数。元数据提供了详细的场景信息,包括摄像机角度、世界边界框、规范化偏移和每帧操作进度。数据集经过坐标规范化处理,使最终网格边界框以世界原点为中心,便于模型学习。兄弟视角共享相同的比例和边界框,仅视角不同,支持视角不变特征训练。数据集格式为 v2-continuous-mm,适用于 CAD 相关的视频分类、逆动力学建模和视频生成等任务。
3d-wm-atomic-v2 is a synthetic computer-aided design (CAD) construction video dataset specifically designed for training video-to-action (inverse dynamics, IDM) and image-to-next-frame (video generation) models. The dataset contains per-operation animation frame sequences generated from CadQuery build programs, with each frame labeled with continuous atomic operations in raw millimeter units. The data is sourced from the training split of the filapro/cad-recode dataset and has been re-rendered to produce per-operation animations. Each data clip corresponds to a (case, viewpoint) pair, rendered from five sibling viewpoints (isometric, front, side, top, random), sharing the same physical millimeter/pixel anchor with only camera angles differing. The data is organized in compressed packages, including 256x256 pixel PNG rendered frames, metadata files (meta.json with per-frame operation spans, etc.), a complete atomic operation sequence file (ops.json), and per-frame partial CadQuery code files (frame_codes.json). The dataset scale ranges from 100,000 to 1 million samples. The atomic operation vocabulary includes 10 operation types (e.g., SKETCH_BEGIN, SEGMENT, ARC, SKETCH_EXTRUDE), each with stable IDs and continuous millimeter parameters without quantization. Metadata provides detailed scene information, including camera angles, world bounding boxes, normalization offsets, and per-frame operation progress (op_progress), which may exceed 1.0 to provide negative feedback signals. The dataset is processed with coordinate normalization, centering the final mesh bounding box at the world origin for easier model learning. Sibling viewpoints share the same scale and bounding box, differing only in viewpoint, supporting viewpoint-invariant feature training. The dataset format is v2-continuous-mm (since 2026-05-29), with earlier versions being gradually migrated. Downstream usage suggestions include coordinate normalization methods and video frame standardization. This dataset is suitable for CAD-related tasks such as video classification, inverse dynamics modeling, and video generation.
数据集概述:3d-wm-atomic-v2
该数据集是合成CAD构建视频数据集,专为训练视频→动作(逆动力学,IDM) 和图像→下一帧(视频生成) 模型设计。每个视频片段对应于一个CAD程序在特定视角下的逐帧动画,并带有每帧的原子操作标签(以连续毫米为单位)。
- 格式版本:
v2-continuous-mm(2026-05-29之后)。 - 许可协议:CC-BY-4.0。
- 数据规模:
100K < n < 1M个样本。 - 任务类别:视频分类、其他。
- 标签:CAD、3D、逆动力学、视频生成。
数据结构与组织
数据集采用分片存储形式,每个分片包含多个(case, view)对。数据目录结构如下:
data_*/{bNNNN}/train/shard-NNNNNN.tar └── {case_uid}_v{NN}/ ├── 0000.png .. NNNN.png # 256x256 渲染帧 ├── meta.json # 所有元数据 + 每帧操作跨度 (op_spans) ├── ops.json # 完整原子操作序列 └── frame_codes.json # 每帧的部分 CadQuery 代码
- case:一个CAD程序,从5个不同的兄弟视角(iso、front、side、top、random)渲染。同一个case的5个视角共享相同的物理坐标(毫米/像素),仅摄像机角度不同。
- clip:每个
(case, view)对构成一个视频片段,包含一系列PNG图像。
原子操作词汇表
所有操作参数均使用连续毫米格式,无量化。操作ID是稳定的,稀疏ID(0,1,2,5,6,7)为保留项。
| op_id | 名称 | 参数(按模式顺序) |
|---|---|---|
| 8 | SKETCH_BEGIN | plane_idx (int), origin_xyz (3×float mm), start_xy (2×float mm) |
| 9 | SEGMENT | x, y (2×float mm) |
| 10 | ARC | mid_xy, end_xy (4×float mm) |
| 11 | LOOP_BREAK | start_xy (2×float mm) — 打开新的草图循环 |
| 12 | SKETCH_CLOSE | — (无参数) |
| 13 | SKETCH_EXTRUDE | h (float mm), kind (int: 0=fresh, 1=union, 2=cut) |
| 14 | END_SKETCH | — 终止标记 |
| 15 | SKETCH_CIRCLE | r (float mm) |
| 3 | FILLET | edge_idx (int: 0= |
| 4 | CHAMFER | edge_idx (int), r (float mm) |
分类字母表:
plane_idx→["XY", "YZ", "ZX"]extrude_kind→["fresh", "union", "cut"]edge_idx→["|Z", "|X", "|Y"]
操作元组示例
python [8, 1, -30.0, 0.0, 0.0, 16.0, -20.0] # SKETCH_BEGIN plane=YZ origin=(-30,0,0) start=(16,-20) [15, 30.0] # SKETCH_CIRCLE r=30.0 [12] # SKETCH_CLOSE [13, 32.0, 0] # SKETCH_EXTRUDE h=32.0 kind=fresh [14] # END_SKETCH
meta.json 关键字段
| 字段 | 类型 | 含义 |
|---|---|---|
format_version |
str | 始终为 "v2-continuous-mm" |
uid / base_uid / view_idx / view_name |
标识符 | clip ID, case ID, 视角索引, 视角名称 (e.g., iso) |
n_frames |
int | 该clip中的PNG帧数 |
frame_size |
int | 图像尺寸(像素,正方形) |
cam_elev_azim_deg |
[elev, azim] | 球面摄像机角度(度) |
camera_zoom |
float | 固定值0.62(Open3D set_zoom值) |
world_bbox_min / world_bbox_max |
[x,y,z] mm | 场景锚定边界框(最终网格+草图覆层)经过平移归一化后的值 |
world_bbox_padded_* |
[x,y,z] mm | 经过15%/5mm填充后的场景锚定边界框 |
world_diag_mm |
float mm | 填充后边界框的3D对角线长度 |
approx_mm_per_pixel |
float mm/px | world_diag_mm × camera_zoom / frame_size |
canonicalize_offset_mm |
[x,y,z] mm | 原始坐标 = 归一化坐标 + 偏移(反向平移) |
op_spans |
array | 每帧一个操作跨度条目 |
code |
str | 该clip的完整CadQuery程序(归一化坐标系) |
exec_ok |
bool | 最终状态的CadQuery程序是否执行成功 |
op_spans 每帧条目格式
每帧有且仅有一个操作跨度。对于动画拉伸帧,action_op 中的 SKETCH_EXTRUDE 的高度为 full_h × op_progress,使得每帧拥有不同的数值目标。
json { "frame_idx": 5, "op_idx": 4, "op_type": "SKETCH_EXTRUDE", "op_progress": 0.864, "kind": "extrude", "keyframe": false, "action_op": [13, 27.65, 0], "action_op_human": "SKETCH_EXTRUDE(h=27.65, kind=fresh)" }
op_progress 表示该帧已完成的全长拉伸的比例,主要集中在(0, 1.0]。约有30%的概率,倒数第二帧的拉伸会超调至(1.0, 1.3],为逆动力学模型提供显式的负反馈信号。
关键设计特性
- 平移归一化:渲染器会将每个case的最终网格边界框中心平移到世界坐标系
(0, 0, 0)。两个仅在世界平移上有差异的case将生成相同的PNG图像和操作元组,差异仅记录在canonicalize_offset_mm中。未应用旋转或缩放归一化。 - 坐标帧:连续参数(长度/坐标)均采用归一化坐标系毫米。摄像机位置采用球面坐标系统。
- 缩放一致性:同一个
base_uid下的所有兄弟clip共享相同的world_bbox_*、world_diag_mm和approx_mm_per_pixel,仅cam_elev_azim_deg不同。此约定可用于训练视角不变的特征。 - 格式过渡说明:该数据集于2026-05-29迁移至
v2-continuous-mm。旧版扁平前缀已被移除。data_hula_b01..b06前缀正在逐步重新渲染并覆盖为v2版本。在此期间,少数bNNNN分片可能仍包含旧版bin-quantized整数编码(长度 [0,60] mm @ 128 bins, 坐标 [-30,30] mm @ 128 bins)。务必根据meta["format_version"]进行分支处理。
推荐的归一化与使用方法
从PNG像素恢复物理毫米
python mm_per_px = meta["approx_mm_per_pixel"] mm_offset_from_image_center = pixel_offset × mm_per_px
如果meta["reference_bbox_diag"]非空,则渲染器强制整个数据集使用恒定的world_diag_mm,从而获得恒定的毫米/像素比。
IDM训练(根据视频帧预测action_op)的归一化方法
python half_extent = max( max(abs(c) for c in meta["world_bbox_min"]), max(abs(c) for c in meta["world_bbox_max"]), ) def normalize_coord(mm): return mm / half_extent # -> [-1, 1] def normalize_length(mm): return mm / (half_extent * 2) # -> [0, 1]
在采样/推理时应用逆运算。对于视频帧,标准做法是使用ImageNet统计数据或数据集内统计数据进行 (x / 255 - mean) / std 归一化。
数据来源
case解析自数据集filapro/cad-recode的训练集拆分,并重新渲染生成逐帧动画。





