Anomaly detectors are widely used in industrial production to detect and localize unknown defects in query images. These detectors are trained on nominal images and have shown success in distinguishing anomalies from most normal samples. However, hard-nominal examples are scattered and far apart from most normalities, they are often mistaken for anomalies by existing anomaly detectors. To address this problem, we propose a simple yet efficient method: \textbf{H}ard Nominal \textbf{E}xample-aware \textbf{T}emplate \textbf{M}utual \textbf{M}atching (HETMM). Specifically, \textit{HETMM} aims to construct a robust prototype-based decision boundary, which can precisely distinguish between hard-nominal examples and anomalies, yielding fewer false-positive and missed-detection rates. Moreover, \textit{HETMM} mutually explores the anomalies in two directions between queries and the template set, and thus it is capable to capture the logical anomalies. This is a significant advantage over most anomaly detectors that frequently fail to detect logical anomalies. Additionally, to meet the speed-accuracy demands, we further propose \textbf{P}ixel-level \textbf{T}emplate \textbf{S}election (PTS) to streamline the original template set. \textit{PTS} selects cluster centres and hard-nominal examples to form a tiny set, maintaining the original decision boundaries. Comprehensive experiments on five real-world datasets demonstrate that our methods yield outperformance than existing advances under the real-time inference speed. Furthermore, \textit{HETMM} can be hot-updated by inserting novel samples, which may promptly address some incremental learning issues.
翻译:异常检测器在工业生产中广泛用于检测和定位查询图像中的未知缺陷。这些检测器是在名义图像上进行训练的,并已经在区分大多数正常样本和异常方面取得了成功。然而,硬性名义示例分散且与大多数正常性相距甚远,它们经常被现有的异常检测器误认为是异常。为了解决这个问题,我们提出了一种简单而有效的方法:硬性名义 示例感知 模板互匹配(HETMM)。具体来说,HETMM旨在构建一个稳健的基于原型的决策边界,可以精确区分硬性名义示例和异常,从而产生更少的假阳性和漏警率。此外,HETMM在查询和模板集之间沿两个方向相互探索异常,因此能够捕获逻辑异常。这是大多数异常检测器所无法检测到逻辑异常的重要优势。此外,为了满足速度-准确性要求,我们进一步提出了像素级模板选择(PTS)来简化原始模板集。PTS选择聚类中心和硬性名义示例形成一小组,保持原始决策边界。对五个真实世界数据集的全面实验表明,我们的方法在实时推理速度下产生比现有进展更好的表现。此外,HETMM可以通过插入新样本进行热更新,这可能会迅速解决一些增量学习问题。