| --- |
| tags: |
| - smart-manufacturing |
| - sft |
| - industrial |
| - vision |
| license: other |
| pretty_name: D15-mcq |
| extra_gated_fields: |
| Name: text |
| Affiliation: text |
| Intended use: text |
| extra_gated_prompt: >- |
| This dataset is released for **research use**. Access is reviewed and granted |
| **manually** by the maintainers. Please state your name, affiliation, and intended use. |
| --- |
| |
| # D15-mcq |
|
|
| Mask-grounded multiple choice (Set-of-Mark style) for industrial defect localization — **2,828 items**, derived |
| **deterministically** (no LLM/teacher involved) from the semantic masks of |
| [`AI4Manufacturing/D15`](https://huggingface.co/datasets/AI4Manufacturing/D15) (DefectSpectrum). Exact-match |
| gradable → directly usable for SFT **and** RLVR-style training. |
|
|
| > The repository name is an internal task code. See **Provenance** below. |
|
|
| > **Query diversity (2026-07-11).** The `query` field is drawn from a pool of **36 surface variants** for this task (paraphrases that preserve the task and answer-format exactly; the answer-format directive is held verbatim), each selected by an independent per-record hash. This replaces the earlier 4-template design to prevent instruction-format overfitting; answers, images, ids, and all provenance are unchanged. A machine gate in `verify_*.py` checks that no template correlates with the gold (binomial z < 4.5). |
| |
| > **2026-07-17 re-cut:** queries re-rendered from the 36-variant pool (2,512 changed, 316 index-coincident); answers, images, letters (A 681 / B 669 / C 740 / D 738) and metadata byte-identical to the previous revision. Counts auto-generated by `annotate/D15/verify_d15_family.py --card-numbers` (2026-07-17). |
| |
| ## Task |
| |
| One item per (defective D15 record, defect type). The `image` is a 2×2 grid of views **A–D** of the *same* |
| product photo; each view overlays **one red candidate region mask** (SoM style: translucent fill + outline + |
| corner letter). Exactly one view overlays the true mask for the named defect type — **in both location and |
| extent** (the query says so explicitly). `annot` is the correct letter. |
| |
| The three negatives per item are hard by construction, drawn in preference order from: |
| |
| | tag | construction | |
| |---|---| |
| | `othertype` | the true mask of a *different* defect type in the same image, presented as a candidate for this type (hardest) | |
| | `shift` | true mask translated by ~0.7–1.6× its bbox extents (border-clipped, ≥60% of pixels kept) | |
| | `fliplr` / `flipud` / `rot180` | true mask mirrored across the image axes | |
| | `dilate` | true mask grossly over-grown (bounded at 3% of the image dimension; must be ≥2.5× the true area) — a *right-location, wrong-extent* decoy | |
| | `erode` | true mask shrunk to <60% of its area | |
| |
| Every negative is guaranteed wrong (IoU vs. truth < 0.35, except `dilate` which is wrong by extent) and panels are |
| mutually distinct (pairwise IoU < 0.7). Gold letters are balanced via id-hash: A 681 / B 669 / C 740 / D 738. Every independent choice — |
| query surface variant, the other-type decoy draw, and the **assignment of negatives to slots** — is |
| drawn from its own salted hash, so neither the query text nor the visible arrangement of negative |
| kinds correlates with the gold position (verified: template×letter at chance; negatives appear in |
| canonical construction order at the 1/6 shuffled expectation, vs 1.0 in v1/v2; worst single |
| kind-at-letter rule at the 1/3 conditional chance). Both the gold and every negative overlay must |
| render ≥30 visible pixels outside the letter label after downscale. Items whose mask covers |
| >35% of the frame, whose gold overlay would be smaller than ~30 rendered pixels after panel downscale |
| (unanswerable), or where 3 sound negatives could not be built were **skipped (~255 type-instances)** |
| rather than shipped degenerate. |
| |
| **DS-DAGM panels use a histogram-equalized base image** (identically in all four views): several DAGM defect |
| classes are near-invisible in the raw render, which would otherwise make the item unanswerable. |
| `metadata.equalized_base` records this. |
|
|
| ## Records |
|
|
| **2,828** items (single `train` split): DS-MVTec 1,422 · DS-VISION 1,097 · DS-DAGM 268 · DS-Cotton-Fabric 41. |
|
|
| > **Revision notes (2026-07-09):** two adversarial review rounds. v1→v2: query template shared the |
| > gold-position hash (query text revealed the answer) + 18 invisibly-small golds. v2→v3: negatives |
| > filled slots in fixed preference order (the visible arrangement of negative kinds decoded the gold |
| > with 100% accuracy), the other-type decoy draw shared the gold-position seed (parity leak on |
| > 3-type records), and the letter label could paint over a tiny gold overlay. v3 shuffles slot |
| > assignment independently, draws every choice from its own hash, and enforces label-aware |
| > visibility for gold AND negatives. Do not use v1/v2. |
|
|
| | field | type | meaning | |
| |---|---|---| |
| | `query` | str | the MCQ instruction (36 surface variants; names the product and the defect type; asks for the letter only) | |
| | `image` | Image | the 2×2 composite (~1560px, JPEG) | |
| | `annot` | str | gold letter `A`–`D` (exact match) | |
| | `reasoning` | null | none — items are deterministic; no teacher was used | |
| | `cate` / `task` | str | `B` / `T-B2` (unified schema) | |
| | `metadata` | str (JSON) | source, category, `image_sha256`, `d15_record_id`, `defect_type`, `bbox_xywh` (native px of the source image), `area_pct`, `gold_letter`, `panel_tags` (letter → construction tag), `equalized_base` | |
|
|
| ## Roles |
|
|
| **Roles:** this is an answer-only tier — there is no reasoning column; `annot` is both the machine-parseable gold AND the direct-answer SFT target ('SFT-ready' here means direct imitation of `annot` in the query-specified format); it is also the exact-match/IoU reward key for RLVR. |
|
|
| ## Provenance |
|
|
| Built from **`AI4Manufacturing/D15`** (DefectSpectrum — EnVision-Research, ECCV 2024, arXiv:2310.17316; |
| fine-grained multi-class semantic re-annotation of MVTec-AD / VISION / DAGM / Cotton-Fabric), after D15's |
| 2026-07-08 correction (26 upstream-misfiled records removed). Generator: |
| `annotate/D15/build_d15_mcq.py` in [`AI4Manufacturing/forge_model`](https://github.com/AI4Manufacturing/forge_model) |
| — fully deterministic (seeded by `md5(record_id|type)`), zero API cost. Upstream license: MIT (respect the |
| underlying datasets' terms; this card is `license: other`). |
|
|
| ## Training-mixture notes (2026-07-17 certification) |
|
|
| - One photo appears in up to 5 family artifacts (family mean ≈6.3 items/photo). Carve any train/eval |
| split **PHOTO-WISE** on `metadata.image_sha256` across ALL D15-family repos simultaneously. |
| - Global label prior: 85.6% of photos are defective — a blind guesser scores ≈90% on good-vs-defective |
| labels. Counterweight with good-heavy sources in your mixture; this is a structural property of |
| DefectSpectrum, not a leak (text-only blind probe on shipped queries: MCQ at exact chance 25%; |
| region at prior level). |
| - 641 VISION photos in this family are byte-shared with |
| [`AI4Manufacturing/D23`](https://huggingface.co/datasets/AI4Manufacturing/D23) under a **MATERIALLY |
| DIFFERENT label policy** (DS masks confirm only 88.5% of VISION boxes; worst subset coverage 0.03). |
| Take each shared image from exactly ONE side — machine-readable keys: `overlap_with_D23.json` on the |
| [`D15`](https://huggingface.co/datasets/AI4Manufacturing/D15) repo. Full sibling-overlap table: D15 |
| base card §8. |
|
|
| ## Overlap / de-duplication (§8) |
|
|
| The base photos are the SAME images as D15 and therefore inherit **all of D15's overlaps** (sha-verified): |
| DS-MVTec ⊂ [`D20`](https://huggingface.co/datasets/AI4Manufacturing/D20) **test** (and appears in |
| [`D05`](https://huggingface.co/datasets/AI4Manufacturing/D05)); DS-DAGM ⊂ |
| [`181`](https://huggingface.co/datasets/AI4Manufacturing/181) (120 of them in 181's test); |
| DS-VISION ⊂ [`D23`](https://huggingface.co/datasets/AI4Manufacturing/D23) (incl. its val split). |
| **Do not evaluate on those repos' held-out splits if you train on D15-mcq.** Reconstruct exact overlap sets via |
| `metadata.image_sha256`. |
|
|
| ## Training notes |
|
|
| - Composite images are self-contained — no extra rendering needed at train time. |
| - `annot` is a single letter → put loss on completions; exact-match reward for RLVR. |
| - Companion sets: [`D15-annotated`](https://huggingface.co/datasets/AI4Manufacturing/D15-annotated) |
| (CoT defect typing on the raw images, L1–L3 of the same ladder), and the source |
| [`D15`](https://huggingface.co/datasets/AI4Manufacturing/D15) for pixel-mask GT. |
|
|