基于特征适配与质心引导对比学习的异常检测

Feature Adaptation and Centroid-Guided Contrastive Learning for Anomaly Detection

  • 摘要: 工业图像异常检测对保障产品质量意义重大,尤其在异常样本稀缺的场景下更为关键. 现有无监督方法在特征适配与复杂模式建模上面临挑战. 针对此,本文提出一种基于特征适配与质心引导对比学习的异常检测方法. 该方法首先利用轻量级特征适配模块缓解预训练模型的域偏移问题;然后引入质心引导对比学习机制,利用初始化质心动态建模特征点关系,通过构建基于质心的正负样本对来优化特征空间分布,以增强模型判别能力;最后,设计自适应质心选择策略,根据特征点归属确定性自适应选择评分机制,提升边界模糊区域检测精度. 实验结果表明,该方法在MVTec数据集上图像级AUROC达99.4%、像素级AUROC达98.3%,验证了其在工业异常检测与定位任务中的有效性.

     

    Abstract: Industrial image anomaly detection is significant for ensuring product quality, especially in scenarios where anomaly samples are scarce. Existing unsupervised methods face challenges in feature adaptation and complex pattern modeling. To address this, this paper proposes an anomaly detection method based on feature adaptation and centroid-guided contrastive learning. The method first utilizes a lightweight feature adaptation module to mitigate the domain shift problem of pre-trained models. Then, a centroid-guided contrastive learning mechanism is introduced, which uses initialized centroids to dynamically model feature point relationships and optimizes the feature space distribution by constructing centroid-based positive and negative sample pairs to enhance the model's discriminative ability. Finally, an adaptive centroid selection strategy is designed to adaptively choose a scoring mechanism based on the certainty of feature point assignment, improving detection accuracy in ambiguous boundary regions. Experiments show that the method achieves an image-level AUROC of 99.4% and a pixel-level AUROC of 98.3% on the MVTec dataset, validating its effectiveness in industrial anomaly detection and localization tasks.

     

/

返回文章
返回