基于注意力机制和空洞金字塔池化的缺陷检测

Defect Detection Based on Attention Mechanism and Atrous Pyramid Pooling

  • 摘要: 针对工业产品表面缺陷检测中特征重建精度低导致图像级、像素级、区域级误判率高的问题,提出了一种改进深度特征重建(deep feature reconstruction,DFR)的无监督缺陷检测方法。首先,在特征重建过程中引入跳跃连接,增强特征重建精度,提高模型对正样本特征的重建能力。其次,引入注意力机制,提升算法对缺陷区域的关注,并探索空间注意力对不同目标缺陷检测的影响。然后,在特征重建算法中引入空洞金字塔池化,在不增加参数量的情况下多尺度捕捉上下文信息,提高模型对不同尺寸缺陷的检测能力。最后,使用L2-SSIM(L2-结构相似性)损失函数约束特征重建,在保持像素相似性的基础上同时保留特征结构。基于MVTecad数据集的实验结果表明,所提算法的图像级检测精度、像素级检测精度和区域级检测精度分别为97.5%、97.2%和93.1%,均优于对比算法。

     

    Abstract: To solve the problem of low feature reconstruction accuracy in industrial product surface defect detection, which leads to high false positive rates at the image, pixel, and region levels, we propose an unsupervised defect detection method with improved deep feature reconstruction (DFR). First, we introduce jump connections into the feature reconstruction process to improve the feature reconstruction accuracy and the ability of the model to reconstruct positive sample features. Second, we introduce an attention mechanism to improve the attention of the algorithm to defect regions and explore the effect of spatial attention on defect detection for different targets. Third, we introduce atrous pyramid pooling into the feature reconstruction module to capture context at multiple scales without increasing the number of parameters to improve the ability of the model to detect defects at different scales. Finally, we use the L2-SSIM loss function to constrain feature reconstruction to preserve the feature structure while maintaining pixel similarity. The proposed algorithm achieves 97.5%, 97.2%, and 93.1% detection accuracy at the image, pixel, and region levels, respectively, outperforming the comparison algorithm.

     

/

返回文章
返回