| --- |
| tags: |
| - smart-manufacturing |
| - sft |
| - industrial |
| - vision |
| license: other |
| pretty_name: D15-grounding |
| 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-grounding |
|
|
| Detection-format defect localization (L6-lite of the D15 task ladder) — **2,684 items** (every record |
| of the corrected [`AI4Manufacturing/D15`](https://huggingface.co/datasets/AI4Manufacturing/D15), |
| minus one excised contradiction — see the 2026-07-17 note below), |
| derived **deterministically** (no LLM/teacher). The model must output **boxes as text**, the |
| mainstream VLM grounding pattern (Qwen-VL-style absolute-coordinate JSON). |
|
|
| > 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 **40 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). |
| |
| ## Task |
| |
| "Locate every defect." `annot` is a JSON list of `{"type": ..., "bbox_xywh": [x, y, w, h]}` in |
| **native pixel coordinates** (origin top-left), one entry per defect **instance** (per-class connected |
| components after proximity grouping; 107 over-fragmented records fall back to per-class union boxes), |
| sorted `(type, x, y)` for a deterministic target. **Type-complete by construction:** every defect |
| type present in the record's mask contributes at least one box — instance fragments under 15 px are |
| denoised, but if *all* of a type's instances fall under the floor, its union box is emitted instead |
| (counted at build). Defect-free parts (386) have `annot = []` — detection *rejection* is part of the task. The query states the coordinate convention, the closed |
| class list, and the empty-list rule. |
|
|
| ## Records |
|
|
| **2,684** items (single `train` split): 2,298 defective (≥1 box) + 386 defect-free (`[]`). |
| Counts auto-generated by `annotate/D15/verify_d15_family.py --card-numbers` (2026-07-17). |
|
|
| > **Excision (2026-07-17):** one contradiction record removed (image sha256 4be393b8..., |
| > `DS-VISION/Capacitor/512.jpg` — source labels it anomalous with an empty mask; the derived gold here |
| > would have been `[]`, teaching "good"). The base D15 repo retains it as a disclosed source contradiction. |
|
|
| > **Legibility (rendered defect-instance size at reference inputs; method: per-instance mask pixels |
| > after long-side resize; n=3,086 instances):** |
| > |
| > | reference input | instances <16px | median instance px | |
| > |---|---|---| |
| > | 448 | 5.5% | 605 | |
| > | 768 | 1.5% | 1,626 | |
| > | 1024 | 0.8% | 2,490 | |
| > |
| > Train this artifact at ≥768–1024px effective input or with a crop curriculum; sub-floor instances |
| > are dominated by DS-VISION. |
|
|
| > **Revision note (2026-07-09):** v1's sub-15px denoise could silently delete a defect type entirely |
| > (2 records contradicted the sibling D15 gold; 21 more lost instance boxes). This revision guarantees |
| > type-completeness (union-box rescue) and counts every dropped fragment. Do not use v1. |
|
|
| | field | type | meaning | |
| |---|---|---| |
| | `query` | str | 4 surface variants; product wording; closed class list; JSON output spec | |
| | `image` | Image | the raw product photo (no overlays) | |
| | `annot` | str | JSON box list (see above), `[]` when defect-free | |
| | `reasoning` | null | none — deterministic derivation | |
| | `cate` / `task` | str | `B` / `T-B2` | |
| | `metadata` | str (JSON) | source, category, `image_sha256`, `d15_record_id`, `n_instances` | |
|
|
| ## 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, ECCV 2024, arXiv:2310.17316) after its |
| 2026-07-08 correction. Generator: `annotate/D15/build_d15_l5_grounding.py` in |
| [`AI4Manufacturing/forge_model`](https://github.com/AI4Manufacturing/forge_model) — deterministic, |
| zero API cost. Upstream license: MIT (respect upstream terms; 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) |
|
|
| Same base photos as D15 → inherits all of D15's sha-verified overlaps: DS-MVTec ⊂ |
| [`D20`](https://huggingface.co/datasets/AI4Manufacturing/D20) **test** (also in |
| [`D05`](https://huggingface.co/datasets/AI4Manufacturing/D05)); DS-DAGM ⊂ |
| [`181`](https://huggingface.co/datasets/AI4Manufacturing/181) (120 in its test); DS-VISION ⊂ |
| [`D23`](https://huggingface.co/datasets/AI4Manufacturing/D23) (incl. val). **Do not evaluate on those |
| repos' held-out splits if you train on this set.** Reconstruct overlaps via `metadata.image_sha256`. |
|
|
| ## Training notes |
|
|
| - Boxes are canonical **native-px COCO xywh**. Convert to your model's grounding convention at train |
| time (normalized 0–1000, corner pairs, special tokens, …) — regenerate, don't regex; see |
| `common/box_convert.py` in forge_model. |
| - Gradable by class-aware box matching (e.g. greedy IoU≥0.5) → usable as an RLVR reward or eval |
| metric; `[]` records score rejection. |
| - For pixel-accurate masks at inference, box-prompt SAM/SAM2 with the predicted boxes; the pixel GT |
| lives in [`D15`](https://huggingface.co/datasets/AI4Manufacturing/D15) / |
| [`D15-annotated`](https://huggingface.co/datasets/AI4Manufacturing/D15-annotated) (`mask` column). |
| - Companions: [`D15-annotated`](https://huggingface.co/datasets/AI4Manufacturing/D15-annotated) |
| (L1–L3), [`D15-mcq`](https://huggingface.co/datasets/AI4Manufacturing/D15-mcq) (L4), |
| [`D15-region`](https://huggingface.co/datasets/AI4Manufacturing/D15-region) (L5). |
| |