AG-DPF: adaptive gating-based dual-prototype fusion framework for metal anomaly detection
摘要
Industrial anomaly detection of metal surface defects is a critical research topic. Prior research has typically relied on a single prototype source to guide detection, leading to issues of defect-background confusion and low detection accuracy. Therefore, a framework called the Adaptive Gating-based Dual-Prototype Fusion Network (AG-DPF) is proposed. We extract intrinsic prototypes (INPs) from test samples and pre-stored prototypes (PRPs) from training samples. By incorporating an adaptive gating mechanism, the framework dynamically adjusts the weighting of INPs and PRPs based on the input feature’s context, achieving an effective fusion that intelligently balances the global knowledge of PRPs and the instance-specific information of INPs. Furthermore, to address the limited scale and diversity of existing benchmarks for real industrial scenarios, we construct Metal-AD, the first large-scale industrial metal dataset encompassing 10 categories. Experiments demonstrate that AG-DPF achieves state-of-the-art performance, reaching an image-level AUROC (I-AUROC) of 91.4% on Metal-AD and exhibiting strong cross-domain generalization with 99.6% on the MVTec-AD dataset. Visualization analysis confirms that pre-stored prototypes enhance sensitivity to defects with high background similarity, effectively addressing background confusion.