Liu Xin, Yang Xudong, Shao Lianhe, Wang Xihan, Gao Quanli, Shi Hongbo
School of Computer Science, State and Local Joint Engineering Research Center for Advanced Networking & Intelligent Information Services, Xi'an Polytechnic University, Xi'an 710048, China.
Shaanxi Province Institute of Water Resources and Electric Power Investigation and Design, Xi'an 710001, China.
Sensors (Basel). 2024 Jun 3;24(11):3610. doi: 10.3390/s24113610.
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%.
缺陷检测是工业智能过程中不可或缺的一部分。DETR模型的引入标志着变压器在缺陷检测中的成功应用,实现了真正的端到端检测。然而,由于缺陷背景的复杂性,低分辨率可能导致图像细节控制不足以及DETR模型收敛缓慢。为了解决这些问题,我们提出了一种基于改进的DETR模型的缺陷检测方法,称为GM-DETR。我们通过将GAM全局注意力与CNN特征提取和匹配特征相结合来优化DETR模型。这一优化过程减少了缺陷信息扩散,增强了全局特征交互,提高了神经网络在复杂背景下识别目标缺陷的性能和能力。接下来,为了过滤掉不必要的模型参数,我们提出了一种层剪枝策略来优化解码层,从而减少模型的参数数量。此外,为了解决原始损失函数对缺陷目标微小差异敏感度低的问题,我们将原始损失函数中的L1损失替换为MSE损失,以加快网络的收敛速度并提高模型的识别准确率。我们在道路坑洼缺陷数据集上进行了实验,以进一步验证GM-DETR模型的有效性。结果表明,改进后的模型表现出更好的性能,平均精度提高了4.9%(mAP@0.5),同时参数数量减少了12.9%。