CHEN Jinni, BAI Xiaohua, LI Yunhong, TIAN Gufeng. PCB Defect Detection Based on PA-YOLO v5[J]. Infrared Technology , 2024, 46(6): 654-662.
Citation: CHEN Jinni, BAI Xiaohua, LI Yunhong, TIAN Gufeng. PCB Defect Detection Based on PA-YOLO v5[J]. Infrared Technology , 2024, 46(6): 654-662.

PCB Defect Detection Based on PA-YOLO v5

More Information
  • Received Date: September 12, 2023
  • Revised Date: October 29, 2023
  • Available Online: June 23, 2024
  • The bare complex layout of PCBs cause low contrast, uneven brightness, small defect positions, and irregular shapes in detected images, resulting in a large number of parameters, overfitting, and loss of feature information with increasing network depth. In this study, a PCB detection model PA-YOLO v5 based on YOLO v5 and mixed attention mechanism fusion with higher accuracy is proposed to suppress interference from general features and ensure that the network pays more attention to the detailed features of defect targets during feature extraction. The adaptive bidirectional feature pyramid network(BiFPN) is taken as reference to fully utilize the different scales of each feature map, thereby assigning different weights to different detection targets, to improve the network's ability to express various features. Finally, the FReLU activation function is used to expand the ReLU space into a 2D activation function, which enhances the receptive field's ability to capture details and improves model robustness and generalization. Six types of defects were tested using the DeepPCB dataset, and the experimental results showed that the proposed PA-YOLO v5 detection model achieved an accuracy of 99.4%. The effectiveness of the model was verified through ablation and comparative experiments.

  • [1]
    吴一全, 赵朗月, 苑玉彬, 等. 基于机器视觉的PCB缺陷检测算法及展[J]. 仪器仪表学报, 2022, 43(8): 1-17. https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202208001.htm

    WU Y, ZHAO L, YUAN Y, et al. PCB defect detection algorithm and development based on machine vision[J]. Journal of Instruments and Meters, 2022, 43(8): 1-17. https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202208001.htm
    [2]
    王淑青, 鲁濠, 鲁东林, 等. 基于轻量化人工神经网络的PCB板缺陷检测[J]. 仪表技术与传感器, 2022(5): 98-104. https://www.cnki.com.cn/Article/CJFDTOTAL-YBJS202205020.htm

    WANG S Q, LU H, LU D L. PCB board defect detection based on lightweight artificial neural network[J]. Instrument Technique and Sensor, 2022(5): 98-104. https://www.cnki.com.cn/Article/CJFDTOTAL-YBJS202205020.htm
    [3]
    LU S, ZHANG X, KUANG Y. An integrated inspection method based on machine vision for solder paste depositing[C]//2007 IEEE International Conference on Control and Automation, 2007: 137-141.
    [4]
    ZHANG F, QIAO N, LI J. A PCB photoelectric image edge information detection method[J]. Optik, 2017, 144: 642-646. DOI: 10.1016/j.ijleo.2017.07.002
    [5]
    WONG T M, Kahl M, Bolivar P H, et al. Computational image enhancement for frequency modulated continuous wave (FMCW) THz image[J]. Journal of Infrared Millimeter and Terahertz Waves, 2019, 40(7): 775-800. DOI: 10.1007/s10762-019-00609-w
    [6]
    郭战岭, 徐雷, 冉光再, 等. 基于ORB算法及图像差分的PCB缺陷检测[J]. 数字技术与应用, 2022, 40(3): 38-41, 142. https://www.cnki.com.cn/Article/CJFDTOTAL-SZJT202203012.htm

    GUO Z, XU L, RAN G, et al. PCB defect detection based on ORB algorithm and image difference[J]. Digital Technology and Applications, 2022, 40(3): 38-41, 142. https://www.cnki.com.cn/Article/CJFDTOTAL-SZJT202203012.htm
    [7]
    郭世钢. 基于游程编码的PCB缺陷检测算法[J]. 计算机应用, 2009, 29(9): 2554-2555. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY200909072.htm

    GUO S. PCB defect detection algorithm based on run length encoding[J]. Computer Application, 2009, 29(9): 2554-2555. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJY200909072.htm
    [8]
    朱寒, 林丽, 王健华, 等. 基于改进模板匹配及图像差分法的PCB板缺陷多级检测方法[J]. 应用光学, 2020, 41(4): 837-843. https://www.cnki.com.cn/Article/CJFDTOTAL-YYGX202004029.htm

    ZHU H, LIN L, WANG J, et al. A multi-level defect detection method for PCB boards based on improved template matching and image difference method[J]. Applied Optics, 2020, 41(4): 837-843. https://www.cnki.com.cn/Article/CJFDTOTAL-YYGX202004029.htm
    [9]
    张子昊, 王蓉. 基于Mobile FaceNet网络改进的人脸识别方法[J]. 北京航空航天大学学报, 2020, 46(9): 1756-1762. https://www.cnki.com.cn/Article/CJFDTOTAL-BJHK202311026.htm

    ZHANG Z, WANG R. Improved face recognition method based on mobile FaceNet network[J]. Journal of Beijing University of Aeronautics and Astronautics, 2020, 46(9): 1756-1762. https://www.cnki.com.cn/Article/CJFDTOTAL-BJHK202311026.htm
    [10]
    杜紫薇, 周恒, 李承阳, 等. 面向深度卷积神经网络的小目标检测算法综述[J]. 计算机科学, 2022, 49(12): 205-218. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJA202212026.htm

    DU Z, ZHOU H, LI C, et al. Overview of small object detection algorithms for deep convolutional neural networks[J]. Computer Science, 2022, 49(12): 205-218. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJA202212026.htm
    [11]
    DING R W, DAI L H, LI G P, et al. TDD-net: a tiny defect detection network for printed circuit boards[J]. CAAI Transactions on Intelligence Technology, 2019, 4(2): 110-116.
    [12]
    林璐颖, 吴慧君, 杨文元. 融合双神经网络的PCB缺陷检测方法[J]. 哈尔滨商业大学学报(自然科学版), 2022, 38(2): 162-170. https://www.cnki.com.cn/Article/CJFDTOTAL-HLJS202202005.htm

    LIN L, WU H, YANG W. PCB defect detection method based on fusion of dual neural networks[J]. Journal of Harbin Commercial University (Natural Science Edition), 2022, 38(2): 162-170. https://www.cnki.com.cn/Article/CJFDTOTAL-HLJS202202005.htm
    [13]
    XIA B, CAO J, WANG C. SSIM-NET: Real-time PCB defect detection based on SSIM and MobileNet-V3[C]//2019 2nd World Conference on Mechanical Engineering and Intelligent Manufacturing (WCMEIM) of IEEE, 2019: 756-759.
    [14]
    庹冰, 黄丽雯, 唐鑫, 等. 基于YOLOX-WSC的PCB缺陷检测算法研究[J]. 计算机工程与应用, 2023, 59(10): 236-243. https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG202310023.htm

    TUO B, HUANG L, TANG X, et al. Research on PCB defect detection algorithm based on YOLOX-WSC[J]. Computer Engineering and Applications, 2023, 59(10): 236-243. https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG202310023.htm
    [15]
    钱万明, 朱红萍, 朱泓知, 等. 基于自适应加权特征融合的PCB裸板缺陷检测研究[J]. 电子测量与仪器学报, 2022, 36(10): 92-99. https://www.cnki.com.cn/Article/CJFDTOTAL-DZIY202210012.htm

    QIAN W, ZHU H, ZHU H, et al. Research on PCB bare plate defect detection based on adaptive weighted feature fusion[J]. Journal of Electronic Measurement and Instrumentation, 2022, 36(10): 92-99. https://www.cnki.com.cn/Article/CJFDTOTAL-DZIY202210012.htm
    [16]
    CHEN R, ZHAN Z, HU X, et al. Printed circuit board defect detection based on the multi-attentive faster RCNN under noise interference[J]. Chin. J. Sci. Instrum, 2021, 42(12): 167-174.
    [17]
    KANG L, GE Y, HUANG H, et al. Research on PCB defect detection based on SSD[C]//4th International Conference on Civil Aviation Safety and Information Technology (ICCASIT) of IEEE, 2022: 1315-1319.
    [18]
    WANG Z, CHEN W, LI T, et al. Improved YOLOv3 detection method for PCB plug-in solder joint defects based on ordered probability density weighting and attention mechanism[J]. AI Communications, 2022, 35(3): 171-186.
    [19]
    陈仁祥, 詹赞, 胡小林, 等. 基于多注意力Faster RCNN的噪声干扰下印刷电路板缺陷检测[J]. 仪器仪表学报, 2021, 42(12): 167-174. https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202112019.htm

    CHEN R X, ZHAN Z, HU X L, et al. Printed circuit board defect detection under noise interference based on multi attention faster RCNN[J]. Journal of Instruments and Meters, 2021, 42(12): 167-174. https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB202112019.htm
    [20]
    王浩, 张晶晶, 李园园, 等. 基于3D卷积联合注意力机制的高光谱图像分类[J]. 红外技术, 2020, 42(3): 264-271. http://hwjs.nvir.cn/cn/article/id/hwjs202003009

    WANG H, ZHANG J, LI Y, et al. Hyperspectral image classification based on 3D convolutional joint attention mechanism[J]. Infrared Technology, 2020, 42(3): 264-271. http://hwjs.nvir.cn/cn/article/id/hwjs202003009
  • Related Articles

    [1]YE Ye. A Deep Learning Method for Hyperspectral Detection of Heavy Metal Contaminants in Soil Based on Attention Mechanism[J]. Infrared Technology , 2025, 47(4): 453-458.
    [2]DAI Yueming, YANG Lufeng, TONG Xiongmin. Real-time Section State Verification Method of Energy Management System Low Voltage Equipment Based on Infrared Image and Deep Learning[J]. Infrared Technology , 2024, 46(12): 1464-1470.
    [3]CHEN Chaoyang, JIANG Yuanyuan. Infrared and Visible Image Fusion Based on Deep Image Decomposition[J]. Infrared Technology , 2024, 46(12): 1362-1370.
    [4]BAI Hao, BAI Tingzhu. Infrared Image Super-Resolution Reconstruction Algorithm Based on Deep Residual Neural Network[J]. Infrared Technology , 2024, 46(2): 176-182.
    [5]DUAN Jin, ZHANG Hao, SONG Jingyuan, LIU Ju. Review of Polarization Image Fusion Based on Deep Learning[J]. Infrared Technology , 2024, 46(2): 119-128.
    [6]FU Tian, DENG Changzheng, HAN Xinyue, GONG Mengqing. Infrared and Visible Image Registration for Power Equipments Based on Deep Learning[J]. Infrared Technology , 2022, 44(9): 936-943.
    [7]ZHANG Yutong, ZHAI Xuping, NIE Hong. Deep Learning Method for Action Recognition Based on Low Resolution Infrared Sensors[J]. Infrared Technology , 2022, 44(3): 286-293.
    [8]ZHONG Rui, YANG Li, DU Yongcheng. The Influence of Deep Transfer Learning Pre-training on Infrared Wake Image Recognition[J]. Infrared Technology , 2021, 43(10): 979-986.
    [9]FAN Peng, FENG Wanxing, ZHOU Ziqiang, ZHAO Chun, ZHOU Sheng, YAO Xiangyu. Application of Deep Learning in Abnormal Insulator Infrared Image Diagnosis[J]. Infrared Technology , 2021, 43(1): 51-55.
    [10]YANG Tao, DAI Jun, WU Zhongjian, JIN Daizhong, ZHOU Guojia. Target Recognition of Infrared Ship Based on Deep Learning[J]. Infrared Technology , 2020, 42(5): 426-433.
  • Cited by

    Periodical cited type(3)

    1. 朱泽宇,肖满生,徐萌,王瑶瑶,颜谨. 基于改进YOLOv8n的轻量化PCB板表面缺陷检测算法. 软件导刊. 2025(04): 69-74 .
    2. 李扬,陈伟,杨清永,李现国,徐常余,徐晟. 基于大核分离和通道先验卷积注意的PCB缺陷检测方法. 燕山大学学报. 2024(06): 519-527+549 .
    3. 王崟,陆利坤,齐亚莉,曾庆涛. 基于优化YOLOv8-X的印刷电路板缺陷智能检测方法. 现代计算机. 2024(24): 29-35 .

    Other cited types(0)

Catalog

    Article views (123) PDF downloads (62) Cited by(3)
    Related

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return