File size: 4,639 Bytes
24ae193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
license: cc-by-4.0
task_categories:
- visual-question-answering
- image-classification
language:
- en
tags:
- additive-manufacturing
- laser-powder-bed-fusion
- meltpool
- near-infrared
- thermal-monitoring
- vqa
pretty_name: NIR Meltpool Thermal-State VQA
size_categories:
- 10K<n<100K
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*.parquet
  - split: validation
    path: data/validation-*.parquet
  - split: test
    path: data/test-*.parquet
dataset_info:
  features:
  - name: query
    dtype: string
  - name: image
    dtype: image
  - name: annot
    dtype: string
  - name: reasoning
    dtype: string
  - name: cate
    dtype: string
  - name: task
    dtype: string
  - name: metadata
    struct:
    - name: sample
      dtype: int32
    - name: source_tif
      dtype: string
    - name: label_id
      dtype: int32
    - name: label_name
      dtype: string
    - name: time
      dtype: int64
    - name: position_X
      dtype: float64
    - name: position_Z
      dtype: float64
    - name: V
      dtype: float64
    - name: image_height
      dtype: int32
    - name: image_width
      dtype: int32
    - name: mean_intensity_8bit
      dtype: float64
    - name: bright_core_fraction
      dtype: float64
    - name: norm_low_uint16
      dtype: float64
    - name: norm_high_uint16
      dtype: float64
    - name: split
      dtype: string
---

# NIR Meltpool Thermal-State VQA

A visual-question-answering dataset for training vision-language models to classify
the **thermal state of a laser powder-bed-fusion (LPBF) meltpool** from a single
near-infrared (NIR) frame. Derived from the `hyperspectral_nir_meltpool_dataset`
(sample 588).

## Task

Given one 250x250 NIR meltpool image, answer the fixed `query` by choosing one of
six thermal-state classes.

| id | label | id | label |
|----|-------|----|-------|
| 0 | baseline | 3 | strong underheat |
| 1 | edge | 4 | overheat |
| 2 | underheat | 5 | strong overheat |

> **Classes present in this release:** only sample 588 images were available, so
> only **baseline, edge, strong underheat** appear. The `query` still lists all six
> options and the schema supports all six for when the remaining samples are added.

## Record schema

Each record has the fields:

- **query** — the question (fixed, lists all six options).
- **image** — the NIR frame (embedded PNG; HF `Image` feature).
- **annot** — ground-truth class name (the answer), from the source CSV `label`.
- **reasoning** — a grounded chain-of-thought referencing the frame's NIR intensity.
- **cate**`meltpool_thermal_state`.
- **task**`meltpool_thermal_state_classification`.
- **metadata** — provenance & process signals: source TIF name, `label_id`,
  stage position (`position_X`, `position_Z`), `V`, capture `time`, per-image
  intensity stats, and the global normalization constants.

## Splits

Total: **77,280** records.

| split | count | per class |
|-------|-------|-----------|
| train | 61,825 | baseline: 39,654, edge: 13,051, strong underheat: 9,120 |
| validation | 7,728 | baseline: 4,957, edge: 1,631, strong underheat: 1,140 |
| test | 7,727 | baseline: 4,956, edge: 1,631, strong underheat: 1,140 |

**Split strategy — leakage-aware.** Frames are ~2 us apart and adjacent frames are
near-duplicates. Splitting is *time-block stratified*: within each label the frames
are ordered by capture time and cut into 10 contiguous blocks (8 train / 1
validation / 1 test), so near-duplicate neighbours stay in the same split.

## Image processing

Source TIFs are single-channel `uint16`. They are mapped to 8-bit RGB PNG with a
**single global** linear normalization (clip to the dataset-wide 1st/99th
percentile, `[norm_low_uint16, norm_high_uint16]`, then scale to 0-255) and
channel-replicated. Global (not per-image) normalization is deliberate: absolute
brightness is the physical cue that distinguishes under- vs over-heated pools, and
per-image contrast stretching would destroy it.

## Usage

```python
from datasets import load_dataset
ds = load_dataset("YOUR_USERNAME/YOUR_REPO")
ex = ds["train"][0]
ex["image"]      # PIL.Image
ex["query"], ex["annot"], ex["reasoning"]
ex["metadata"]["label_id"]
```

## Provenance & license

Converted from `hyperspectral_nir_meltpool_dataset.csv` +
`hyperspectral_nir_meltpool_images_2.zip` (sample 588). Ground-truth labels come
directly from the CSV `label` column, matched to images by exact `filename`
(verified 1:1 for all 77,280 frames). Released under **CC-BY-4.0**; if the upstream
meltpool dataset carries a different license, update this field before publishing.