210 / README.md
weipang142857's picture
card: document metadata.geometry (auto-generated numbers)
47639ac verified
|
Raw
History Blame Contribute Delete
9.89 kB
---
tags:
- smart-manufacturing
- sft
- industrial
- vision
license: other
pretty_name: "210"
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.
---
<!-- ROLES-CANON:BEGIN -->
## Roles
**Roles:** canon repo — `annot` is the source label, kept machine-parseable as the gold for verification and reward parsing; there is no `reasoning` column and this repo is **not itself a training view**. Derived repos (`-annotated`, `-grounding`, `-region`, `-mcq`) each state their own regime on their own card. Geometry for every record lives in `metadata.geometry` (below).
<!-- ROLES-CANON:END -->
# 210
Outdoor maintenance-inspection anomaly detection over 7 asset scenarios (SYNTHETIC, 3D-rendered; binary masks). Category **B**, task **T-B1**, in the unified Smart-Manufacturing SFT schema.
> The repository name is an internal task code. See **Provenance** below for the underlying dataset.
## Records
**105,000** records (test=35000 · train=70000). Pixel masks are embedded as a `mask` image column.
## Unified SFT schema
| field | type | meaning |
|---|---|---|
| `query` | str | the question / instruction (model input) |
| `image` | Image | the input image (bytes embedded); for multi-image rows, a preview of the first view |
| `images` | list[Image] | *(multi-image rows)* all input views / modalities for the row, bytes embedded |
| `annot` | str | the answer — for this dataset: plain-text `{label, defect_type}``{good, null}` or `{anomalous, <defect>}`, the defect name from THAT scenario's own closed set (enumerated in the query), following D20/D22. The binary `mask` column is deferred localization GT |
| `reasoning` | null | no native CoT in these datasets |
| `cate` | "B" | SFT category |
| `task` | "T-xx" | unified task id |
| `metadata` | str (JSON) | split, provenance, `image_path`, `image_sha256` (dedup key) |
| `mask` | Image \| null | *(T-B1/T-B2 only)* the pixel ground-truth mask, bytes embedded |
| `masks` | list[Image] | *(multi-image T-B1 / D21)* per-view masks aligned with `images` (None where a view has no defect), or multi-region masks |
## Task, mask & split
**What this is.** MIAD — Maintenance Inspection Anomaly Detection (Bao, Chen, Li, Wang, Fei, Wu, Zhao, Zheng,
arXiv:2211.13968; ICCV 2023 Workshop) — **105,000** 512x512 images across **7 outdoor maintenance-inspection
scenarios**: `catenary_dropper`, `electrical_insulator`, `metal_welding`, `nut_and_bolt`, `photovoltaic_module`,
`wind_turbine`, `witness_mark`. The design is perfectly regular: **every** scenario ships 10,000 good training
images and a 5,000-image test split (2,500 good + 2,500 defective) with 2,500 pixel masks.
These are **outdoor assets in service** — overhead lines, turbine blades, PV modules — not factory production-line
parts, which is what most of this corpus holds.
**⚠ THE IMAGERY IS SYNTHETIC.** MIAD is generated with 3D graphics software, not photographed. That is the point of
the dataset — it buys free variation in viewpoint, weather and lighting together with exact pixel ground truth —
but a model trained on it learns *rendered* appearance, and **any claim about real-world transfer needs a real-image
test set**. Every record carries `metadata.synthetic = true` so a training mixture can weight or exclude it. The
only other synthetic member of this corpus is 182 (Eyecandies); everything else is photographic.
**Task & answer.** Anomaly detection with defect naming. `query` is our own template (the source ships no
natural-language question): it names the asset and asks whether it is **good** or **anomalous** and, if anomalous,
for the defect type from that scenario's closed set. `annot` is plain text `{good, null}` / `{anomalous, <defect>}`.
**Defect vocabularies differ per scenario, and three are effectively binary.** `electrical_insulator` (`broken`),
`wind_turbine` (`crack`) and `witness_mark` (`looseness`) have exactly one defect type, so naming it adds nothing
beyond the label there; `metadata.single_defect_type` marks those records. The four richer scenarios are
`catenary_dropper` (broken / looseness / miss), `nut_and_bolt` (looseness / missbolt / missnut),
`photovoltaic_module` (broken / foreign_body / miss) and `metal_welding` (weld_beading / weld_pit).
**Mask (deferred GT).** Binary `{0, 255}` masks are embedded in the `mask` column for all 17,500 defective test
images; good images carry `mask = null`.
**Lazy-baseline floor.** The test split is **exactly balanced** — 17,500 good vs 17,500 anomalous — so the binary
majority floor is **50.0%**, and the full `{label, defect_type}` floor is also **50.0%** (answering `{good, null}`
every time). This is one of the cleanest floors in the corpus, a consequence of the synthetic design.
## Provenance
Underlying dataset: **MIAD (Maintenance Inspection Anomaly Detection)**. Upstream license: **CC BY-NC-SA 4.0 (non-commercial)** (this card is `license: other`; respect the upstream terms). Converted read-only from the raw source into the unified schema; conversion code under `210/` (with `publish/push_to_hf.py`) in [`AI4Manufacturing/forge_model`](https://github.com/AI4Manufacturing/forge_model).
## Overlap / de-duplication (§8)
No overlap with any other dataset in this corpus. ⚠ The imagery is **3D-rendered, not photographed** — see the synthetic note below. Each record carries `metadata.image_sha256` so overlapping images can be kept entirely on one side of a train/eval split.
<!-- GEOMETRY-BLOCK:BEGIN -->
## Geometry (`metadata.geometry`)
Every record carries a **`geometry`** block inside the existing `metadata` JSON string, so that its
gold can be **re-derived at any render size**. No schema column changed; existing loaders are
unaffected.
Coordinates are **native pixels** of the image in that record (`coords_frame: "record_image"`). `scale` is `1.0` throughout — this repo publishes at source resolution, nothing was downscaled at publish time.
```jsonc
"geometry": {
"image_wh": [W, H], // dims of the image in THIS record
"source_wh": [W, H], // dims of the original source image
"scale": 1.0, // image_wh / source_wh; < 1.0 would disclose a publish-time downscale
"n_instances": 2,
"instances": [
{ "instance_id": 1, "bbox_xywh": [x, y, w, h], "min_side_px": 65, "class": null }
],
"n_dropped_subminimum": 0, // components removed by the filters below
"union_box_fallback": false,// true => boxes are per-class unions, NOT real instances
"conventions": { ... } // see table
}
```
**`instances` is present even when empty.** `[]` means the record genuinely has no defects; an
*absent* block would mean geometry could not be recovered. Those are different states and are never
conflated.
### Conventions used to derive it
There is no universal definition of "one defect instance" — it depends on the mask the source
shipped. This repo's is stated, not implied:
| field | value |
|---|---|
| `algorithm` | `dilate_cc` |
| `binarisation` | `gt:0` |
| `connectivity` | `4` |
| `merge` | `mask_dilate:1pct` |
| `min_area_px` | `15` |
| `max_instances` | `None` |
| `artifact` | `fine` |
| `fill_floor` | `None` |
| `legibility_floor_px` | `None` |
| `min_side_floor_px` | `None` |
| `spec_sha` | `41d7fab342f60aca` |
### Provenance and verification
| | |
|---|---|
| records | 105,000 |
| carrying a geometry block | **105,000 / 105,000** |
| instances per record | `0`: 87,500, `1`: 11,395, `2`: 4,143, `3`: 958, `4`: 606, `5+`: 398 |
| total instances | 27,172 |
| image dimensions | 512×512 (105,000) |
| `scale` values present | [1.0] |
Computed from this repo's own masks and **verified against this repo's own published answers before it was written** — a
recomputation that disagreed with the shipped gold would have aborted the update rather than
overwritten it.
### ⚠ The 16px floor applies at the RENDER, not at native
`min_side_px` is in **native** pixels. The model does not see native: Qwen2-VL caps by megapixels
AND snaps each dimension to a multiple of 28. So **`min_side_px >= 16` is the floor tested in the
wrong frame.** Measured on this repo:
| | |
|---|---|
| native → rendered (qwen2_vl @ 2.36MP) | 512×512 → 504×504 |
| shipped boxes | 27,172 |
| **legible at that render (>=16px there)** | **18,339 (67.5%)** |
⚠ An earlier version of this section reported the inverse — boxes clearing 16px at native and failing
at the render — and that number was **misleading**. It is frame-relative: publishing at a larger
native size lets more boxes clear 16 *in the published frame*, so more can "fail", which penalises
exactly the choice that helps. Measured on 179: publishing native (3024) means a box needs **>=32px
native** to be legible at the render and **86.7%** qualify; the previous 1024 publish needed **>=47px
native** and only **69.5%** qualified. The native republish improved rendered legibility by 17 points
while the old metric scored it as 12.5% "broken". The figure above is the comparable one.
Nothing in the data is frame-dependent — geometry is native and complete. Use
`forge_model/common/adapt_engine.py`, which applies the floor at whatever size the consumer renders.
### Using it
Coordinates only stay correct if they are rescaled with the image. A patch-based VLM does **not**
render at native size: Qwen2-VL's processor snaps both dimensions to a multiple of 28, so this repo's
512×512 is rendered 504×504 and native-pixel boxes are then wrong by a few pixels.
`forge_model/common/adapt_engine.py` regenerates coordinates for a target render size, re-derives counts, and drops records whose
gold no longer holds there.
<!-- GEOMETRY-BLOCK:END -->