| --- |
| dataset_info: |
| - config_name: table |
| features: |
| - name: query |
| dtype: string |
| - name: image |
| dtype: image |
| - name: face_table |
| dtype: string |
| - name: step |
| dtype: string |
| - name: annot |
| dtype: string |
| - name: reasoning |
| dtype: string |
| - name: cate |
| dtype: string |
| - name: task |
| dtype: string |
| - name: metadata |
| dtype: string |
| splits: |
| - name: train |
| num_bytes: 1255375716 |
| num_examples: 15488 |
| download_size: 387982741 |
| dataset_size: 1255375716 |
| - config_name: vision |
| features: |
| - name: query |
| dtype: string |
| - name: image |
| dtype: image |
| - name: face_table |
| dtype: string |
| - name: annot |
| dtype: string |
| - name: reasoning |
| dtype: string |
| - name: cate |
| dtype: string |
| - name: task |
| dtype: string |
| - name: metadata |
| dtype: string |
| splits: |
| - name: train |
| num_bytes: 1120173924 |
| num_examples: 46431 |
| download_size: 1256775382 |
| dataset_size: 1120173924 |
| configs: |
| - config_name: table |
| data_files: |
| - split: train |
| path: table/train-* |
| - config_name: vision |
| data_files: |
| - split: train |
| path: vision/train-* |
| license: mit |
| pretty_name: MFCAD machining-feature recognition - vision + face-table tracks |
| tags: |
| - smart-manufacturing |
| - cad |
| - brep |
| - machining-features |
| - step |
| - multi-view |
| task_categories: |
| - image-classification |
| - visual-question-answering |
| extra_gated_prompt: Released for research use; access is granted manually. Please state your name, affiliation, |
| and intended use. |
| extra_gated_fields: |
| Name: text |
| Affiliation: text |
| Intended use: text |
| --- |
| |
| # w_cad1 - MFCAD machining-feature recognition, as VLM training data |
| |
| Two tracks derived from [`AI4Manufacturing/mfcad_original`](https://huggingface.co/datasets/AI4Manufacturing/mfcad_original) |
| (15,488 B-rep solids with per-face machining-feature labels, from |
| [MFCAD](https://github.com/hducg/MFCAD), Cao et al.). The source ships STEP geometry with |
| `image = null` and a single question template; this repo supplies the missing rendered half and a |
| compact symbolic form. |
| |
| | config | records | what the model is given | answer | |
| |---|---|---|---| |
| | `vision` | 46,431 | an **eight-view render** of the part with **one face highlighted in orange**, and nothing else | that face's class | |
| | `table` | 15,488 | a **face table** in text (faces, surfaces, areas, normals, adjacency, edge convexity) and no image | a class for **every** face | |
| |
| The `table` config also carries the **source STEP file** in a `step` column - archival, not a prompt |
| input (see below). `vision` rows link to it through `metadata.model_id`. |
|
|
| ```python |
| from datasets import load_dataset |
| v = load_dataset("AI4Manufacturing/w_cad1", "vision", split="train") |
| t = load_dataset("AI4Manufacturing/w_cad1", "table", split="train") |
| ``` |
|
|
| ## Why two tracks instead of one record with both |
|
|
| Measured before building: a strong model (gpt-5.6-sol) labels **every face correctly from the face |
| table alone** - 100%, the same as from the raw STEP file at 16x the tokens - while a blind arm given |
| only the face ids scores 32.5%, exactly the majority-class floor. |
|
|
| A record containing **both** a picture and the table would therefore train a model to ignore the |
| picture, because the table is the easier path. The two are kept apart so that the vision track has |
| no textual shortcut: it carries an image and no `face_table`, and the table track carries a |
| `face_table` and no image. |
|
|
| Raw STEP is deliberately not a track. It answers the same question at ~16x the tokens (median 74k |
| characters, ~21k tokens per part, against 4.6k characters for the face table), and |
| `mfcad_original` already archives it. |
|
|
| ## Can a model do the vision task at all? |
|
|
| 200 questions, each asked twice - once with the picture, once blind: |
|
|
| | | accuracy | |
| |---|---| |
| | blind (no image) | 34.0% | |
| | one view, face highlighted | 55.0% | |
|
|
| Paired, McNemar **p = 1.3e-08**: the image fixed 47 questions and broke 5. The blind model scores |
| 96% on `stock` and 0% on everything else - it simply always answers "untouched material". |
|
|
| The per-class failures were systematic: `2sides_through_step` 0%, `triangular_passage` 0%, |
| `triangular_through_slot` 8%, with confusions like `6sides_pocket -> 6sides_passage`. Every one is a |
| **through-versus-blind** error - does the cavity come out the other side? - which a single viewpoint |
| cannot show. Hence the eight views. |
|
|
| ## Face identity - read this before using either track |
|
|
| Face ids are the integer in the STEP file's `ADVANCED_FACE` **name field**, never the order faces |
| appear in the file and never a geometry kernel's traversal order. Measured over 400 parts, reading |
| in file order puts **91.4%** of faces on the wrong identity, giving a wrong label on **62.9%** |
| (the source's own documentation independently reports 62.6%). Exactly 1 part in 400 escapes |
| unharmed. |
|
|
| `metadata.face_id` in the vision track and the keys of `annot` in the table track are both in that |
| id space, as are the ids inside `face_table`. |
|
|
| > The tooling that built this repo was itself bitten by this: a name lookup silently fell back to |
| > traversal order, mis-keying ~93% of per-face output while still producing tidy-looking `0..n-1` |
| > ids. If you write your own reader, verify it by permuting the face names in a STEP file and |
| > checking that your ids move. |
|
|
| ## What the images guarantee |
|
|
| - **The highlight never depends on the label.** One fixed colour marks whichever face is asked |
| about, so the picture cannot leak the answer. |
| - **Every asked-about face is one the renderer measurably showed** - at least 256 px in some view, |
| counted from a per-face id buffer, not assumed. 4.5% of the source's faces are visible from no |
| exterior viewpoint at all (97.6% of them pocket interiors); those never become vision questions, |
| and are covered by the `table` track, which needs no visibility. |
| - **Renders are reproducible.** A deterministic software rasteriser, no GPU and no sampling: |
| orthographic projection, fixed camera set, one framing per part, camera-relative lighting. |
| `metadata` records `view_set`, `render_px`, `sheet_panel_px`, `deflection` and `projection`. |
| - **`model_id` never appears in a query.** It encodes the feature classes the part contains, so it |
| would be a direct answer leak; it is kept in `metadata` for provenance only. |
| |
| ## Evidence completeness (vision track) |
| |
| A question can concern a visible face whose wider feature is only partly visible - a pocket wall you |
| can see whose floor you cannot. `metadata.evidence_completeness` records the fraction of that |
| face's feature instance the eight views show: |
| |
| | completeness | share of questions | |
| |---|---| |
| | 1.0 (whole feature visible) | 81.5% | |
| | 0.75 - 0.99 | 18.5% (all pockets) | |
| | below 0.75 | none | |
| |
| These are kept rather than dropped: with eight views every side of the block is shown, so the |
| **absence** of an exit is itself evidence that a feature is blind. Filter on the field if your |
| experiment needs only fully-evidenced questions. |
|
|
| ## The `step` column is archival, not an input |
|
|
| `table` records carry the original STEP text so the exact geometry travels with the release. It is |
| **not** meant as a prompt: tokenised over all 15,488 files the median part is **27,379 tokens** |
| (p90 37.8k, max 99.2k), so a 16k-token training budget would keep only **3.7%** of parts - and that |
| 3.7% is the simple end (11.9 faces on average against 23.0 for the rest), with `6sides_passage` and |
| `6sides_pocket` disappearing almost entirely. Even stripping the parametric duplication that AP203 |
| writes for every curve only reaches 8.1%. |
|
|
| Use it to recompute geometry, derive a different representation, or check ours. If you want a model |
| that can *read* STEP, ask questions answerable from an excerpt (entity types, counts, header units, |
| reference chains) rather than feeding whole files. |
|
|
| ## Every render is varied, per record, from a seed |
|
|
| Fixed camera angles, lighting and colour are a **format** a model can learn instead of the |
| geometry, and nothing learned that way transfers to a CAD screenshot taken anywhere else. So each |
| part's render varies: view direction by up to 12 degrees about a random axis, camera roll up to 8, |
| key light up to 18, plus the material grey, ambient level, framing slack and background. |
|
|
| **Never varied**, because they carry meaning rather than style: the highlight hue (it is the answer |
| marker), orthographic projection, the single framing shared by all eight views of a part, and the |
| number of views. |
|
|
| It costs nothing — measured over 40 parts, mean face coverage is 95.8% with and without variation, |
| and "parts fully covered" rises from 50.0% to 55.0% because tilting off the exact corner directions |
| reveals faces that were sitting precisely edge-on. |
|
|
| **Reproducible**: the seed is derived from the part's `model_id`, and the values actually used are |
| recorded in `metadata.jitter_applied`, so every record documents its own render and a rebuild is |
| pixel-identical. All three vision records of a part share one seed — the same eight views with a |
| different face marked — because the visibility gate and the shipped picture must be the same views. |
|
|
| Note that the `table` records carry the same render provenance fields; they describe the sibling |
| `vision` render of that part, since both tracks come from one pass over the source. |
|
|
| ## Every asked-about face is legible in the picture that ships |
|
|
| The visibility gate measures a full-frame view, but the shipped image tiles eight panels, so a face |
| just above the threshold can fall below it once tiled. The producer therefore counts the highlight |
| pixels **in the final sheet** and rejects the face if it is under the 16x16 floor, moving to the |
| next candidate. That removed 33 records (46,464 -> 46,431) which would have asked about a marker |
| too small to see. `metadata.highlight_pixels_in_sheet` records the measured value. |
|
|
| ## Roles |
|
|
| **Roles:** `annot` is the **machine-parseable gold** and, for now, also the SFT target — the default |
| view is `query` (+ `image` for `vision`, + `face_table` for `table`) → `annot`. `reasoning` is |
| **null by design**: chain-of-thought is a separate annotation stage, so this repo carries no |
| imitation target beyond the answer itself. `annot` is a single class name in `vision` and a JSON |
| `{face_id: class}` map in `table`; in both it is the verification / reward key, not an |
| output-format specimen. When a CoT layer is added later it becomes the imitation target and `annot` |
| stays the gold — it is never overwritten. |
|
|
| ## Fields |
|
|
| `query` (question, drawn from 32 hand-written paraphrases per track - the source had one) · |
| `image` (vision only) · `face_table` (table only) · `annot` (gold: a class string in `vision`, a |
| JSON `{face_id: class}` map in `table`) · `reasoning` (**null** - chain-of-thought is a separate |
| annotation stage) · `cate` = `B` · `task` = `T-B4` · `metadata` (JSON: provenance, `model_id`, |
| `face_id`, `view_mode`, `views_showing_face`, `feature_instance_faces`, `evidence_completeness`, |
| `face_pixels`, `n_faces`, `split_official`). |
|
|
| **Splits.** Everything ships as one `train` split; the source's official split is preserved in |
| `metadata.split_official` (train 9,292 / validation 3,097 / test 3,099 parts) so downstream carving |
| stays explicit. Both tracks derive from the same parts, so **split by `model_id` across tracks** if |
| you use both - otherwise a part seen in one track can leak into the other's evaluation. |
| |
| ## Class balance (vision track) |
| |
| `stock` 33.3%, then `6sides_passage` 7.3%, `6sides_pocket` 6.6%, `rectangular_passage` 5.7%, down to |
| `chamfer` 1.9%. Feature faces are deliberately over-sampled relative to the source (where `stock` is |
| 29.3% of all faces and dominates), but one `stock` face per part is always kept: a model that never |
| sees an untouched face cannot learn to say so. |
| |
| ## The upstream label table is wrong - use this one |
| |
| MFCAD's own repository ships a `FEAT_NAMES` list in which **15 of the 16 classes are mispaired** |
| (only `rectangular_passage` and `stock` happen to be right); see |
| [hducg/MFCAD#2](https://github.com/hducg/MFCAD/issues/2), open since 2022 with no reply. The correct |
| mapping was rebuilt upstream of this repo from `colors.json` and validated geometrically, and is |
| what `annot` uses. Anyone re-deriving labels from the original repository will get them wrong. |
| |
| Independent check on these labels, over 400 parts under a label-free filter: `stock` faces are |
| **0.0%** slanted (2,668 faces) and `chamfer` faces **100.0%** slanted (102) - stock is untouched |
| block material and a chamfer is an angled cut, so both land exactly where their names say. |
|
|
| ## Verification |
|
|
| Every build passes 15 mechanical checks before publication, including one that re-decodes thousands |
| of the shipped images and colour-matches the highlight, confirming the picture really marks the face |
| the question asks about. That check caught a real regression: rendering eight panels into one sheet |
| gave each face a quarter of the area the visibility gate had approved, putting 10.4% of highlights |
| below a 16 px legibility floor. Panel size was then chosen by sweep (256 px -> 10.4% too small, |
| 320 px -> 1.0%, 384 px -> none). |
|
|
| ## Provenance and licence |
|
|
| Built by `forge_model/MFCAD/mfcad_build.py` on the `forge_cad` toolkit |
| (`forge_agent/forge_cad`), verified by `verify_mfcad_build.py`. All labels are the source |
| dataset's own or computed by rule from the geometry - **no model was used to generate any ground |
| truth**, and `reasoning` is intentionally empty. |
|
|
| Derived from MFCAD (MIT). Please cite the original dataset: |
|
|
| > Cao, W., Robinson, T., Hua, Y., Boussuge, F., Colligan, A.R., Pan, W. (2020). |
| > *Graph Representation of 3D CAD Models for Machining Feature Recognition with Deep Learning.* |
| > ASME IDETC/CIE. |
|
|