| Aluminum profiles are an important industrial metal widely used in core fields such as automobile manufacturing,rail transportation,and aerospace equipment.Owing to the restrictions of production equipment and environmental conditions,the occurrence of defects on the surface of aluminum profiles is inevitable,leading to potential safety hazards.Therefore,surface defect detection of aluminum profiles is essential and a critical part of quality assessment.In the early manufacturing industry,manual inspection with low efficiency and a high false detection rate was still an important part of the production process,but it could not meet the enterprise’s needs for stability and accuracy.Machine vision methods based on traditional image processing are largely limited by feature engineering and are difficult to achieve satisfactory performance in the face of complex and variable aluminum profile defects.This article delves into the task of aluminum profile surface defect detection based on deep learning methods,starting from two aspects: traditional convolutional neural networks and emerging Transformer structures.Targeting the numerous characteristics of surface defects on aluminum profiles,we respectively optimize the two types of algorithms to obtain better defect detection performance.The specific work is as follows:(1)To meet the detection requirements in industry,a detailed analysis was conducted on the causes and characteristics of surface defects on aluminum profiles.It was found that defects have the following features: complex texture,significant scale differences,obvious shape changes,and a high proportion of small defects.From the perspective of the dataset,there are fewer overall defect samples,imbalanced samples between categories,and a large number of difficult-to-use defect-free samples.Based on these findings,an overall scheme for defect detection was determined and evaluation metrics for detection algorithms were introduced to measure their effectiveness.(2)In the study of aluminum profile surface defect detection based on convolutional neural networks.We chose Faster R-CNN,a two-stage object detection algorithm with higher accuracy,as the baseline for subsequent improvements.To address the problem of the significant scale differences of surface defects on aluminum profiles,the feature pyramid structure was added to the network to obtain multi-scale features and improve detection performance.To tackle the issue of the notable shape variations of surface defects,the deformable convolution module was introduced to adapt to narrow defect shapes and achieve better detection results.Finally,Precise Ro I Pooling and Contextual Ro I Pooling were used to replace the original pooling layer to remove the error caused by quantization and enhance the localization ability for small defect targets.(3)In the study of aluminum profile surface defect detection based on Transformer structure,we selected Detection Transformer,which combines convolutional neural networks with Transformer,as the baseline for subsequent improvements to better focus on global features without being limited by the local receptive field of convolutional neural networks.To address the issues of high computational complexity and slow convergence speed caused by the original attention module,we replaced it with the deformable attention module that only focuses on a small number of key sampling points,which not only reduces computational complexity but also maintains algorithm performance.To address the problem of difficult detection of small target defects in aluminum profiles,we extended the deformable attention module to the multi-scale deformable attention module to improve the detection performance of small target defects.In addition,we proposed two data augmentation methods,small target replication and image stitching,on the basis of initial data augmentation to optimize the detection performance of the algorithm under adverse factors in the original dataset.Transfer learning is used to fine-tune the model to obtain higher performance.The experimental results have verified the effectiveness of the proposed improvement methods,which have demonstrated good detection performance of the models.Finally,a summary of the research content is presented,and some shortcomings and future directions for improvement are proposed. |