lugan commited on
Commit
dfdbac5
·
1 Parent(s): 55c0172

Remove 941 empty MT_Free label files (missing == empty in YOLO); fixes Hugging Face dataset-viewer conversion (IndexError) and restores the Viewer

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +17 -6
  2. labels/test/exp1_num_10181.txt +0 -0
  3. labels/test/exp1_num_106151.txt +0 -0
  4. labels/test/exp1_num_116270.txt +0 -0
  5. labels/test/exp1_num_157166.txt +0 -0
  6. labels/test/exp1_num_157675.txt +0 -0
  7. labels/test/exp1_num_166172.txt +0 -0
  8. labels/test/exp1_num_183137.txt +0 -0
  9. labels/test/exp1_num_192126.txt +0 -0
  10. labels/test/exp1_num_193104.txt +0 -0
  11. labels/test/exp1_num_19695.txt +0 -0
  12. labels/test/exp1_num_241352.txt +0 -0
  13. labels/test/exp1_num_257630.txt +0 -0
  14. labels/test/exp1_num_278570.txt +0 -0
  15. labels/test/exp1_num_284841.txt +0 -0
  16. labels/test/exp1_num_308806.txt +0 -0
  17. labels/test/exp1_num_319321.txt +0 -0
  18. labels/test/exp1_num_319420.txt +0 -0
  19. labels/test/exp1_num_320808.txt +0 -0
  20. labels/test/exp1_num_323319.txt +0 -0
  21. labels/test/exp1_num_326586.txt +0 -0
  22. labels/test/exp1_num_331931.txt +0 -0
  23. labels/test/exp1_num_34078.txt +0 -0
  24. labels/test/exp1_num_358102.txt +0 -0
  25. labels/test/exp1_num_37243.txt +0 -0
  26. labels/test/exp1_num_37978.txt +0 -0
  27. labels/test/exp1_num_51080.txt +0 -0
  28. labels/test/exp1_num_855.txt +0 -0
  29. labels/test/exp1_num_90966.txt +0 -0
  30. labels/test/exp2_num_10931.txt +0 -0
  31. labels/test/exp2_num_110118.txt +0 -0
  32. labels/test/exp2_num_116971.txt +0 -0
  33. labels/test/exp2_num_126325.txt +0 -0
  34. labels/test/exp2_num_126814.txt +0 -0
  35. labels/test/exp2_num_166200.txt +0 -0
  36. labels/test/exp2_num_174675.txt +0 -0
  37. labels/test/exp2_num_177935.txt +0 -0
  38. labels/test/exp2_num_195672.txt +0 -0
  39. labels/test/exp2_num_2060.txt +0 -0
  40. labels/test/exp2_num_240063.txt +0 -0
  41. labels/test/exp2_num_251454.txt +0 -0
  42. labels/test/exp2_num_257132.txt +0 -0
  43. labels/test/exp2_num_260949.txt +0 -0
  44. labels/test/exp2_num_266301.txt +0 -0
  45. labels/test/exp2_num_280962.txt +0 -0
  46. labels/test/exp2_num_282899.txt +0 -0
  47. labels/test/exp2_num_290068.txt +0 -0
  48. labels/test/exp2_num_304307.txt +0 -0
  49. labels/test/exp2_num_316344.txt +0 -0
  50. labels/test/exp2_num_316715.txt +0 -0
README.md CHANGED
@@ -51,6 +51,7 @@ This release converts the saliency masks into precise **YOLO TXT** and **Pascal
51
  | 3 | **Removed 4 Zero-Defect Dirty Images** | In category `MT_Uneven`, 4 images were labeled as defective but had 100% black masks (0 foreground defect pixels: `exp3_num_45042`, `exp4_num_124690`, `exp4_num_352527`, `exp4_num_45057`). Removed to prevent harmful negative-supervision. |
52
  | 4 | **Added Reproducible Stratified Split** | Partitioned images into **Train (70%) / Val (10%) / Test (20%)** using seeded stratified sampling to guarantee rare classes (such as `Fray`) are well-represented across all splits. |
53
  | 5 | **Standard Packaging** | Added `data.yaml`, `classes.txt`, and synchronized dual-format annotations (`Annotations/` + `labels/`). |
 
54
 
55
  ### Dataset at a glance
56
 
@@ -74,9 +75,9 @@ MagneticTile-corrected/
74
  │ ├── val/ # 129 images
75
  │ └── test/ # 269 images
76
  ├── labels/
77
- │ ├── train/ # 920 YOLO TXT files
78
- │ ├── val/ # 129 YOLO TXT files
79
- │ └── test/ # 269 YOLO TXT files
80
  ├── Annotations/ # Pascal VOC XML annotations (1,318 files)
81
  ├── JPEGImages/ # Full image collection (1,318 images)
82
  ├── classes.txt # 5 defect category names
@@ -85,6 +86,11 @@ MagneticTile-corrected/
85
  └── README.md
