arXiv:2609.06232cs.CVcs.LG2026-09

用缺陷标注图指导模型关注故障区域,提升定位精度。

Spatial Attention Supervision for Defect Localization: Exploiting Ground-Truth Masks as Training Signal in Diffusion-Augmented Defect Detection

论文配图:Spatial Attention Supervision for Defect Localization: Exploiting Ground-Truth Masks as Training Signal in Diffusion-Augmented Defect Detection
图 1 · 摘自论文原文
  • 将真实缺陷掩码作为注意力监督信号,引导模型聚焦缺陷位置。
  • 使用扩散数据增强后,定位性能提升18.7%(p<0.01),且不损害分类准确率。
  • 对空间表征弱的模型效果更明显,适合工业缺陷检测场景。

工业检测数据集中的真实缺陷掩码通常仅用于评估,本文将其重用于训练阶段,作为空间监督信号,指导分类模型不仅预测结果,更关注缺陷位置。提出基于激活图的注意力对齐损失,在混合监督框架中同时处理有掩码和无掩码样本(如扩散生成图像)。结合DDPM数据增强,合成图像提供数量,掩码提供空间精度。在MVTec-AD瓶身数据集上评估85个模型(四种CNN骨干网络在2×2数据/训练因子下共五次随机种子,另含Swin-V2-T基线),定位性能在未参与梯度更新的独立缺陷图像上测试。主要发现:(1) 注重注意力的训练使EfficientNetB0与ResNet50的像素级AUROC分别提升+18.0%(p=0.005)和+18.7%(p=0.008),在八组设置中四组显著,分类性能无变化;(2) EfficientNetB0中数据与训练模式交互显著(p=0.002),体现超加性效应(联合提升13.6%,单独提升总和仅1.6%);(3) 空间表示能力弱的架构收益更大,而ConvNeXt-T无改善,因其深度可分离卷积生成的空间信息不足的通道均值图;(4) 无监督PatchCore仍为最强定位器(Pixel-AUROC=0.983),凸显有监督提升的边界。结果表明,现有评估掩码可作为有效训练信号,稳定提升缺陷分类器的注意力位置。

原文摘要 · Abstract (English)

Ground-truth defect masks in industrial inspection datasets are typically reserved for evaluation. This paper repurposes them as spatial supervision signals during training of classification networks, teaching a model not just what to predict but where to look. The method adds an activation-based attention alignment loss that steers convolutional feature maps toward defect regions, in a mixed-supervision formulation that also accommodates samples without masks, such as diffusion-generated images. Combined with DDPM augmentation, synthetic images contribute quantity while masks contribute spatial precision. We evaluate 85 models (four CNN backbones under a 2x2 data/training factorial over five seeds, plus a Swin-V2-T transformer baseline) on the MVTec-AD bottle benchmark, with localization measured on held-out defect images excluded from classifier gradient updates. Main findings: (1) attention-guided training improves activation-based localization (Pixel-AUROC) by +18.0% for EfficientNetB0 with augmentation (p=0.005, Cohen's d=2.6) and +18.7% for ResNet50 (p=0.008), significant in four of eight CNN settings (uncorrected for multiple comparisons) with no significant change in classification; (2) for EfficientNetB0 a data x training-mode interaction is significant (p=0.002), consistent with a super-additive effect (+13.6% combined vs +1.6% summed individual effects); (3) architectures with weaker spatial representations benefit most, whereas ConvNeXt-T shows no effect, apparently because its depthwise-convolution activations yield spatially uninformative channel-mean maps; (4) unsupervised PatchCore remains the strongest localizer (Pixel-AUROC=0.983), contextualizing the supervised gains. These results show that existing evaluation masks can act as practical training signals that measurably and reproducibly improve where defect classifiers attend.

缺陷检测注意力机制扩散模型工业视觉

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。