| My country is a big country of aluminum profile manufacturing.Driven by economic globalization,in order to improve the competitiveness of Chinese aluminum profile production and processing enterprises in the international market,it is necessary to strengthen the quality inspection in aluminum profile production.At present,most production enterprises still rely on experienced employees to carry out manual testing.This method is inefficient and prone to miss and false detection.The training and employment of employees will also increase the budget cost of enterprises,which is not conducive to the competition in the international market.Some single mechanism recognition techniques and traditional machine vision recognition methods are not suitable for industrial applications due to high cost,poor robustness,narrow applicability and other reasons.With the continuous advancement of science and technology,product surface defect detection methods based on deep learning technology have emerged,but a single deep learning method cannot meet the requirements of industrial inspection for accuracy and speed at the same time.In response to the above problems,this thesis firstly adopts the two-stage detection network Faster R-CNN for detection,replacing the feature extraction network of the original Faster R-CNN with Res Net50+FPN,and uses Mask R-CNN to replace ROI Pooling with ROI Align.Then the one-stage detection network YOLOv5 s is used to detect the surface defects of aluminum profiles.In view of the low detection accuracy of defects such as pits and scratches in the original YOLOv5 s model,the ordinary convolution of the CBS structure in the original YOLOv5 s model is improved to a deformable convolution,and a detection layer is added to enrich the detection scale.A CBAM attention module is added before the layer to improve the overall detection accuracy of the model.The optimized YOLOv5 s model named YOLOv5s_CD improves m AP by about 5% with a slight decrease in detection speed.Then,aiming at the low recall rate of pitting defects by the YOLOv5s_CD model,the mainstream lightweight models Mobile Netv3-samll and Efficient Netv2-S are used to directly identify the surface defect images of aluminum profiles.The recognition accuracy of the two models can reach more than 0.985,and the precision and recall rate for pitting defects can reach 1.Through the analysis of detection speed,missed detection rate and over-detection rate,a method based on Mobile Netv3-small and YOLOv5s_CD to jointly detect surface defects of aluminum profiles is proposed,which makes up for the low recall rate of YOLOv5s_CD model for pitting defects.Finally,the Mobilenet V3-small model and YOLOv5s_CD model are deployed to the Jetson TX2 edge computing device,and an industrial application scenario is provided.The detection speed of the two models on Jetson TX2 can meet the requirements of real-time detection,which verifies that the aluminum surface defect detection algorithm designed in this thesis has a good balance between detection speed and accuracy and has high practical value. |