86
  ```
87
 
 
 
 
 
 
88
  ### Quick Start (Ultralytics YOLO)
89
 
90
  ```bash
@@ -159,6 +165,7 @@ yolo detect train data=data.yaml model=yolov8n.pt epochs=100 imgsz=640
159
  | 3 | **删除 4 张纯黑空标脏图** | 在 `MT_Uneven` 类中发现 4 张标记为缺陷但掩码全黑(0 缺陷像素)的异常图(`exp3_num_45042`、`exp4_num_124690`、`exp4_num_352527`、`exp4_num_45057`),已全部剔除,杜绝负向误学习。 |
160
  | 4 | **补充可复现的分层划分** | 采用随机种子按 **70% 训练 / 10% 验证 / 20% 测试** 进行分层抽样,确保稀缺类别(如 `Fray` 磨损)在验证与测试集中稳定存在。 |
161
  | 5 | **标准化打包** | 补充 `data.yaml`、`classes.txt` 以及标准组织目录,支持主流框架直接训练。 |
 
162
 
163
  ### 数据集概览
164
 
@@ -182,9 +189,9 @@ MagneticTile-corrected/
182
  │ ├── val/ # 129 张图片
183
  │ └── test/ # 269 张图片
184
  ├── labels/
185
- │ ├── train/ # 920 个 YOLO TXT 标注文件
186
- │ ├── val/ # 129 个 YOLO TXT 标注文件
187
- │ └── test/ # 269 个 YOLO TXT 标注文件
188
  ├── Annotations/ # Pascal VOC XML 标注 (1,318 个文件)
189
  ├── JPEGImages/ # 完整图片集合 (1,318 张图片)
190
  ├── classes.txt # 5 个缺陷类别名称
@@ -193,6 +200,10 @@ MagneticTile-corrected/
193
  └── README.md
194
  ```
195
 
 
 
 
 
196
  ### 快速开始 (Ultralytics YOLO)
197
 
198
  ```bash
 
51
  | 3 | **Removed 4 Zero-Defect Dirty Images** | In category `MT_Uneven`, 4 images were labeled as defective but had 100% black masks (0 foreground defect pixels: `exp3_num_45042`, `exp4_num_124690`, `exp4_num_352527`, `exp4_num_45057`). Removed to prevent harmful negative-supervision. |
52
  | 4 | **Added Reproducible Stratified Split** | Partitioned images into **Train (70%) / Val (10%) / Test (20%)** using seeded stratified sampling to guarantee rare classes (such as `Fray`) are well-represented across all splits. |
53
  | 5 | **Standard Packaging** | Added `data.yaml`, `classes.txt`, and synchronized dual-format annotations (`Annotations/` + `labels/`). |
54
+ | 6 | **Defect-free images ship without a label file** | The 941 `MT_Free` negatives keep their image and their (object-free) VOC XML, but have **no** YOLO `.txt`. In YOLO a missing label file is behaviorally identical to an empty one — both mean "no objects" — and empty files additionally break dataset indexing on Hugging Face. |
55
 
56
  ### Dataset at a glance
57
 
 
75
  │ ├── val/ # 129 images
76
  │ └── test/ # 269 images
77
  ├── labels/
78
+ │ ├── train/ # 262 YOLO TXT files (defective images only)
79
+ │ ├── val/ # 35 YOLO TXT files
80
+ │ └── test/ # 80 YOLO TXT files
81
  ├── Annotations/ # Pascal VOC XML annotations (1,318 files)
82
  ├── JPEGImages/ # Full image collection (1,318 images)
83
  ├── classes.txt # 5 defect category names
 
86
  └── README.md
87
  ```
88
 
89
+ > **Note on label files.** Only the **377 defective** images have a YOLO `.txt` (377 files total).
90
+ > The **941 defect-free `MT_Free` negatives have no label file** — a missing file and an empty file
91
+ > are equivalent in YOLO (both = "no objects"), and empty files break dataset indexing.
92
+ > `Annotations/` still contains a VOC XML for every image (negatives have zero `<object>` entries).
93
+
94
  ### Quick Start (Ultralytics YOLO)
95
 
96
  ```bash
 
165
  | 3 | **删除 4 张纯黑空标脏图** | 在 `MT_Uneven` 类中发现 4 张标记为缺陷但掩码全黑(0 缺陷像素)的异常图(`exp3_num_45042`、`exp4_num_124690`、`exp4_num_352527`、`exp4_num_45057`),已全部剔除,杜绝负向误学习。 |
166
  | 4 | **补充可复现的分层划分** | 采用随机种子按 **70% 训练 / 10% 验证 / 20% 测试** 进行分层抽样,确保稀缺类别(如 `Fray` 磨损)在验证与测试集中稳定存在。 |
167
  | 5 | **标准化打包** | 补充 `data.yaml`、`classes.txt` 以及标准组织目录,支持主流框架直接训练。 |
