Anomaly detection is represented as an unsupervised learning to identify deviated images from normal images. In general, there are two main challenges of anomaly detection tasks, i.e., the class imbalance and the unexpectedness of anomalies. In this paper, we propose a multiresolution feature guidance method based on Transformer named GTrans for unsupervised anomaly detection and localization. In GTrans, an Anomaly Guided Network (AGN) pre-trained on ImageNet is developed to provide surrogate labels for features and tokens. Under the tacit knowledge guidance of the AGN, the anomaly detection network named Trans utilizes Transformer to effectively establish a relationship between features with multiresolution, enhancing the ability of the Trans in fitting the normal data manifold. Due to the strong generalization ability of AGN, GTrans locates anomalies by comparing the differences in spatial distance and direction of multi-scale features extracted from the AGN and the Trans. Our experiments demonstrate that the proposed GTrans achieves state-of-the-art performance in both detection and localization on the MVTec AD dataset. GTrans achieves image-level and pixel-level anomaly detection AUROC scores of 99.0% and 97.9% on the MVTec AD dataset, respectively.
翻译:异常检测被表示为一种无监督学习任务,旨在从正常图像中识别异常图像。通常,异常检测任务面临两个主要挑战:类别不平衡和异常的不可预测性。本文提出了一种基于Transformer的多分辨率特征引导方法(名为GTrans),用于无监督异常检测与定位。在GTrans中,我们开发了一个在ImageNet上预训练的异常引导网络(AGN),为特征和令牌提供替代标签。在AGN的隐性知识引导下,名为Trans的异常检测网络利用Transformer有效建立多分辨率特征之间的关联,增强了Trans拟合正常数据流形的能力。由于AGN具有较强的泛化能力,GTrans通过比较从AGN和Trans提取的多尺度特征在空间距离和方向上的差异来定位异常。实验表明,所提出的GTrans在MVTec AD数据集上的异常检测与定位均达到了最先进的性能。在MVTec AD数据集上,GTrans的图像级和像素级异常检测AUROC分数分别达到99.0%和97.9%。