| --- |
| language: |
| - en |
| tags: |
| - computer-vision |
| - visual-question-answering |
| - object-detection |
| - manufacturing |
| - defect-detection |
| task_categories: |
| - visual-question-answering |
| configs: |
| - config_name: OT |
| data_files: data/OT/*.parquet |
| - config_name: PB |
| data_files: data/PB/*.parquet |
| --- |
| |
| # LPBF defect-detection VQA |
|
|
| VQA-formatted version of the provided laser powder bed fusion defect dataset. |
| The `OT` and `PB` configurations are independent and should be treated as two |
| separate data sources. |
|
|
| ## Record format |
|
|
| Each record has `query`, `image`, `annot`, `reasoning`, `cate`, `task`, and |
| `metadata` (plus a stable `id`). `query` is the VQA question and `annot` is a |
| natural-language answer: it first says whether a defect exists, then gives the |
| class and location of every defect. The original Pascal VOC boxes are preserved |
| in `metadata.objects` as pixel `[xmin, ymin, xmax, ymax]` (`xyxy`) values. |
| `reasoning` is `null` because no reasoning was supplied by the source data. |
|
|
| The VQA query is: *Identify every visible defect in the image and return its |
| class and bounding box.* |
|
|
| | Configuration | Images | Positive images | Defect label | |
| | --- | ---: | ---: | --- | |
| | OT | 2,674 | 1,122 | `overheated` | |
| | PB | 2,638 | 1,529 | `defects` | |
|
|
| All images are included. Images without a matching XML and XML files with no |
| objects become `no_defect` VQA records with the answer “No, there are no |
| visible defects detected in this image.” `metadata.annotation_status` records |
| whether a negative example came from an empty XML or the no-XML convention. |
|
|
| ## Upload-ready layout |
|
|
| ```text |
| hf_vqa/ |
| ├── README.md |
| └── data/ |
| ├── OT/train-00000-of-00001.parquet |
| └── PB/train-00000-of-00001.parquet |
| ``` |
|
|
| Each Parquet file embeds image bytes in the `image` column, so the `hf_vqa/` |
| folder alone is the upload artifact. The raw JSONL and image folders are only |
| needed to reproduce it. Use `python3 convert_ot_to_vqa.py`, |
| `python3 convert_pb_to_vqa.py`, then `python3 build_hf_parquet.py`. |
|
|
| To reproduce the Parquet build in a clean Python environment, install |
| `pip install -r requirements.txt` first. The XML-to-JSONL converters otherwise |
| use only the Python standard library. |
|
|