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.
翻译:异常检测与定位因其高效性在工业制造中广泛应用。异常样本稀缺且难以收集,监督模型在有少量异常样本的情况下易对已知异常过拟合,导致性能不佳。另一方面,异常通常具有细微性、难以辨别性及多样性外观,使得异常检测困难,更遑论异常区域定位。为解决这些问题,我们提出名为原型残差网络(PRN)的框架,该框架通过学习异常与正常模式间不同尺度与大小的特征残差,精确重建异常区域的分割图。PRN主要由两部分组成:显式表示异常相对正常模式残差特征的多尺度原型;支持可变大小异常特征学习的多尺寸自注意力机制。此外,我们提出多种考虑已知与未知外观变化的异常生成策略,以扩大并丰富异常样本。在具有挑战性且广泛使用的MVTec AD基准上的大量实验表明,PRN优于当前最先进的无监督与监督方法。我们进一步在三个额外数据集上报告了最优结果,验证了PRN的有效性与泛化能力。