😊This is a object detection dataset for PCBA defect detection
🥳The source code can be accessed in the pcba-yolo folder
👍VOC and PCB defect dataset tags in txt format are available in "GET" below
NOTE!!
PCB dataset is from https://github.com/Ixiaohuihuihui/Tiny-Defect-Detection-for-PCB 4
Thanks for their code and dataset. If you need to use the PCB defect dataset please visit their website.
You can also get some sample datasets in Baidu Netdisk or Google Drive
VOC dataset labels in yolo format in Google drive
PCB defect dataset labels in yolo format in Google drive
Full PCBA-DET dataset in Baidu Netdisk code = iio1.
Data augmentation data is available in Baidu Netdisk code = l3bd.
Data augmentation using attention-gan(fan scratch category) are available in Baidu Netdisk code = sigi.
Please cite our paper while using the PCBA-DET dataset or related research
[1]Shen, M., Liu, Y., Chen, J. et al. Defect detection of printed circuit board assembly based on YOLOv5. Sci Rep 14, 19287 (2024). https://doi.org/10.1038/s41598-024-70176-1
A recent paper on YOLOv8 improvements should also be consulted.
[2]沈明辉,刘宇杰,陈婧,等.基于改进YOLOv8s轻量化网络的组装电脑主板缺陷检测算法[J/OL].计算机工程,1-14[2025-01-10].https://doi.org/10.19678/j.issn.1000-3428.0070196.
We have 4,000 images and a total of 2,384 data augmented images!!
Yolo format, we will update when our paper is published.
We photographed from three different angles: from above, from the side, and from a tilted angle.
We use makesense to label the dataset
And labeled 8 original defects
Distribution of defects in PCBA dataset as follows
| Category | Number (defects) | Number (images) |
|---|---|---|
| Loose fan screws | 1200 | 500 |
| Missing fan screws | 2300 | 1400 |
| Loose motherboard screws | 3300 | 1000 |
| Missing motherboard screws | 3800 | 1900 |
| Loose fan wiring | 1500 | 1500 |
| Missing fan wiring | 1400 | 1400 |
| Fan scratches | 1300 | 1300 |
| Motherboard scratches | 3300 | 1100 |
You can train your own PCBA detection model with the following code:
!python train.py --weights 'path/to/your/pre_trained/model.pt' --cfg 'pcba_yolo.yaml' --data 'mainBoard.yaml' --epochs 300 --batch-size 32
You can find the '--weights' parameter file in the ./pcba_yolo/weights/
| weight | model |
|---|---|
| pcba_yolo_13.pt | PCBA-YOLO(K=13) |
| pcba_yolo_17.pt | PCBA-YOLO(K=17) |
| pcba_yolo_27.pt | PCBA-YOLO(K=27) |
| replk_yolo.pt | Only replknet |
| sppcspc_yolo.pt | Only sppcspc |
| siou_yolo.pt | Only siou |
| replk_sppcspc_yolo.pt | replknet and sppcspc |
| replk_siou_yolo.pt | replknet and siou |
| sppcspc_siou_yolo.pt | sppcspc and siou |
| yolov5s.pt | YOLOv5s |
You can resize K by changing the parameter in RepLKBlock in ./models/common.py at line 1016
self.m = nn.Sequential(*(RepLKBlock(c_, c_, 13, 5, 0.0, False) for _ in range(n)))
where the third parameter 13 is the size of K
We provide yolov5s model, other models are available at Google drive
You can find the '--cfg' parameter file in the ./pcba_yolo/mdoel/
| cfg | model |
|---|---|
| pcba_yolo.yaml | PCBA-YOLO |
| replk_yolo.yaml | Only replknet |
| sppcspc_yolo.yaml | Only sppcspc |
| yolov5s.yaml | YOLOv5s |
You can train your own PCBA detection model with running ./train.py in file YOLOv8_Lightweight
You can find the '--cfg' parameter file in the ./ultralytics/cfg/models/v8
| cfg | model |
|---|---|
| yolov8-replk-ghost-p2.yaml | Our lightweight model |
| yolov8-ghost-p2.yaml | Without replknet |
| yolov8-replk-p2.yaml | Without ghostnet |
| yolov8-replk-ghost.yaml | Without p2 layer |
| yolov8-replk.yaml | Only replknet |
| yolov8-ghost.yaml | Only ghostnet |
| yolov8-p2.yaml | Only p2 layer |
| yolov8.yaml | YOLOv8 |
Pretrained models are available at Google drive
Where yolov8_replk_ghost_p2_agu.pt is the augmented lightweight model
You can validate your detection model with the following code:
!python val.py --data 'mainBoard.yaml' --weights 'path/to/your/model.pt' --batch-size 32
You can use the following code for defect detection:
!python detect.py --weights 'path/to/your/model.pt' --source 'path/to/your/image' --data 'mainBoard.yaml'
For academic research only
You can contact us with shenmh16@gmail.com

