CoolFace
Datasetpublic

KeenForgeAI/DeepPCB-corrected

DeepPCB-corrected PCB defect detection — cleaned version of the DeepPCB dataset. PCB 缺陷检测 —— DeepPCB 数据集的清理修正版。 English · 中文 English What is this? A cleaned and consistently packaged version of the DeepPCB dataset (Tang, Mao, Wang, Zhu & Ye — "A Robust PCB Defect Detection Method via Fusing Multiple Hierarchical Features", arXiv:1902.06197). DeepPCB pairs each defect-free template image with an aligned tested image carrying bounding-box… See the full description on the dataset page: https://huggingface.co/datasets/KeenForgeAI/DeepPCB-corrected.

sourceHugging Facemitupdated 3d agoView on Hugging Face
0likes3.1kdownloads
README.md241 linesDownload Raw Back to root
1---2license: mit3task_categories:4- object-detection5language:6- en7tags:8- deeppcb9- pcb10- pcb-defect11- industrial-inspection12- object-detection13- pascal-voc14- yolo15- keenforge16size_categories:17- 1K<n<10K18---19 20# DeepPCB-corrected21 22[![DOI](https://img.shields.io/badge/DOI-10.57967%2Fhf%2F10551-blue)](https://doi.org/10.57967/hf/10551)23 24**PCB defect detection — cleaned version of the DeepPCB dataset.**25**PCB 缺陷检测 —— DeepPCB 数据集的清理修正版。**26 27[English](#english) · [中文](#中文)28 29---30 31## English32 33### What is this?34 35A **cleaned and consistently packaged** version of the **DeepPCB** dataset36(Tang, Mao, Wang, Zhu & Ye — *"A Robust PCB Defect Detection Method via Fusing Multiple37Hierarchical Features"*, [arXiv:1902.06197](https://arxiv.org/abs/1902.06197)).38 39DeepPCB pairs each **defect-free template** image with an **aligned tested** image carrying40bounding-box annotations for six common PCB defects. The upstream release ships a custom41TXT format and a split list that **does not resolve**; this release fixes the packaging,42removes the few broken samples, and adds the two formats the tool ecosystem expects.43 44> ✅ **Upstream license: MIT** (© 2018 tangsanli5201). This release keeps the same license.45 46### Corrections vs. the official release47 48| # | Correction | Detail |49|---|---|---|50| 1 | **Fixed the split lists** | Upstream `trainval.txt` / `test.txt` reference `group…/…/XXXXnnn.jpg`, but the released files are `XXXXnnn_test.jpg` — **all 1,500 image paths fail to resolve**. This release rewrites both lists with paths that exist. |51| 2 | **Removed 1 contaminated image** | `44000020_test.jpg` has **annotation boxes and labels burned into the pixels** (a green overlay, RGB mode). Training on it would teach the model to detect the drawn boxes. Removed together with its template. |52| 3 | **Removed 1 orphan template** | `90100034_temp.jpg` has no matching tested image and appears in no split list. |53| 4 | **Normalised image mode** | 61 images were stored as **RGB although R = G = B** (grayscale content). Re-encoded to single-channel grayscale — **pixel content is identical**. |54| 5 | **Added YOLO + VOC formats** | Upstream ships only the custom `x1 y1 x2 y2 type` TXT. This release adds Pascal VOC XML and YOLO TXT (all three verified to agree). |55| 6 | **Packaging** | `classes.txt`, `data.yaml`, `ImageSets/` added. |56 57**Boxes and image content are otherwise untouched.** Every retained image is byte-identical58to the upstream file (except the 61 RGB→grayscale re-encodings, which do not change content).59 60### Not a defect — intentional by design61 62The dataset **reuses templates** and gives each tested image **synthetic defects**: the README63states *"we manually argument some artificial defects on each tested image"*. Consequently a64tested image is almost identical to its template (and templates recur across images). A naive65duplicate scan will report ~350 near-identical pairs — **these are the dataset's design, not66errors**, and they are left untouched.67 68### Dataset at a glance69 70| Property | Value |71|---|---|72| Tested (defective) images | **1,499** (640 × 640, grayscale) |73| Template (defect-free) images | **1,499** |74| Classes | **6** — `open`, `short`, `mousebite`, `spur`, `copper`, `pin-hole` |75| Bounding boxes | **10,004** (≈ 6.7 per image) |76| Formats | custom TXT · Pascal VOC XML · YOLO TXT |77| Split | trainval **1,000** / test **499** (upstream split, paths fixed) |78 79**Boxes per class:** `mousebite` 1,963 · `open` 1,940 · `spur` 1,624 · `short` 1,504 ·80`pin-hole` 1,500 · `copper` 1,47381 82> Upstream class labels (per its README) are `open, short, mousebite, spur, copper, pin-hole`.83> Some third-party re-exports rename the last two to `spurious_copper` / `pin_hole`.84 85### Structure86 87```88DeepPCB-corrected/89├── images/            # 1499 tested (defective) images: <stem>_test.jpg90├── templates/         # 1499 defect-free templates:    <stem>_temp.jpg91├── labels/            # YOLO: cls cx cy w h (normalized)92├── annotations/       # Pascal VOC XML93├── annotations_raw/   # original upstream format: x1 y1 x2 y2 type94├── ImageSets/95│   ├── trainval.txt   # 1000 stems96│   └── test.txt       #  499 stems97├── classes.txt98├── data.yaml          # YOLO dataset config99├── LICENSE100└── README.md101```102 103`labels/`, `annotations/` and `annotations_raw/` are three representations of the **same**104annotations and are verified to agree. Class IDs are `1..6` in `annotations_raw`105(upstream convention) and `0..5` in YOLO/VOC.106 107### Citation108 109**1. The original dataset — please always cite this.**110 111```bibtex112@article{tang2019deeppcb,113  title   = {A Robust PCB Defect Detection Method via Fusing Multiple Hierarchical Features},114  author  = {Tang, Sanli and Mao, Fan and Wang, Zhipeng and Zhu, Zhikai and Ye, Shenghua},115  journal = {arXiv preprint arXiv:1902.06197},116  year    = {2019}117}118```119 120**2. This corrected release — please cite it as well.** It is not identical to the official121release: the split lists were fixed, one contaminated image and one orphan template were122removed, image modes were normalised, and the data was re-packaged.123 124```bibtex125@misc{deeppcb_corrected,126  author    = {KeenForgeAI},127  title     = {DeepPCB-corrected: a cleaned release of the DeepPCB PCB-defect dataset},128  year      = {2026},129  version   = {1.0},130  publisher = {KeenForgeAI},131  url       = {https://huggingface.co/datasets/KeenForgeAI/DeepPCB-corrected},132  note      = {Curated by Lu Gan and Sam Li. Derived from Tang et al. (2019),133               arXiv:1902.06197. MIT licensed.}134}135```136 137**3. The annotation tool (optional).**138 139```bibtex140@software{keenforge,141  author    = {KeenForgeAI},142  title     = {KeenForge: a local-first, offline image annotation and model-training desktop tool},143  year      = {2026},144  publisher = {KeenForgeAI},145  url       = {https://github.com/KeenForgeAI/KeenForge},146  note      = {MIT licensed. Developed by Lu Gan and Sam Li.}147}148```149 150### License151 152**MIT** — the same license as the upstream DeepPCB repository153(© 2018 tangsanli5201). See [`LICENSE`](LICENSE). Please also credit the original authors.154 155---156 157## 中文158 159### 这是什么?160 161**DeepPCB** 数据集(Tang 等,*arXiv:1902.06197*)的**清理与规范化打包版**。162 163DeepPCB 把每张**无缺陷模板图**与一张**对齐后的缺陷图**配对,缺陷图带有六类常见 PCB 缺陷的164边界框标注。上游发布的是自定义 TXT 格式,且划分列表**无法解析**;本版修复打包问题、删除少量165损坏样本,并补上生态常用的两种格式。166 167> ✅ **上游许可证:MIT**(© 2018 tangsanli5201)。本版沿用同一许可。168 169### 相对官方版的修正170 171| # | 修正 | 说明 |172|---|---|---|173| 1 | **修复划分列表** | 上游 `trainval.txt` / `test.txt` 引用 `group…/…/XXXXnnn.jpg`,但实际文件是 `XXXXnnn_test.jpg` —— **1,500 条图片路径全部无法解析**。本版重写为可解析的路径。 |174| 2 | **删除 1 张污染图** | `44000020_test.jpg` 把**标注框与标签烧进了像素**(绿色叠加层,RGB 模式)。用它训练会让模型学会"检测画上去的框"。已连同其模板一起删除。 |175| 3 | **删除 1 张孤立模板** | `90100034_temp.jpg` 没有对应的缺陷图,也不在任何划分列表里。 |176| 4 | **统一图片模式** | 61 张图存成了 **RGB 但 R=G=B**(灰度内容)。重新编码为单通道灰度 —— **像素内容完全一致**。 |177| 5 | **补充 YOLO + VOC 格式** | 上游仅有自定义 `x1 y1 x2 y2 type` TXT。本版新增 Pascal VOC XML 与 YOLO TXT(三种格式已校验一致)。 |178| 6 | **规范化打包** | 新增 `classes.txt`、`data.yaml`、`ImageSets/`。 |179 180**除此之外,标注框与图像内容未改动。** 保留的每张图与上游文件逐字节一致181(仅上述 61 张 RGB→灰度 的重编码,内容不变)。182 183### 不是缺陷 —— 设计使然184 185数据集**刻意复用模板**并为每张缺陷图**合成缺陷**:上游 README 明说186*"we manually argument some artificial defects on each tested image"*。因此缺陷图与其模板几乎187相同(模板也会跨图复用)。天真的去重扫描会报出约 350 对近似图 —— **这是数据集的设计,不是错误**,188本版一律保留。189 190### 数据集概览191 192| 属性 | 值 |193|---|---|194| 缺陷图(tested) | **1,499**(640 × 640 灰度) |195| 模板图(template) | **1,499** |196| 类别 | **6** —— `open`、`short`、`mousebite`、`spur`、`copper`、`pin-hole` |197| 标注框 | **10,004**(约 6.7 框/图) |198| 格式 | 自定义 TXT · Pascal VOC XML · YOLO TXT |199| 划分 | trainval **1,000** / test **499**(沿用官方划分,仅修复路径) |200 201**各类框数**:`mousebite` 1,963 · `open` 1,940 · `spur` 1,624 · `short` 1,504 ·202`pin-hole` 1,500 · `copper` 1,473203 204> 官方 README 给出的类别名为 `open, short, mousebite, spur, copper, pin-hole`。205> 部分第三方镜像把后两类改名为 `spurious_copper` / `pin_hole`。206 207### 目录结构208 209```210DeepPCB-corrected/211├── images/            # 1499 张缺陷图:<stem>_test.jpg212├── templates/         # 1499 张无缺陷模板:<stem>_temp.jpg213├── labels/            # YOLO:cls cx cy w h(归一化)214├── annotations/       # Pascal VOC XML215├── annotations_raw/   # 上游原格式:x1 y1 x2 y2 type216├── ImageSets/217│   ├── trainval.txt   # 1000 条218│   └── test.txt       #  499 条219├── classes.txt220├── data.yaml          # YOLO 配置221├── LICENSE222└── README.md223```224 225`labels/`、`annotations/`、`annotations_raw/` 是**同一份**标注的三种表示,已校验一致。226类 ID 在 `annotations_raw` 中是 `1..6`(上游约定),在 YOLO/VOC 中是 `0..5`。227 228### 引用229 230**1. 原始数据集(请务必引用)** —— 见上方英文部分 `tang2019deeppcb`。231 232**2. 本修正版(请一并引用)** —— 本版与官方发布并不相同:修复了划分列表、删除了 1 张污染图与2331 张孤立模板、统一了图片模式,并重新打包。见上方 `deeppcb_corrected`。234 235**3. 标注工具(可选)** —— 见上方 `keenforge`。236 237### 许可证238 239**MIT** —— 与上游 DeepPCB 仓库相同(© 2018 tangsanli5201)。详见 [`LICENSE`](LICENSE)。240请同时注明原作者。241