{"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/a-unified-anomaly-synthesis-strategy-with","title":"A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localization","arxiv_id":"2407.09359","date":"2024-07-12","proceeding":null,"authors":["Qiyu Chen","Huiyuan Luo","Chengkan Lv","Zhengtao Zhang"],"abstract":"Anomaly synthesis strategies can effectively enhance unsupervised anomaly detection. However, existing strategies have limitations in the coverage and controllability of anomaly synthesis, particularly for weak defects that are very similar to normal regions. In this paper, we propose Global and Local Anomaly co-Synthesis Strategy (GLASS), a novel unified framework designed to synthesize a broader coverage of anomalies under the manifold and hypersphere distribution constraints of Global Anomaly Synthesis (GAS) at the feature level and Local Anomaly Synthesis (LAS) at the image level. Our method synthesizes near-in-distribution anomalies in a controllable way using Gaussian noise guided by gradient ascent and truncated projection. GLASS achieves state-of-the-art results on the MVTec AD (detection AUROC of 99.9\\%), VisA, and MPDD datasets and excels in weak defect detection. The effectiveness and efficiency have been further validated in industrial applications for woven fabric defect detection. The code and dataset are available at: \\url{https://github.com/cqylunlun/GLASS}.","url_abs":"https://arxiv.org/abs/2407.09359v1","url_pdf":"https://arxiv.org/pdf/2407.09359v1.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":"a-unified-anomaly-synthesis-strategy-with","repo_url":"https://github.com/cqylunlun/glass","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-unified-anomaly-synthesis-strategy-with","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":"defect-detection","task_name":"Defect Detection"},{"task_slug":"unsupervised-anomaly-detection","task_name":"Unsupervised Anomaly Detection"}],"methods":[],"datasets_introduced":[{"slug":"wfdd","name":"WFDD","full_name":"Woven Fabric Defect Detection"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/anomaly-detection-on-mpdd","task":"Anomaly Detection","dataset":"MPDD","model":"GLASS","rank_in_archive_order":1,"of":16,"metrics":{"Detection AUROC":"99.6","Segmentation AUPRO":"98.2","Segmentation AUROC":"99.4"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-mvtec-ad","task":"Anomaly Detection","dataset":"MVTec AD","model":"GLASS","rank_in_archive_order":1,"of":148,"metrics":{"Detection AUROC":"99.9","Segmentation AUPRO":"96.8","Segmentation AUROC":"99.3"},"uses_additional_data":true},{"leaderboard":"/sota/anomaly-detection-on-visa","task":"Anomaly Detection","dataset":"VisA","model":"GLASS","rank_in_archive_order":8,"of":50,"metrics":{"Detection AUROC":"98.8","Segmentation AUPRO (until 30% FPR)":"92.8","Segmentation AUROC":"98.8"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-wfdd","task":"Anomaly Detection","dataset":"WFDD","model":"GLASS","rank_in_archive_order":1,"of":1,"metrics":{"Detection AUROC":"100","Segmentation AUPRO":"94.9","Segmentation AUROC":"98.9"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2407.09359","atlas_url":"https://app.syntology.ai/?focus=2407.09359","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.09359"}},"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/cqylunlun/glass","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"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":"445abda186be8f3e","entry":"compute_best_pr_re","repo":"cqylunlun/glass","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"445abda186be8f3e"}},{"code_sha256_prefix":"0ed340136461ba43","entry":"compute_imagewise_retrieval_metrics","repo":"cqylunlun/glass","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/metrics.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":"0ed340136461ba43"}},{"code_sha256_prefix":"b10a57e7570128c5","entry":"compute_pixelwise_retrieval_metrics","repo":"cqylunlun/glass","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/metrics.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":"b10a57e7570128c5"}},{"code_sha256_prefix":"bd60fc834523d1a1","entry":"create_storage_folder","repo":"cqylunlun/glass","repo_kind":"official","path":"utils.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/utils.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":"bd60fc834523d1a1"}},{"code_sha256_prefix":"61fd3c8459a48853","entry":"set_torch_device","repo":"cqylunlun/glass","repo_kind":"official","path":"utils.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/utils.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":"61fd3c8459a48853"}},{"code_sha256_prefix":"e7806e6d1dca9761","entry":"distribution_judge","repo":"cqylunlun/glass","repo_kind":"official","path":"utils.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/utils.py","link_basis":"first_harvest_node","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":"e7806e6d1dca9761"}},{"code_sha256_prefix":"4de91a4627a51ea2","entry":"lerp_np","repo":"cqylunlun/glass","repo_kind":"official","path":"perlin.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/perlin.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":"4de91a4627a51ea2"}},{"code_sha256_prefix":"c07c74fd129adbcc","entry":"load","repo":"cqylunlun/glass","repo_kind":"official","path":"backbones.py","file_url":"https://github.com/cqylunlun/glass/blob/HEAD/backbones.py","link_basis":"first_harvest_node","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":"c07c74fd129adbcc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}