PCB defect detection method based on fusion of MBAM and YOLOv5
With the rapid development of the electronic information industry,the printed circuit board(PCB)industry,serving as its foundation,plays a crucial role in determining the quality of electronic products produced subsequently.Addressing the challenges of small defect target in PCBs,numerous defect types,and indistinct features,which often lead to false detection and missed detection in the actual production process,a multi-branch attention multi-branch attention module(MBAM)module method was proposed.This method focused on the feature map in three different dimensions to enhance feature extraction capabilities and allocate more attention to defect areas.By enhancing the YOLOv5 structure and integrating MBAM with YOLOv5 network,the detection performance for small and medium-sized targets in PCBs was effectively improved.Finally,by comparing the MBAM modules at different locations of the network,the best location was selected.The experimental results on the PCB defect dataset demonstrated that the improved PCB defect detection algorithm exhibited superior detection performance compared to other algorithms.The final AP reached 96.7%,a 2 percentage points increase over 94.7%of the standard YOLOv5.Other indicators all showed an upward trend,and the algorithm could accurately identify PCB defect types while maintaining the detection speed.