{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/hard-nominal-example-aware-template-mutual","title":"Hard-normal Example-aware Template Mutual Matching for Industrial Anomaly Detection","arxiv_id":"2303.16191","date":"2023-03-28","proceeding":null,"authors":["Zixuan Chen","Xiaohua Xie","Lingxiao Yang","JianHuang Lai"],"abstract":"Anomaly detectors are widely used in industrial manufacturing to detect and localize unknown defects in query images. These detectors are trained on anomaly-free samples and have successfully distinguished anomalies from most normal samples. However, hard-normal examples are scattered and far apart from most normal samples, and thus they are often mistaken for anomalies by existing methods. To address this issue, we propose Hard-normal Example-aware Template Mutual Matching (HETMM), an efficient framework to build a robust prototype-based decision boundary. Specifically, HETMM employs the proposed Affine-invariant Template Mutual Matching (ATMM) to mitigate the affection brought by the affine transformations and easy-normal examples. By mutually matching the pixel-level prototypes within the patch-level search spaces between query and template set, ATMM can accurately distinguish between hard-normal examples and anomalies, achieving low false-positive and missed-detection rates. In addition, we also propose PTS to compress the original template set for speed-up. PTS selects cluster centres and hard-normal examples to preserve the original decision boundary, allowing this tiny set to achieve comparable performance to the original one. Extensive experiments demonstrate that HETMM outperforms state-of-the-art methods, while using a 60-sheet tiny set can achieve competitive performance and real-time inference speed (around 26.1 FPS) on a Quadro 8000 RTX GPU. HETMM is training-free and can be hot-updated by directly inserting novel samples into the template set, which can promptly address some incremental learning issues in industrial manufacturing.","url_abs":"https://arxiv.org/abs/2303.16191v5","url_pdf":"https://arxiv.org/pdf/2303.16191v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"hard-nominal-example-aware-template-mutual","repo_url":"https://github.com/NarcissusEx/HETMM","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"anomaly-localization","task_name":"Anomaly Localization"},{"task_slug":null,"task_name":"GPU"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/anomaly-detection-on-mvtec-ad","task":"Anomaly Detection","dataset":"MVTec AD","model":"HETMM","rank_in_archive_order":4,"of":148,"metrics":{"Detection AUROC":"99.8","Segmentation AUPRO":"96.4","Segmentation AUROC":"99"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-mvtec-loco-ad","task":"Anomaly Detection","dataset":"MVTec LOCO AD","model":"HETMM","rank_in_archive_order":14,"of":40,"metrics":{"Avg. Detection AUROC":"88.1","Detection AUROC (only logical)":"83.2","Detection AUROC (only structural)":"92.9"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-surface-defect-saliency","task":"Anomaly Detection","dataset":"Surface Defect Saliency of Magnetic Tile","model":"HETMM","rank_in_archive_order":1,"of":4,"metrics":{"Detection AUROC":"99.5"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-visa","task":"Anomaly Detection","dataset":"VisA","model":"HETMM","rank_in_archive_order":11,"of":50,"metrics":{"Detection AUROC":"98.1","Segmentation AUROC":"99.1"},"uses_additional_data":false}],"syntology":{"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}