hubtru commited on
Commit
bd082d3
·
verified ·
1 Parent(s): dbbdbe6

upload parquet

Browse files
Files changed (2) hide show
  1. README.md +65 -32
  2. data/train-00000-of-00001.parquet +3 -0
README.md CHANGED
@@ -29,7 +29,7 @@ configs:
29
  - config_name: default
30
  data_files:
31
  - split: train
32
- path: metadata.csv
33
  ---
34
 
35
  # Nonastreda: Multimodal Dataset for Tool Wear State Monitoring
@@ -51,24 +51,52 @@ This Hugging Face repository is a mirror and machine-learning-friendly access po
51
 
52
  The dataset combines visual inspection data, force-signal-derived image representations, and raw force signals for tool wear monitoring. Each sample is indexed by an identifier such as `T10R10B1`, and the same identifier is used across the available image modalities.
53
 
54
- Each sample-level row in `metadata.csv` includes:
55
 
 
56
  - one microscope-image-based tool-wear classification label,
57
  - one additional force-phase classification label derived from force-signal amplitudes,
58
  - three regression targets,
59
- - paths to nine image modalities.
60
 
61
  The raw force-signal file is also included for future research, but it is not used as a sample-level visualization table because the sequences are organized per tool rather than cut into sub-sequences for each blade/image sample.
62
 
63
  ## Modalities
64
 
65
- Each sample is represented by nine image files:
66
 
67
- | Modality group | Columns in `metadata.csv` | Description |
68
  |---|---|---|
69
- | Visual images | `chip_file_name`, `tool_file_name`, `work_file_name` | Images of chip, tool blade, and workpiece |
70
- | Mel-spectrograms | `spec_x_file_name`, `spec_y_file_name`, `spec_z_file_name` | Mel-spectrogram representations of force-signal axes X, Y, and Z |
71
- | Scalograms | `scal_x_file_name`, `scal_y_file_name`, `scal_z_file_name` | Scalogram representations of force-signal axes X, Y, and Z |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  ## Tasks
74
 
@@ -113,7 +141,7 @@ The `image_label` column is the primary classification label described in the as
113
  - `used`
114
  - `dulled`
115
 
116
- For convenience, `metadata.csv` also provides `image_label_id`:
117
 
118
  - `sharp = 1`
119
  - `used = 2`
@@ -167,6 +195,9 @@ nonastreda/
167
  ├── CITATION.cff
168
  ├── LICENSE
169
  ├── metadata.csv
 
 
 
170
  ├── chip/
171
  ├── tool/
172
  ├── work/
@@ -190,11 +221,13 @@ nonastreda/
190
 
191
  ## Metadata columns
192
 
193
- `metadata.csv` is the recommended entry point for machine-learning use and for the Hugging Face Dataset Viewer.
194
 
195
  | Column | Description |
196
  |---|---|
197
  | `sample_id` | Unique sample identifier |
 
 
198
  | `image_label` | Primary microscope-image-based class label: `sharp`, `used`, or `dulled` |
199
  | `image_label_id` | Numeric encoding of `image_label`: 1, 2, or 3 |
200
  | `force_phase_label` | Additional force-amplitude-based wear phase label: 1, 2, or 3 |
@@ -203,15 +236,15 @@ nonastreda/
203
  | `gaps` | Regression target |
204
  | `flank_wear` | Regression target |
205
  | `overhang` | Regression target |
206
- | `chip_file_name` | Path to chip image |
207
- | `tool_file_name` | Path to tool blade image |
208
- | `work_file_name` | Path to workpiece image |
209
- | `spec_x_file_name` | Path to X-axis Mel-spectrogram image |
210
- | `spec_y_file_name` | Path to Y-axis Mel-spectrogram image |
211
- | `spec_z_file_name` | Path to Z-axis Mel-spectrogram image |
212
- | `scal_x_file_name` | Path to X-axis scalogram image |
213
- | `scal_y_file_name` | Path to Y-axis scalogram image |
214
- | `scal_z_file_name` | Path to Z-axis scalogram image |
215
 
216
  ## Raw files
217
 
@@ -232,7 +265,7 @@ ds = load_dataset("hubtru/nonastreda")
232
  print(ds["train"][0])
233
  ```
234
 
235
- To load the training split directly:
236
 
237
  ```python
238
  from datasets import load_dataset
