| With the development of society,new technologies and resources are constantly being innovated and discovered,but my country’s aluminum production is still hitting new highs,which is enough to prove that the characteristics and cost-effectiveness of aluminum profiles cannot be replaced by other materials.However,in the production and transportation of aluminum profiles,some damages,such as dirty spots,bottom leakage,scratches and nonconductivity,are often caused by the wrong operation of the production personnel and the failure of the machine.Aiming at this problem,this paper proposes an optimized feature pyramid fusion method.By fusing it with the Faster R-CNN model and introducing other algorithms,an optimized Faster R-CNN model for the detection of surface defects of aluminum profiles is proposed.The main research contents of this paper are as follows:(1)By learning and analyzing the existing models in the field of machine learning,the two-stage Faster R-CNN model has high accuracy and strong optimization space,so it is selected as the basic research and optimization model of this paper.(2)The original Faster R-CNN was used to train and detect the surface defect data set of aluminum profiles,and the detection accuracy of each defect was obtained.The characteristics of low-accuracy defects,such as the generally small area of dirty spot defects,different shapes of scratches,excessive aspect ratio,orange peel defects occupying the entire surface of the aluminum profile,etc.,propose optimization directions according to each characteristic.(3)For small-area defects,a feature pyramid is first introduced,which retains the strong semantic features of the upper layer and prevents the loss of weak semantic information of the lower layer by fusing different feature layers.Secondly,the ROI align algorithm is introduced,which better retains the features of small-area defects by reducing the two quantizations in the calculation process of the original pooling layer.For irregular flaws,the deformable convolution is fused with the original model.By offsetting the sampling points of the traditional convolution kernel,the accuracy of the model is increased while increasing the amount of computation as little as possible.For overlapping or similar defects,the soft NMS algorithm is introduced,which increases the detection effect of overlapping defects through a softer method of removing candidate boxes.An optimized Faster R-CNN model for surface defects of aluminum profiles is proposed.(4)By learning and analyzing the principle of the feature pyramid,the fusion method of the feature layers in the feature pyramid is optimized,and the feature pyramid is further improved by merging the shallow feature layers used once in the original feature pyramid multiple times.Extraction capability for small area defect features.An optimized feature pyramid algorithm is proposed. |