Anomaly detection and localization are widely used in industrial manufacturing for its efficiency and effectiveness. Anomalies are rare and hard to collect and supervised models easily over-fit to these seen anomalies with a handful of abnormal samples, producing unsatisfactory performance. On the other hand, anomalies are typically subtle, hard to discern, and of various appearance, making it difficult to detect anomalies and let alone locate anomalous regions. To address these issues, we propose a framework called Prototypical Residual Network (PRN), which learns feature residuals of varying scales and sizes between anomalous and normal patterns to accurately reconstruct the segmentation maps of anomalous regions. PRN mainly consists of two parts: multi-scale prototypes that explicitly represent the residual features of anomalies to normal patterns; a multisize self-attention mechanism that enables variable-sized anomalous feature learning. Besides, we present a variety of anomaly generation strategies that consider both seen and unseen appearance variance to enlarge and diversify anomalies. Extensive experiments on the challenging and widely used MVTec AD benchmark show that PRN outperforms current state-of-the-art unsupervised and supervised methods. We further report SOTA results on three additional datasets to demonstrate the effectiveness and generalizability of PRN.
翻译:异常检测和定位在工业制造中得到广泛应用,因其高效和有效。异常数据往往稀少且难以收集,受监督的模型容易对于这些已知的异常样本进行过拟合,产生的性能效果不令人满意。另一方面,异常通常是微妙的、难以分辨之间的差异,在各种形态上可能会产生不同,使得检测异常困难,甚至无法定位其中的异常区域。为了解决这些问题,我们提出了一个名为Prototypical Residual Network(PRN)的框架,该框架学习了异常模式与正常模式之间具有不同尺度和大小的特征残差,可以准确地重建异常区域的分割图。PRN主要包含两个部分:多尺度原型,明确表示异常对正常模式的重要特征;多尺度自注意机制,使得可以学习变化较大的异常特征。此外,我们提出了各种异常生成策略,考虑了已知和未知的外观变化,以扩大和丰富异常。在具有挑战性和广泛使用的MVTec AD基准测试上进行了广泛的实验,结果表明PRN超越了当前最先进的无监督和监督方法。我们进一步在其他三个数据集上报告了SOTA结果,以展示PRN的有效性和泛化能力。