Ano-SuPs: Multi-size anomaly detection for manufactured products by identifying suspected patches
Hao Xu, Juan Du, Andi Wang, YingCong Chen
TL;DR
This work tackles regional, multi-size anomalies in manufactured-product images where background complexity and anomaly-contamination hinder reconstruction-based detectors. It introduces Ano-SuPs, a two-stage method that fine-tunes a Vision Transformer–based patch reconstructor and applies a two-pass reconstruction: Step 1 identifies suspected patches using $E_{1,i}$ and threshold $q_{eta}$, and Step 2 confirms actual anomalies by reconstructing only non-suspected patches, using $E_{2,i}$ and threshold $q_{eta'}$. The approach mitigates anomaly contamination, enables robust multi-size anomaly detection, and demonstrates superior Dice scores on BTAD and MVTec Hazelnut datasets, with guidance that a small $K$ (e.g., 2) and small $$, $$ yield favorable performance–speed trade-offs. The method leverages a pretrained MAE for patch reconstruction and is computationally efficient due to parallelizable Step 1, making it suitable for real-time industrial quality inspection. Limitations include failure cases with large-area anomalies that require semantic information, while pretrained models and public datasets are provided to support reproducibility and application in practice.
Abstract
Image-based systems have gained popularity owing to their capacity to provide rich manufacturing status information, low implementation costs and high acquisition rates. However, the complexity of the image background and various anomaly patterns pose new challenges to existing matrix decomposition methods, which are inadequate for modeling requirements. Moreover, the uncertainty of the anomaly can cause anomaly contamination problems, making the designed model and method highly susceptible to external disturbances. To address these challenges, we propose a two-stage strategy anomaly detection method that detects anomalies by identifying suspected patches (Ano-SuPs). Specifically, we propose to detect the patches with anomalies by reconstructing the input image twice: the first step is to obtain a set of normal patches by removing those suspected patches, and the second step is to use those normal patches to refine the identification of the patches with anomalies. To demonstrate its effectiveness, we evaluate the proposed method systematically through simulation experiments and case studies. We further identified the key parameters and designed steps that impact the model's performance and efficiency.
