{"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/exploring-intrinsic-normal-prototypes-within","title":"Exploring Intrinsic Normal Prototypes within a Single Image for Universal Anomaly Detection","arxiv_id":"2503.02424","date":"2025-03-04","proceeding":"CVPR 2025 1","authors":["Wei Luo","Yunkang Cao","Haiming Yao","Xiaotian Zhang","Jianan Lou","Yuqi Cheng","Weiming Shen","Wenyong Yu"],"abstract":"Anomaly detection (AD) is essential for industrial inspection, yet existing methods typically rely on ``comparing'' test images to normal references from a training set. However, variations in appearance and positioning often complicate the alignment of these references with the test image, limiting detection accuracy. We observe that most anomalies manifest as local variations, meaning that even within anomalous images, valuable normal information remains. We argue that this information is useful and may be more aligned with the anomalies since both the anomalies and the normal information originate from the same image. Therefore, rather than relying on external normality from the training set, we propose INP-Former, a novel method that extracts Intrinsic Normal Prototypes (INPs) directly from the test image. Specifically, we introduce the INP Extractor, which linearly combines normal tokens to represent INPs. We further propose an INP Coherence Loss to ensure INPs can faithfully represent normality for the testing image. These INPs then guide the INP-Guided Decoder to reconstruct only normal tokens, with reconstruction errors serving as anomaly scores. Additionally, we propose a Soft Mining Loss to prioritize hard-to-optimize samples during training. INP-Former achieves state-of-the-art performance in single-class, multi-class, and few-shot AD tasks across MVTec-AD, VisA, and Real-IAD, positioning it as a versatile and universal solution for AD. Remarkably, INP-Former also demonstrates some zero-shot AD capability. Code is available at:https://github.com/luow23/INP-Former.","url_abs":"https://arxiv.org/abs/2503.02424v1","url_pdf":"https://arxiv.org/pdf/2503.02424v1.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":"exploring-intrinsic-normal-prototypes-within","repo_url":"https://github.com/luow23/inp-former","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"exploring-intrinsic-normal-prototypes-within","repo_url":"https://github.com/septmars/DL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"multi-class-anomaly-detection","task_name":"Multi-class Anomaly Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/anomaly-detection-on-mvtec-ad","task":"Anomaly Detection","dataset":"MVTec AD","model":"INP-Fomer ViT-L (model-unified multi-class)","rank_in_archive_order":5,"of":148,"metrics":{"Detection AUROC":"99.8","Segmentation AP":"72.1","Segmentation AUPRO":"95.6","Segmentation AUROC":"98.6"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-visa","task":"Anomaly Detection","dataset":"VisA","model":"INP-Former ViT-B (model-unified multi-class)","rank_in_archive_order":5,"of":50,"metrics":{"Detection AUROC":"98.9","F1-Score":"96.6","Segmentation AUPRO":"94.4","Segmentation AUPRO (until 30% FPR)":"94.4","Segmentation AUROC":"98.9"},"uses_additional_data":false},{"leaderboard":"/sota/multi-class-anomaly-detection-on-mvtec-ad","task":"Multi-class Anomaly Detection","dataset":"MVTec AD","model":"INP-Former-Large","rank_in_archive_order":1,"of":13,"metrics":{"Detection AUROC":"99.8","Segmentation AUROC":"98.6"},"uses_additional_data":false},{"leaderboard":"/sota/multi-class-anomaly-detection-on-mvtec-ad","task":"Multi-class Anomaly Detection","dataset":"MVTec AD","model":"INP-Former-Base","rank_in_archive_order":3,"of":13,"metrics":{"Detection AUROC":"99.7","Segmentation AUROC":"98.5"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2503.02424","atlas_url":"https://app.syntology.ai/?focus=2503.02424","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.02424"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/septmars/DL","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/luow23/inp-former","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/luow23/INP-Former","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"ran_draft_wrong":3,"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":4,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"ea7fb411e7e6b7ea","entry":"INP_Former","repo":"luow23/INP-Former","repo_kind":"official","path":"models/uad.py","file_url":"https://github.com/luow23/INP-Former/blob/HEAD/models/uad.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea7fb411e7e6b7ea"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"septmars/DL","repo_kind":"listed","path":"ReContrast/de_resnet.py","file_url":"https://github.com/septmars/DL/blob/HEAD/ReContrast/de_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"septmars/DL","repo_kind":"listed","path":"ReContrast/de_resnet.py","file_url":"https://github.com/septmars/DL/blob/HEAD/ReContrast/de_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"8d035278d5e4a82a","entry":"deconv2x2","repo":"septmars/DL","repo_kind":"listed","path":"ReContrast/de_resnet.py","file_url":"https://github.com/septmars/DL/blob/HEAD/ReContrast/de_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d035278d5e4a82a"}},{"code_sha256_prefix":"a631c312fa4d7cbd","entry":"resnet18","repo":"septmars/DL","repo_kind":"listed","path":"ReContrast/resnet.py","file_url":"https://github.com/septmars/DL/blob/HEAD/ReContrast/resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a631c312fa4d7cbd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}