| Aluminum profile plate can be used in all aspects,but it is easy to have problems such as scratches and paint bubbles in the production process,which will affect the use of aluminum plate.Therefore,it is extremely important to accurately detect the aluminum plate with surface defects.At present,the methods of aluminum plate surface defect detection include manual visual inspection,machine vision detection and deep learning algorithm.Among them,considering the low detection accuracy of manual visual inspection method and the complexity of manually designed feature extraction algorithm in machine vision detection method,the deep learning algorithm can promote the detection efficiency by borrowing end-to-end detection,and the detection accuracy of the algorithm is also stronger than the first two to a certain extent.Therefore,we try to detect aluminum surface defects through the target detection algorithm,and this thesis mainly focuses on promoting the detection accuracy of the algorithm.This thesis starts from two aspects: the first is to analyze the strengths and inferiority of main stream algorithms according to the current research background,Faster R-CNN network under the structure of detectron2 is choice to the research model of this thesis,analyze the features of data samples and put forward improvement measures based on the characteristics of data;the second is to verify the effectiveness of Faster R-CNN in defect detection under the framework of detectron2,including the effectiveness of Res Net-101 fusion feature pyramid and ROI Align.The improvement measures of this thesis are as follows: the first is to analyze the aspect ratio of the data samples and find that the aspect ratio of most defects varies greatly.Based on this,it is comed forward to use the K-means++ to cluster the aspect ratio data of all defect marker boxes to obtain the aspect ration which suitable for RPN to generate the default anchor box.Before that,the elbow rule is used to determine the reasonable number of clusters of the sample data with the aspect ratio of clustering defects,so as to reduce the influence of randomly setting the k value and randomly initializing the cluster center on the accuracy of the algorithm;the second is to adopt the idea of transfer learning,take the Faster R-CNN network trained to use Kmeans++ clustering algorithm as the basis,and integrate the global attention mechanism GAM into its feature pyramid.Different from the previous attention mechanism,GAM attention mechanism captures important features and retains information in the three dimensions of channel,spatial height and spatial width to amplify the "global" cross latitude interaction,that is,the dimensions,so that the network takes note of significant information and suppresses the interference of irrelevant information in the learning process.At the same time,it further shows the advantages of GAM module by comparing CBAM module that ignores dimensional interactive information.Finally,based on the three evaluation index evaluation models of AP,AP50 and AP75,the effectiveness of the improved Faster R-CNN network in this thesis is verified.The experimental results show that the improved Faster R-CNN network in this thesis has increased by 0.9%,1.57% and 1.02% respectively under the AP,AP50 and AP75 indexes compared with the Faster R-CNN network without the improvement measures in this thesis.Finally,the precision of the improved Faster R-CNN network under the AP50 index has reached94.13%. |