| With the increasing number of electronic products used,printed circuit boards as an important part of electronic products have also been widely used,the quality of which directly affects the reliability and service life of electronic products.As PCBs undergo multiple processes such as opening,drilling and sinking copper during the production process,they are highly susceptible to tiny defect such as missing holes,open circuits and spur.In order to solve the problems of high leakage rate of tiny targets in traditional PCB defect detection methods,poor robustness of algorithms and still need for manual visual inspection.This thesis focuses on an in-depth study of three aspects,namely,pre-defined anchor,feature fusion layers and feature extraction networks,in conjunction with deep learning methods.The main research work is as follows:(1)In this thesis,IBA-FPN is proposed for enhancing image information to address the problem that PCB defects are highly similar to PCB background colors and difficult to distinguish.Firstly,the types and causes of PCB defects were analyzed,and an enhanced dataset was constructed to obtain information on the location and size of defects,which provided the basis for subsequent algorithm design.Then,Canopy clustering is performed based on the distribution of defect sizes in the enhanced dataset to determine the number of clusters K.This value is used in the K-means++ algorithm to generate the corresponding number of anchors.Finally,a genetic algorithm is used to optimize the solution space of the generated anchor to obtain the optimized anchor.The experimental results show that the m AP of the PCB detection algorithm is improved by 2.8% compared to the K-means++clustering algorithm.(2)Thesis proposes an improved bidirectional attention feature pyramid network to address the issue of difficulty in distinguishing PCB defects that have a high similarity to the PCB background color.Firstly,two shortcut channels connecting the bottom feature map and the top feature map are introduced to enhance information exchange between different path directions and reduce the geometric detail information and semantic contour information lost in the forward propagation process.Then,the resulting five feature layers are fed into the CBAM to focus on the useful features and cut the useless ones,thus distinguishing PCB defects from PCB backgrounds.Finally,the pixel-level information on the feature map is captured using bilinear interpolation,keeping the original floating-point number for operation,thus improving the accuracy of target detection.(3)In this thesis,an improved Res Net101 feature extraction network is proposed to further improve the performance of the IBA-FPN based PCB defect detection algorithm.The network uses grouped convolution instead of normal convolution in the original residual module,which can effectively reduce the number of parameters,and adds the SE module to enhance the feature relationships between channels that are lost due to grouping.The experimental results show that the improved module improves the m AP value by18.54% on the baseline network,the detection accuracy reaches 98.62%,and the detection speed reaches 18.2 frames per second,which basically meets the defect detection requirements of PCB factory production line.In summary,the PCB defect detection algorithm based on IBA-FPN proposed in this thesis can effectively improve the detection accuracy and detection efficiency,and can be applied to the field of PCB defect detection,which has wide application prospects and promotion value. |