--- license: mit task_categories: - object-detection language: - en tags: - deeppcb - pcb - pcb-defect - industrial-inspection - object-detection - pascal-voc - yolo - keenforge size_categories: - 1K ✅ **Upstream license: MIT** (© 2018 tangsanli5201). This release keeps the same license. ### Corrections vs. the official release | # | Correction | Detail | |---|---|---| | 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. | | 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. | | 3 | **Removed 1 orphan template** | `90100034_temp.jpg` has no matching tested image and appears in no split list. | | 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**. | | 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). | | 6 | **Packaging** | `classes.txt`, `data.yaml`, `ImageSets/` added. | **Boxes and image content are otherwise untouched.** Every retained image is byte-identical to the upstream file (except the 61 RGB→grayscale re-encodings, which do not change content). ### Not a defect — intentional by design The dataset **reuses templates** and gives each tested image **synthetic defects**: the README states *"we manually argument some artificial defects on each tested image"*. Consequently a tested image is almost identical to its template (and templates recur across images). A naive duplicate scan will report ~350 near-identical pairs — **these are the dataset's design, not errors**, and they are left untouched. ### Dataset at a glance | Property | Value | |---|---| | Tested (defective) images | **1,499** (640 × 640, grayscale) | | Template (defect-free) images | **1,499** | | Classes | **6** — `open`, `short`, `mousebite`, `spur`, `copper`, `pin-hole` | | Bounding boxes | **10,004** (≈ 6.7 per image) | | Formats | custom TXT · Pascal VOC XML · YOLO TXT | | Split | trainval **1,000** / test **499** (upstream split, paths fixed) | **Boxes per class:** `mousebite` 1,963 · `open` 1,940 · `spur` 1,624 · `short` 1,504 · `pin-hole` 1,500 · `copper` 1,473 > Upstream class labels (per its README) are `open, short, mousebite, spur, copper, pin-hole`. > Some third-party re-exports rename the last two to `spurious_copper` / `pin_hole`. ### Structure ``` DeepPCB-corrected/ ├── images/ # 1499 tested (defective) images: _test.jpg ├── templates/ # 1499 defect-free templates: _temp.jpg ├── labels/ # YOLO: cls cx cy w h (normalized) ├── annotations/ # Pascal VOC XML ├── annotations_raw/ # original upstream format: x1 y1 x2 y2 type ├── ImageSets/ │ ├── trainval.txt # 1000 stems │ └── test.txt # 499 stems ├── classes.txt ├── data.yaml # YOLO dataset config ├── LICENSE └── README.md ``` `labels/`, `annotations/` and `annotations_raw/` are three representations of the **same** annotations and are verified to agree. Class IDs are `1..6` in `annotations_raw` (upstream convention) and `0..5` in YOLO/VOC. ### Citation **1. The original dataset — please always cite this.** ```bibtex @article{tang2019deeppcb, title = {A Robust PCB Defect Detection Method via Fusing Multiple Hierarchical Features}, author = {Tang, Sanli and Mao, Fan and Wang, Zhipeng and Zhu, Zhikai and Ye, Shenghua}, journal = {arXiv preprint arXiv:1902.06197}, year = {2019} } ``` **2. This corrected release — please cite it as well.** It is not identical to the official release: the split lists were fixed, one contaminated image and one orphan template were removed, image modes were normalised, and the data was re-packaged. ```bibtex @misc{deeppcb_corrected, author = {KeenForgeAI}, title = {DeepPCB-corrected: a cleaned release of the DeepPCB PCB-defect dataset}, year = {2026}, version = {1.0}, publisher = {KeenForgeAI}, url = {https://huggingface.co/datasets/KeenForgeAI/DeepPCB-corrected}, note = {Curated by Lu Gan and Sam Li. Derived from Tang et al. (2019), arXiv:1902.06197. MIT licensed.} } ``` **3. The annotation tool (optional).** ```bibtex @software{keenforge, author = {KeenForgeAI}, title = {KeenForge: a local-first, offline image annotation and model-training desktop tool}, year = {2026}, publisher = {KeenForgeAI}, url = {https://github.com/KeenForgeAI/KeenForge}, note = {MIT licensed. Developed by Lu Gan and Sam Li.} } ``` ### License **MIT** — the same license as the upstream DeepPCB repository (© 2018 tangsanli5201). See [`LICENSE`](LICENSE). Please also credit the original authors. --- ## 中文 ### 这是什么? **DeepPCB** 数据集(Tang 等,*arXiv:1902.06197*)的**清理与规范化打包版**。 DeepPCB 把每张**无缺陷模板图**与一张**对齐后的缺陷图**配对,缺陷图带有六类常见 PCB 缺陷的 边界框标注。上游发布的是自定义 TXT 格式,且划分列表**无法解析**;本版修复打包问题、删除少量 损坏样本,并补上生态常用的两种格式。 > ✅ **上游许可证:MIT**(© 2018 tangsanli5201)。本版沿用同一许可。 ### 相对官方版的修正 | # | 修正 | 说明 | |---|---|---| | 1 | **修复划分列表** | 上游 `trainval.txt` / `test.txt` 引用 `group…/…/XXXXnnn.jpg`,但实际文件是 `XXXXnnn_test.jpg` —— **1,500 条图片路径全部无法解析**。本版重写为可解析的路径。 | | 2 | **删除 1 张污染图** | `44000020_test.jpg` 把**标注框与标签烧进了像素**(绿色叠加层,RGB 模式)。用它训练会让模型学会"检测画上去的框"。已连同其模板一起删除。 | | 3 | **删除 1 张孤立模板** | `90100034_temp.jpg` 没有对应的缺陷图,也不在任何划分列表里。 | | 4 | **统一图片模式** | 61 张图存成了 **RGB 但 R=G=B**(灰度内容)。重新编码为单通道灰度 —— **像素内容完全一致**。 | | 5 | **补充 YOLO + VOC 格式** | 上游仅有自定义 `x1 y1 x2 y2 type` TXT。本版新增 Pascal VOC XML 与 YOLO TXT(三种格式已校验一致)。 | | 6 | **规范化打包** | 新增 `classes.txt`、`data.yaml`、`ImageSets/`。 | **除此之外,标注框与图像内容未改动。** 保留的每张图与上游文件逐字节一致 (仅上述 61 张 RGB→灰度 的重编码,内容不变)。 ### 不是缺陷 —— 设计使然 数据集**刻意复用模板**并为每张缺陷图**合成缺陷**:上游 README 明说 *"we manually argument some artificial defects on each tested image"*。因此缺陷图与其模板几乎 相同(模板也会跨图复用)。天真的去重扫描会报出约 350 对近似图 —— **这是数据集的设计,不是错误**, 本版一律保留。 ### 数据集概览 | 属性 | 值 | |---|---| | 缺陷图(tested) | **1,499**(640 × 640 灰度) | | 模板图(template) | **1,499** | | 类别 | **6** —— `open`、`short`、`mousebite`、`spur`、`copper`、`pin-hole` | | 标注框 | **10,004**(约 6.7 框/图) | | 格式 | 自定义 TXT · Pascal VOC XML · YOLO TXT | | 划分 | trainval **1,000** / test **499**(沿用官方划分,仅修复路径) | **各类框数**:`mousebite` 1,963 · `open` 1,940 · `spur` 1,624 · `short` 1,504 · `pin-hole` 1,500 · `copper` 1,473 > 官方 README 给出的类别名为 `open, short, mousebite, spur, copper, pin-hole`。 > 部分第三方镜像把后两类改名为 `spurious_copper` / `pin_hole`。 ### 目录结构 ``` DeepPCB-corrected/ ├── images/ # 1499 张缺陷图:_test.jpg ├── templates/ # 1499 张无缺陷模板:_temp.jpg ├── labels/ # YOLO:cls cx cy w h(归一化) ├── annotations/ # Pascal VOC XML ├── annotations_raw/ # 上游原格式:x1 y1 x2 y2 type ├── ImageSets/ │ ├── trainval.txt # 1000 条 │ └── test.txt # 499 条 ├── classes.txt ├── data.yaml # YOLO 配置 ├── LICENSE └── README.md ``` `labels/`、`annotations/`、`annotations_raw/` 是**同一份**标注的三种表示,已校验一致。 类 ID 在 `annotations_raw` 中是 `1..6`(上游约定),在 YOLO/VOC 中是 `0..5`。 ### 引用 **1. 原始数据集(请务必引用)** —— 见上方英文部分 `tang2019deeppcb`。 **2. 本修正版(请一并引用)** —— 本版与官方发布并不相同:修复了划分列表、删除了 1 张污染图与 1 张孤立模板、统一了图片模式,并重新打包。见上方 `deeppcb_corrected`。 **3. 标注工具(可选)** —— 见上方 `keenforge`。 ### 许可证 **MIT** —— 与上游 DeepPCB 仓库相同(© 2018 tangsanli5201)。详见 [`LICENSE`](LICENSE)。 请同时注明原作者。