168
+ | 6 | **无缺陷图不附带标签文件** | 941 张 `MT_Free` 正常底板保留图片与(无目标的)VOC XML,但**不提供** YOLO `.txt`。在 YOLO 中"缺少标签文件"与"空标签文件"完全等价(均表示无目标),而空文件还会导致 Hugging Face 数据集索引失败。 |
169
 
170
  ### 数据集概览
171
 
 
189
  │ ├── val/ # 129 张图片
190
  │ └── test/ # 269 张图片
191
  ├── labels/
192
+ │ ├── train/ # 262 个 YOLO TXT 标注文件(仅缺陷图)
193
+ │ ├── val/ # 35 个 YOLO TXT 标注文件
194
+ │ └── test/ # 80 个 YOLO TXT 标注文件
195
  ├── Annotations/ # Pascal VOC XML 标注 (1,318 个文件)
196
  ├── JPEGImages/ # 完整图片集合 (1,318 张图片)
197
  ├── classes.txt # 5 个缺陷类别名称
 
200
  └── README.md
201
  ```
202
 
203
+ > **关于标签文件。** 仅 **377 张缺陷图** 有 YOLO `.txt` 标签(合计 377 个文件)。
204
+ > **941 张无缺陷 `MT_Free` 正常底板不附带标签文件** —— YOLO 中"缺少文件"与"空文件"等价(均表示无目标),
205
+ > 且空文件会导致数据集索引失败。`Annotations/` 仍为每张图保留 VOC XML(正常底板的 `<object>` 为空)。
206
+
207
  ### 快速开始 (Ultralytics YOLO)
208
 
209
  ```bash
labels/test/exp1_num_10181.txt DELETED
File without changes
labels/test/exp1_num_106151.txt DELETED
File without changes
labels/test/exp1_num_116270.txt DELETED
File without changes
labels/test/exp1_num_157166.txt DELETED
File without changes
labels/test/exp1_num_157675.txt DELETED
File without changes
labels/test/exp1_num_166172.txt DELETED
File without changes
labels/test/exp1_num_183137.txt DELETED
File without changes
labels/test/exp1_num_192126.txt DELETED
File without changes
labels/test/exp1_num_193104.txt DELETED
File without changes
labels/test/exp1_num_19695.txt DELETED
File without changes
labels/test/exp1_num_241352.txt DELETED
File without changes
labels/test/exp1_num_257630.txt DELETED
File without changes
labels/test/exp1_num_278570.txt DELETED
File without changes
labels/test/exp1_num_284841.txt DELETED
File without changes
labels/test/exp1_num_308806.txt DELETED
File without changes
labels/test/exp1_num_319321.txt DELETED
File without changes
labels/test/exp1_num_319420.txt DELETED
File without changes
labels/test/exp1_num_320808.txt DELETED
File without changes
labels/test/exp1_num_323319.txt DELETED
File without changes
labels/test/exp1_num_326586.txt DELETED
File without changes
labels/test/exp1_num_331931.txt DELETED
File without changes
labels/test/exp1_num_34078.txt DELETED
File without changes
labels/test/exp1_num_358102.txt DELETED
File without changes
labels/test/exp1_num_37243.txt DELETED
File without changes
labels/test/exp1_num_37978.txt DELETED
File without changes
labels/test/exp1_num_51080.txt DELETED
File without changes
labels/test/exp1_num_855.txt DELETED
File without changes
labels/test/exp1_num_90966.txt DELETED
File without changes
labels/test/exp2_num_10931.txt DELETED
File without changes
labels/test/exp2_num_110118.txt DELETED
File without changes
labels/test/exp2_num_116971.txt DELETED
File without changes
labels/test/exp2_num_126325.txt DELETED
File without changes
labels/test/exp2_num_126814.txt DELETED
File without changes
labels/test/exp2_num_166200.txt DELETED
File without changes
labels/test/exp2_num_174675.txt DELETED
File without changes
labels/test/exp2_num_177935.txt DELETED
File without changes
labels/test/exp2_num_195672.txt DELETED
File without changes
labels/test/exp2_num_2060.txt DELETED
File without changes
labels/test/exp2_num_240063.txt DELETED
File without changes
labels/test/exp2_num_251454.txt DELETED
File without changes
labels/test/exp2_num_257132.txt DELETED
File without changes
labels/test/exp2_num_260949.txt DELETED
File without changes
labels/test/exp2_num_266301.txt DELETED
File without changes
labels/test/exp2_num_280962.txt DELETED
File without changes
labels/test/exp2_num_282899.txt DELETED
File without changes
labels/test/exp2_num_290068.txt DELETED
File without changes
labels/test/exp2_num_304307.txt DELETED
File without changes
labels/test/exp2_num_316344.txt DELETED
File without changes
labels/test/exp2_num_316715.txt DELETED
File without changes