SLGA-YOLO: A Lightweight Castings Surface Defect Detection Method Based on Fusion-Enhanced Attention Mechanism and Self-Architecture

Chengjun Wang,Yifan Wang
DOI: https://doi.org/10.3390/s24134088
IF: 3.9
2024-06-24
Sensors
Abstract:Castings' surface-defect detection is a crucial machine vision-based automation technology. This paper proposes a fusion-enhanced attention mechanism and efficient self-architecture lightweight YOLO (SLGA-YOLO) to overcome the existing target detection algorithms' poor computational efficiency and low defect-detection accuracy. We used the SlimNeck module to improve the neck module and reduce redundant information interference. The integration of simplified attention module (SimAM) and Large Separable Kernel Attention (LSKA) fusion strengthens the attention mechanism, improving the detection performance, while significantly reducing computational complexity and memory usage. To enhance the generalization ability of the model's feature extraction, we replaced part of the basic convolutional blocks with the self-designed GhostConvML (GCML) module, based on the addition of p2 detection. We also constructed the Alpha-EIoU loss function to accelerate model convergence. The experimental results demonstrate that the enhanced algorithm increases the average detection accuracy (mAP@0.5) by 3% and the average detection accuracy (mAP@0.5:0.95) by 1.6% in the castings' surface defects dataset.
engineering, electrical & electronic,instruments & instrumentation,chemistry, analytical
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve The paper primarily aims to address two key issues in the detection of casting surface defects: 1. **Low computational efficiency and detection accuracy**: Existing object detection algorithms perform poorly in terms of computational efficiency and defect detection accuracy. To overcome this issue, the paper proposes a lightweight YOLO method (SLGA-YOLO) that integrates enhanced attention mechanisms and an efficient self-designed architecture. 2. **Coexistence of lightweight and high precision**: Traditional casting surface defect detection techniques are gradually being replaced by deep learning-based methods, but achieving high precision while maintaining a lightweight model remains a challenge. SLGA-YOLO improves detection accuracy and maintains the lightweight characteristics of the model by optimizing the model structure and introducing a new loss function. Specifically, the paper achieves these goals through the following improvements: - Using SlimNeck to optimize the neck module, reducing model complexity while improving accuracy. - Integrating SimAM and LSKA in the backbone network to enhance the attention mechanism, improving the model's ability to focus on key areas. - Introducing YOLO-P2 to replace parts of the original model structure and using a custom GCML module to optimize basic convolutional blocks, enhancing feature extraction capabilities and convergence speed. - Constructing the Alpha-EIoU loss function to accelerate the regression fitting process between the ground truth and predicted boxes, maintaining sufficient flexibility and strong generalization ability.