@@ -241,27 +274,26 @@ ds = load_dataset("hubtru/nonastreda", split="train")
241
  print(ds[0])
242
  ```
243
 
244
- To load the metadata table directly after cloning or downloading the repository:
245
 
246
  ```python
247
- import pandas as pd
248
 
249
- metadata = pd.read_csv("metadata.csv")
250
- print(metadata.head())
 
 
 
 
251
  ```
252
 
253
- Example image loading after cloning or downloading the repository:
254
 
255
  ```python
256
- from PIL import Image
257
  import pandas as pd
258
 
259
  metadata = pd.read_csv("metadata.csv")
260
- row = metadata.iloc[0]
261
-
262
- chip = Image.open(row["chip_file_name"])
263
- tool = Image.open(row["tool_file_name"])
264
- work = Image.open(row["work_file_name"])
265
  ```
266
 
267
  ## Intended use
@@ -280,6 +312,8 @@ This dataset is intended for research in:
280
  ## Limitations and notes
281
 
282
  - The dataset contains 512 sample-level records.
 
 
283
  - The default Hugging Face viewer is centered on sample-level image modalities and labels.
284
  - The raw force signals are included for completeness but require separate handling.
285
  - The two classification labels are derived from different sources and should not be assumed to be equivalent.
@@ -323,4 +357,3 @@ If you use this dataset, please cite the associated *Data in Brief* article and
323
  ## Contact
324
 
325
  For questions about the dataset, please refer to the contact information provided in the associated *Data in Brief* article and Mendeley Data record.
326
-
 
29
  - config_name: default
30
  data_files:
31
  - split: train
32
+ path: data/train-*.parquet
33
  ---
34
 
35
  # Nonastreda: Multimodal Dataset for Tool Wear State Monitoring
 
51
 
52
  The dataset combines visual inspection data, force-signal-derived image representations, and raw force signals for tool wear monitoring. Each sample is indexed by an identifier such as `T10R10B1`, and the same identifier is used across the available image modalities.
53
 
54
+ Each sample-level row includes:
55
 
56
+ - `tool_id` and `run_id`, parsed from the sample identifier,
57
  - one microscope-image-based tool-wear classification label,
58
  - one additional force-phase classification label derived from force-signal amplitudes,
59
  - three regression targets,
60
+ - nine image modalities.
61
 
62
  The raw force-signal file is also included for future research, but it is not used as a sample-level visualization table because the sequences are organized per tool rather than cut into sub-sequences for each blade/image sample.
63
 
64
  ## Modalities
65
 
66
+ Each sample is represented by nine image modalities:
67
 
68
+ | Modality group | Viewer columns | Description |
69
  |---|---|---|
70
+ | Visual images | `chip`, `tool`, `work` | Images of chip, tool blade, and workpiece |
71
+ | Mel-spectrograms | `spec_x`, `spec_y`, `spec_z` | Mel-spectrogram representations of force-signal axes X, Y, and Z |
72
+ | Scalograms | `scal_x`, `scal_y`, `scal_z` | Scalogram representations of force-signal axes X, Y, and Z |
73
+
74
+ The human-readable `metadata.csv` file keeps the corresponding file path columns, such as `chip_file_name`, `tool_file_name`, and `scal_z_file_name`.
75
+
76
+ ## Dataset split and recommended evaluation protocol
77
+
78
+ This repository provides a single Hugging Face split:
79
+
80
+ - `train`: all 512 samples.
81
+
82
+ No fixed train/test split is imposed. For model evaluation, we recommend **leave-one-tool-out cross-validation** using `tool_id`.
83
+
84
+ Since the dataset contains 10 tools, this gives 10 train/test folds. In each fold, samples from one tool are held out for testing, and samples from the remaining nine tools are used for training. This protocol evaluates whether a model generalizes to unseen tools rather than only learning tool-specific visual or signal patterns.
85
+
86
+ Example fold definition:
87
+
88
+ ```python
89
+ from datasets import load_dataset
90
+
91
+ NUM_TOOLS = 10
92
+
93
+ ds = load_dataset("hubtru/nonastreda", split="train")
94
+
95
+ for held_out_tool in range(1, NUM_TOOLS + 1):
96
+ train_ds = ds.filter(lambda x: x["tool_id"] != held_out_tool)
97
+ test_ds = ds.filter(lambda x: x["tool_id"] == held_out_tool)
98
+ print(f"Fold T{held_out_tool}: train={len(train_ds)}, test={len(test_ds)}")
99
+ ```
100
 
101
  ## Tasks
102
 
 
141
  - `used`
142
  - `dulled`
143
 
144
+ For convenience, the dataset also provides `image_label_id`:
145
 
146
  - `sharp = 1`
147
  - `used = 2`
 
195
  ├── CITATION.cff
196
  ├── LICENSE
197
  ├── metadata.csv
198
+ ├── metadata.parquet
199
+ ├── data/
200
+ │ └── train-00000-of-00001.parquet
201
  ├── chip/
202
  ├── tool/
203
  ├── work/
 
221
 
222
  ## Metadata columns
223
 
224
+ `metadata.csv` is the recommended human-readable index. The default Hugging Face Dataset Viewer is configured to use `data/train-*.parquet`, where the nine image modalities are stored as image columns rather than file-name strings.
225
 
226
  | Column | Description |
227
  |---|---|
228
  | `sample_id` | Unique sample identifier |
229
+ | `tool_id` | Tool identifier parsed from `sample_id`, e.g. `T10R14B3` → `10` |
230
+ | `run_id` | Run identifier parsed from `sample_id`, e.g. `T10R14B3` → `14` |
231
  | `image_label` | Primary microscope-image-based class label: `sharp`, `used`, or `dulled` |
232
  | `image_label_id` | Numeric encoding of `image_label`: 1, 2, or 3 |
233
  | `force_phase_label` | Additional force-amplitude-based wear phase label: 1, 2, or 3 |
 
236
  | `gaps` | Regression target |
237
  | `flank_wear` | Regression target |
238
  | `overhang` | Regression target |
239
+ | `chip_file_name` | Path to chip image in `metadata.csv` |
240
+ | `tool_file_name` | Path to tool blade image in `metadata.csv` |
241
+ | `work_file_name` | Path to workpiece image in `metadata.csv` |
242
+ | `spec_x_file_name` | Path to X-axis Mel-spectrogram image in `metadata.csv` |
243
+ | `spec_y_file_name` | Path to Y-axis Mel-spectrogram image in `metadata.csv` |
244
+ | `spec_z_file_name` | Path to Z-axis Mel-spectrogram image in `metadata.csv` |
245
+ | `scal_x_file_name` | Path to X-axis scalogram image in `metadata.csv` |
246
+ | `scal_y_file_name` | Path to Y-axis scalogram image in `metadata.csv` |
247
+ | `scal_z_file_name` | Path to Z-axis scalogram image in `metadata.csv` |
248
 
249
  ## Raw files
250
 
 
265
  print(ds["train"][0])
266
  ```
