为工业异常检测定制预训练特征,提升识别精度。
ADPretrain: Advancing Industrial Anomaly Detection via Anomaly Representation Pretraining
- 设计角度与范数对比损失,强化正常与异常特征差异。
- 在真实工业数据集RealIAD上预训练,避免自然图像分布偏移。
- 适配多种模型和数据集,显著提升异常检测效果。
当前主流异常检测方法依赖ImageNet预训练的特征网络,但自然图像预训练与异常检测目标不匹配,且自然图像与工业图像存在分布偏移,导致特征表现不佳。为此,我们提出ADPretrain框架,专为工业异常检测设计预训练表示。通过角距离和范数差异最大化,增强正常与异常特征的区分度;在大规模工业异常数据集RealIAD上进行预训练,缓解分布偏移问题;基于通用性残差特征学习,提升跨数据集适应能力。在五个异常检测数据集和五种主干网络上验证,替换原有特征后均显著提升性能。代码已开源。
原文摘要 · Abstract (English)
The current mainstream and state-of-the-art anomaly detection (AD) methods are substantially established on pretrained feature networks yielded by ImageNet pretraining. However, regardless of supervised or self-supervised pretraining, the pretraining process on ImageNet does not match the goal of anomaly detection (i.e., pretraining in natural images doesn't aim to distinguish between normal and abnormal). Moreover, natural images and industrial image data in AD scenarios typically have the distribution shift. The two issues can cause ImageNet-pretrained features to be suboptimal for AD tasks. To further promote the development of the AD field, pretrained representations specially for AD tasks are eager and very valuable. To this end, we propose a novel AD representation learning framework specially designed for learning robust and discriminative pretrained representations for industrial anomaly detection. Specifically, closely surrounding the goal of anomaly detection (i.e., focus on discrepancies between normals and anomalies), we propose angle- and norm-oriented contrastive losses to maximize the angle size and norm difference between normal and abnormal features simultaneously. To avoid the distribution shift from natural images to AD images, our pretraining is performed on a large-scale AD dataset, RealIAD. To further alleviate the potential shift between pretraining data and downstream AD datasets, we learn the pretrained AD representations based on the class-generalizable representation, residual features. For evaluation, based on five embedding-based AD methods, we simply replace their original features with our pretrained representations. Extensive experiments on five AD datasets and five backbones consistently show the superiority of our pretrained features. The code is available at https://github.com/xcyao00/ADPretrain.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。