GM-DETR: Research on a Defect Detection Method Based on Improved DETR

Xin Liu,Xudong Yang,Lianhe Shao,Xihan Wang,Quanli Gao,Hongbo Shi
DOI: https://doi.org/10.3390/s24113610
IF: 3.9
2024-06-04
Sensors
Abstract:Defect detection is an indispensable part of the industrial intelligence process. The introduction of the DETR model marked the successful application of a transformer for defect detection, achieving true end-to-end detection. However, due to the complexity of defective backgrounds, low resolutions can lead to a lack of image detail control and slow convergence of the DETR model. To address these issues, we proposed a defect detection method based on an improved DETR model, called the GM-DETR. We optimized the DETR model by integrating GAM global attention with CNN feature extraction and matching features. This optimization process reduces the defect information diffusion and enhances the global feature interaction, improving the neural network's performance and ability to recognize target defects in complex backgrounds. Next, to filter out unnecessary model parameters, we proposed a layer pruning strategy to optimize the decoding layer, thereby reducing the model's parameter count. In addition, to address the issue of poor sensitivity of the original loss function to small differences in defect targets, we replaced the L1 loss in the original loss function with MSE loss to accelerate the network's convergence speed and improve the model's recognition accuracy. We conducted experiments on a dataset of road pothole defects to further validate the effectiveness of the GM-DETR model. The results demonstrate that the improved model exhibits better performance, with an increase in average precision of 4.9% (mAP@0.5), while reducing the parameter count by 12.9%.
engineering, electrical & electronic,instruments & instrumentation,chemistry, analytical
What problem does this paper attempt to address?
The paper attempts to address the problem of defect detection in the process of industrial intelligence, which is caused by factors such as complex backgrounds, low image resolution, and large variations in defect scales. Specifically, the existing DETR model has shortcomings such as insufficient detail control and slow convergence speed when dealing with these issues. To solve these problems, the authors propose an improved DETR model called GM-DETR. This model combines the introduction of the GAM global attention mechanism with CNN feature extraction and optimizes the parameters of the decoding layer, thereby enhancing the model's ability to identify target defects in complex backgrounds, reducing the number of model parameters, accelerating the network's convergence speed, and improving the model's recognition accuracy. Experimental results show that the improved model increases the average precision on the road pothole defect dataset by 4.9%, while reducing the number of parameters by 12.9%.