267
 
268
+ To load the single split directly:
269
 
270
  ```python
271
  from datasets import load_dataset
 
274
  print(ds[0])
275
  ```
276
 
277
+ Example image access:
278
 
279
  ```python
280
+ from datasets import load_dataset
281
 
282
+ ds = load_dataset("hubtru/nonastreda", split="train")
283
+ row = ds[0]
284
+
285
+ chip_image = row["chip"]
286
+ tool_image = row["tool"]
287
+ work_image = row["work"]
288
  ```
289
 
290
+ To load the human-readable metadata table after cloning or downloading the repository:
291
 
292
  ```python
 
293
  import pandas as pd
294
 
295
  metadata = pd.read_csv("metadata.csv")
296
+ print(metadata.head())
 
 
 
 
297
  ```
298
 
299
  ## Intended use
 
312
  ## Limitations and notes
313
 
314
  - The dataset contains 512 sample-level records.
315
+ - The Hugging Face `train` split contains all samples; no fixed test split is imposed.
316
+ - For evaluation, leave-one-tool-out cross-validation using `tool_id` is recommended.
317
  - The default Hugging Face viewer is centered on sample-level image modalities and labels.
318
  - The raw force signals are included for completeness but require separate handling.
319
  - The two classification labels are derived from different sources and should not be assumed to be equivalent.
 
357
  ## Contact
358
 
359
  For questions about the dataset, please refer to the contact information provided in the associated *Data in Brief* article and Mendeley Data record.
 
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5b70dc2f9dcb97c32aa85892b4158ccf6d331021358bd635290b8c5787d3999
3
+ size 182061