A Lightweight RT-DETR Model for Metal Surface Defect Detection Using Multi-Scale Network and Additive Attention Mechanism
摘要
In the industrial production of metals, surface defect detection is crucial for ensuring product quality and optimizing production line efficiency. Although deep learning algorithms are effective for detecting metal surface defects, their complexity can often slow down the detection process. To achieve a balance between detection accuracy and efficiency, this study proposes an enhanced and lightweight Real-Time Detection Transformer (RT-DETR) network and incorporates a multi-scale residual feature extraction (MSRFE) module, termed as MSRFE-RTDETR. The MSRFE module is specifically designed to manage varying defect shapes while reducing the parameter count. To further enhance detection accuracy, a context feature information fusion (CFIF) module is introduced, which integrates deep and shallow features to prevent information loss. Additionally, an efficient encoder based on additive attention (EEAA) is employed to overcome the limitations of matrix multiplication inherent in traditional multi-head attention mechanisms, thereby increasing the model's detection speed. Compared to the baseline model, the proposed algorithm improves the average precision on the public NEU-DET dataset by 2.4%, increases detection speed by 39.69 FPS, and enhances all lightweight metrics. Its generalization is validated on GC10-DET and ASSDD datasets, demonstrating superior performance.