PCB Defect Detection Based on Raspberry Pi and YOLOv5

He Pengfei, Liu Zhihang, Wang Feifei, Xu Kang, Nie Rong

Integrated Circuits and Embedded Systems ›› 2023, Vol. 23 ›› Issue (2) : 45-48.

PDF(1340 KB)
PDF(1340 KB)
Integrated Circuits and Embedded Systems ›› 2023, Vol. 23 ›› Issue (2) : 45-48.
TECHNOLOGY REVIEW

PCB Defect Detection Based on Raspberry Pi and YOLOv5

  • He Pengfei1, Liu Zhihang1, Wang Feifei1, Xu Kang2, Nie Rong3
Author information +
History +

Abstract

Aiming at the problem of PCB defect detection,a lightweight PCB defect detection algorithm based on YOLOv5s is proposed and builds an automatic PCB defect detection system based on the Raspberry Pi platform.Firstly,a modified spatial pyramid pooling is used in the Backbone stage instead of the original C3 network.Secondly,a residual structure is introduced in Backbone and Neck,and a CBAM attention mechanism is added at the small target detection level.Finally,the proposed lightweight algorithm is deployed on Raspberry Pi with the NCS2 suite for auxiliary acceleration,and automatic detection is performed through the camera.Through testing,the proposed algorithm achieves 99.1% mAP for PCB defect detection,23% for Params and 21% for FLOPs compared to the original YOLOv5s model,and the PCB defect detection system runs at 7 fps,meeting the automatic detection requirements.

Key words

Raspberry Pi / YOLOv5s / PCB defect detection

Cite this article

Download Citations
He Pengfei, Liu Zhihang, Wang Feifei, Xu Kang, Nie Rong. PCB Defect Detection Based on Raspberry Pi and YOLOv5[J]. Integrated Circuits and Embedded Systems. 2023, 23(2): 45-48

References

[1] DAIWT,MUJEEB A,ERDT M,et al.Soldering defect detection in automatic optical inspection[J].Advanced Engineering Informatics,2020(43):101004.
[2] Lin Y L,Chiang Y M,Hsu H C.Capacitor Detection in PCB Using YOLO Algorithm[C]//2018 International Conference on System Science and Engineering (ICSSE),2018.
[3] 贾涛,周利莉,陈健,等.基于卷积神经网络的PCB CT 图像中的过孔和焊盘检测算法[J].计算机应用研究,2018,35(2):637-640.
[4] RAY S,MUKHERJEE J.A hybrid approach for detection and classification of the defects on printed circuit board[J].International Journal of Computer Applications,2015,121(12):42-48.
[5] MOGANTI MADHAV,ERCAL FIKRET,DAGLICIHANH,et al.Automatic PCB inspection algorithms:a survey[J].Computer Vision and Pattern Recognition,1996,63(2):287-313.
[6] REN S,HE K,GIRSHICKR,et al.Faster R-CNN:towards real time object detection with region proposal networks[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2017,39(6):1137-1149.
[7] REDMON J,DIVVALA SANTOSH,GIRSHICK R,et al.You only look once: unified,real-time object detection[C]//IEEE Conference on Computer Vision and Pattern Recognition,Las Vegas,Nevada,2016:779-788.
[8] REDMON J, FARHADI A.YOLO9000:better,faster,stronger[C]//IEEE Conference on Computer Vision and Pattern Re cognition, Honolulu,Hawaii,USA,2017:6517-6525.
[9] REDMON J,FARHADI A.YOLOv3:an incremental improvement[EB/OL].ar Xiv:1804.02767v1.2018.
[10] lenn Jocher.YOLOv5:The Leader in Realtime Object Detection[EB/OL].[2022-09].https://github.com/ultralytics/yolov5.
[11] Liu W,Anguelov D,Erhan D.SSD:Single Shot multibox detector[C]//Proc of the European conference on computer vision.Berlin,Germany:Springer,Cham,2016,31(10):21-37.
PDF(1340 KB)

Accesses

Citation

Detail

Sections
Recommended

/