| ---
|
| dataset_info:
|
| features:
|
| - name: query
|
| dtype: string
|
| - name: step
|
| dtype: string
|
| - name: annot
|
| dtype: string
|
| - name: inst
|
| dtype: string
|
| - name: bottom
|
| dtype: string
|
| - name: inst_partition
|
| dtype: string
|
| - name: split
|
| dtype: string
|
| - name: reasoning
|
| dtype: string
|
| - name: image
|
| dtype: string
|
| - name: cate
|
| dtype: string
|
| - name: task
|
| dtype: string
|
| - name: metadata
|
| dtype: string
|
| splits:
|
| - name: train
|
| num_bytes: 6216409233
|
| num_examples: 62495
|
| download_size: 1903755580
|
| dataset_size: 6216409233
|
| configs:
|
| - config_name: default
|
| data_files:
|
| - split: train
|
| path: data/train-*
|
| extra_gated_prompt: Released for research use; access granted manually. State your
|
| name, affiliation, and intended use.
|
| license: cc0-1.0
|
| pretty_name: MFInstSeg
|
| tags:
|
| - smart-manufacturing
|
| - cad
|
| - brep
|
| - machining-features
|
| - instance-segmentation
|
| extra_gated_fields:
|
| Name: text
|
| Affiliation: text
|
| Intended use: text
|
| ---
|
| # MFInstSeg (加工特征实例分割 · 原始 B-rep)
|
|
|
| MFInstSeg:**62495** 行, 每行一个 STEP(B-rep) 实体。唯一模型数 **62,477**;常被引用的
|
| 62,495 是上游划分文件的行数, 被 18 条重复撑出来的(train.txt 内重复 12、val.txt 内重复 1,
|
| 另有 5 个 id 同时出现在两个 split), 别再拿它当模型数。
|
|
|
| 任务是**三合一**(出处 AAGNet, Wu et al., RCIM 86:102661, 2024), 三套标签都在:
|
| 1. **语义分割** `annot`:每个面一个 0..24 的特征类别;
|
| 2. **实例分组** `inst` / `inst_partition`:哪些面属于同一个特征实例;
|
| 3. **底面识别** `bottom`:每个面是否为特征底面(0/1)。
|
|
|
| > **按威威裁决上传原始 dataset 本身**("direct VLM 如果需要 render 的那种可以先传 dataset 本身,我来看看有没有办法弄一下 rendering")。
|
| > 本库是**原始 B-rep**,尚未渲染成图像;渲染由团队后续统一处理。`image` 为 null。
|
|
|
| ## 面索引怎么对齐(最重要的一段)
|
| `annot`/`bottom` 的键 k 和 `inst` 矩阵的行列号 k, 指的都是**用 pythonocc
|
| `TopologyExplorer(shape).faces()`(`ignore_orientation` 保持默认 True)枚举出来的第 k 个面**,
|
| 等价于 occwl `Solid(shape).faces()` 的顺序。
|
| - STEP 文件里所有 ADVANCED_FACE 的 name 都是**空串**(上游导出用了 save_face_label=False), 没有名字可对;
|
| - **禁止**按 STEP 文件里 ADVANCED_FACE 的出现顺序对齐, 也别 set 去重、别按 hash 排序——都会把整套标签静默错位;
|
| - 和我们已发布的 [`mfcad_D01_TB4`](https://huggingface.co/datasets/AI4Manufacturing/mfcad_D01_TB4) 不同:
|
| MFCAD 是"名字索引"、MFInstSeg 是"位置索引", 两个库**不能共用**面对齐逻辑;
|
| - 诚实声明: 这个约定来自审读上游源码链(get_segmentaion_label → TopologyExplorer; occwl entity_mapper),
|
| 跨 OCC 版本的保序性上游从未验证过; 抽样重算几何做自洽检查(标 through_hole 的面应是圆柱面之类)
|
| 还没做, 是遗留校验项。
|
|
|
| ## aag/ 为什么重要(虽然没入库)
|
| 源包另含 `aag/`(约 20GB 预算好的几何属性邻接图)。它**不是**"与 VLM 无关的杂物":
|
| `aag/graphs.json` 的**节点顺序就是标签假定的面序**, 是唯一不依赖本地 OCC 版本就能安全还原
|
| 面序的参照物。本库因体积未收录; 需要严格核对面序时, 请回源包取 graphs.json, 把它的节点序
|
| 当对齐参照。(只抽 face_order 摘要入库还是仅在此指路, 团队待定。)
|
|
|
| ## 字段
|
| - `query`(任务提示) · `step`(STEP 原文) · `annot`(面→类别 JSON, 键=面索引) ·
|
| `inst`(N×N 0/1 实例矩阵 JSON) · `bottom`(面→0/1 底面 JSON) · `inst_partition`(见下) ·
|
| `split`(train/val/test/unassigned) · `image`(null, 未渲染) · `reasoning`(null) ·
|
| `cate`/`task` = `B`/`T-B4` · `metadata`(model_id, n_faces, n_instances, inst_matrix_rows)。
|
| - `inst` 的约定(照搬上游): 特征面对角线 inst[i][i]=1; **不属于任何特征的 stock 面整行全 0**。
|
| 别把对角线清零、也别把全零行当缺失丢——stock 的语义就存在这。
|
| - `inst_partition` 是我们为 SFT 加的派生列: 把 N×N 矩阵按连通分量还原成
|
| `[{"faces": [...], "class_id": c}]`,
|
| 类别取成员面 seg 标签多数票。生成式模型吃划分远比吃矩阵合理, 上游特征级指标本来也吃这个。
|
| - `cate/task` 沿用已发布的 mfcad_D01_TB4 / fcad_D03_TB4 的 `T-B4`(同一类任务, 非臆造)。
|
|
|
| ## 词表(25 类)
|
| 类别索引 0..24。已核实锚点: **0=chamfer、23=round、24=stock**。权威表在 AAGNet
|
| `dataset/feature_creation.py` L42-47 的 feat_names; **注意该 repo 的 dataloader/mfinstseg.py 和
|
| main.py 的注释把 chamfer/round 写反了**, 以 feature_creation.py 为准。本次转换未载入 feat_names.json, inst_partition 只有 class_id 数字。
|
|
|
| ## Split 与已知泄漏
|
| `split` 列来自上游 `MFInstseg_partition/{train,val,test}.txt`(官方唯一 id 43,733/9,374/9,375,
|
| 约 70/15/15, 随机 i.i.d. 打散, 不是跨域泛化划分)。本次转换实测: 划分文件唯一 id
|
| {"train": 43733, "val": 9374, "test": 9375}, 文件内重复行 {"train": 12, "val": 1}, 入库行 split 分布
|
| {"test": 9373, "train": 43733, "val": 9371, "unassigned": 18}。
|
| **已知 5 个 id 同时出现在两个 split(跨集泄漏)**: 20221225_205134_10 / _32 / _40 / _44 / _52
|
| (train∩val=3, train∩test=1, val∩test=1)。本库按首次出现(train→val→test 顺序)归属;
|
| 本次转换实测检出的跨集 id: 20221225_205134_10, 20221225_205134_32, 20221225_205134_40, 20221225_205134_44, 20221225_205134_52。是否剔除这 5 个, 下游自己定。
|
|
|
| ## 数据质量(本次转换实测)
|
| - 解析失败跳过 0 条; seg/inst/bottom 长度或键不齐跳过 0 条;
|
| inst 不对称跳过 0 条。解析失败**不会**变成空行入库。
|
| - 上游已知坑, 引用其指标时留意: 特征级 localization 判 TP 要求面集**完全相等**(IoU=1.0, 不是
|
| COCO 的 0.5); 面级实例 F1 是在零填充 batch 上算的、没有 mask, 不同实现间不可直接比。
|
|
|
| ## License 与使用口径
|
| - **CC0(公共领域)**是**百度 AI Studio 源站页面的标注**; AAGNet GitHub repo 自身的 license
|
| 我们未核到, 两边如不一致以哪个为准待确认。我们按 researcher 非商用使用, 并署名上游。
|
|
|
| ## Load
|
| ```python
|
| from datasets import load_dataset
|
| ds = load_dataset("AI4Manufacturing/mfinstseg")
|
| ```
|
| _Gated — request access; granted manually._
|
|
|
| ## 复现
|
| 原始数据不入库。百度 AI Studio 需登录、无匿名直链: 手动下载 data2.zip(约 1.7GB, 解出
|
| steps/ 与 labels/), 连同上游 MFInstseg_partition/ 一起放到 FORGE_DATASETS_SUB, 然后:
|
| `FORGE_DATASETS_SUB=<dir> python mfinstseg/convert_mfinstseg.py`。
|
|
|
| ## Provenance
|
| - 源: 百度 AI Studio `aistudio.baidu.com/datasetdetail/211864`(data2.zip 1.7GB; 另有 aag/ 约 20GB, 未收录, 见上)。
|
| - 出处论文: AAGNet(Wu et al., RCIM 86:102661, 2024)。相关工作: BRepFormer / BRepMAE /
|
| FeatureFox / MFInstSeg++(AAGATNet)等。请引用上游。
|
| |