File size: 2,883 Bytes
d53674a
 
 
 
 
 
 
 
 
 
5a3a648
d53674a
5a3a648
 
 
 
 
 
 
 
 
 
 
 
 
d53674a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7d7e624
d53674a
 
 
 
 
 
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
---
pretty_name: Innodisk PCB Image Dataset
license: cc-by-nc-4.0
tags:
  - image-classification
  - pcb
  - defect-detection
  - innodisk
  - small-sample-learning
configs:
  - config_name: default
    data_files:
      - "train_20_20/*.jpg"
      - "train_20_20_R/*.jpg"
      - "train_40_20/*.jpg"
      - "train_40_20_R/*.jpg"
      - "train_60_20/*.jpg"
      - "train_80_20/*.jpg"
      - "train_100_20/*.jpg"
      - "test/*.jpg"
      - "test_R/*.jpg"
      - "test_canny/*.jpg"
      - "test_R_canny/*.jpg"
      - "val/*.jpg"
      - "val_R/*.jpg"
---

# 🚀🔬 Innodisk PCB Image Dataset

The **Innodisk PCB Image Dataset** is a collaboration between **Innodisk Corporation** and Tamkang University.  
Designed for research on **printed‑circuit‑board (PCB) defect inspection** and **small‑sample learning**. 🧑‍🔧💡

| 📂 Split | 🖼️ Images | 📁 Source directories |
|----------|-----------|-----------------------|
| 🏋️‍♂️ Train | **500** | 7 `train_*` dirs |
| 🧪 Test   | **240** | 4 `test*` dirs |
| 📝 Val    | **30**  | 2 `val*` dirs |

🎯 *Resolutions vary; the modal size is **188 × 128 px**.*  

🔖 Filenames embed pseudo‑labels: **`pass`** (=acceptable) or **`ng`** (=defective).

---

## 🗂️ Folder layout

```
Innodisk_PCB_datasets/
├── train_20_20/      # 🏋️‍♂️
├── train_20_20_R/
├── train_40_20/
├── train_40_20_R/
├── train_60_20/
├── train_80_20/
├── train_100_20/
├── test/             # 🧪
├── test_R/
├── test_canny/
├── test_R_canny/
├── val/              # 📝
└── val_R/
```

---

## ⚡ Quick start

```python
from datasets import load_dataset

# 🔄 Load images
ds_train = load_dataset("evan6007/Innodisk_PCB_datasets", split="train")

# 🏷️  Derive labels from filenames
def add_label(example):
    fname = example["image"].filename.lower()
    example["label"] = 0 if "ng" in fname else 1  # 0 = defective, 1 = acceptable
    return example

ds_train = ds_train.map(add_label)
```

---

## 🏭 Image sources & preprocessing

1. 📷 **AOI line cameras** – raw production images (`train_*`, `test*`, `val*`).
2. ✂️ **ROI versions** (`*_R`) – cropped component regions to reduce background noise.
3. 🖊️ **Canny edge maps** (`*_canny`) – generated with `cv2.Canny(img, 50, 150)`.

---

## 📜 License

Released under **Creative Commons Attribution‑NonCommercial 4.0** (CC BY‑NC‑4.0).  
Commercial applications require prior approval from Innodisk Corporation.

---

## 📚 Citation

```bibtex
@dataset{innodisk_pcb_2025,
  author = {{Innodisk Corporation} and {Su, Huan-Che} and {Hsiao, Chao-Hsiang}},
  title  = {Innodisk PCB Image Dataset},
  year   = {2025},
  url    = {https://huggingface.co/datasets/evan6007/Innodisk_PCB_datasets},
  note   = {CC BY-NC 4.0}
}
```