{"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/efficient-anomaly-detection-with-budget","title":"Industrial Anomaly Detection and Localization Using Weakly-Supervised Residual Transformers","arxiv_id":"2306.03492","date":"2023-06-06","proceeding":null,"authors":["Hanxi Li","Jingqi Wu","Deyin Liu","Lin Wu","Hao Chen","Mingwen Wang","Chunhua Shen"],"abstract":"Recent advancements in industrial anomaly detection (AD) have demonstrated that incorporating a small number of anomalous samples during training can significantly enhance accuracy. However, this improvement often comes at the cost of extensive annotation efforts, which are impractical for many real-world applications. In this paper, we introduce a novel framework, Weak}ly-supervised RESidual Transformer (WeakREST), designed to achieve high anomaly detection accuracy while minimizing the reliance on manual annotations. First, we reformulate the pixel-wise anomaly localization task into a block-wise classification problem. Second, we introduce a residual-based feature representation called Positional Fast Anomaly Residuals (PosFAR) which captures anomalous patterns more effectively. To leverage this feature, we adapt the Swin Transformer for enhanced anomaly detection and localization. Additionally, we propose a weak annotation approach, utilizing bounding boxes and image tags to define anomalous regions. This approach establishes a semi-supervised learning context that reduces the dependency on precise pixel-level labels. To further improve the learning process, we develop a novel ResMixMatch algorithm, capable of handling the interplay between weak labels and residual-based representations. On the benchmark dataset MVTec-AD, our method achieves an Average Precision (AP) of $83.0\\%$, surpassing the previous best result of $82.7\\%$ in the unsupervised setting. In the supervised AD setting, WeakREST attains an AP of $87.6\\%$, outperforming the previous best of $86.0\\%$. Notably, even when using weaker annotations such as bounding boxes, WeakREST exceeds the performance of leading methods relying on pixel-wise supervision, achieving an AP of $87.1\\%$ compared to the prior best of $86.0\\%$ on MVTec-AD.","url_abs":"https://arxiv.org/abs/2306.03492v6","url_pdf":"https://arxiv.org/pdf/2306.03492v6.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":[],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"anomaly-localization","task_name":"Anomaly Localization"},{"task_slug":"supervised-anomaly-detection","task_name":"Supervised Anomaly Detection"},{"task_slug":"unsupervised-anomaly-detection","task_name":"Unsupervised Anomaly Detection"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/anomaly-detection-on-btad","task":"Anomaly Detection","dataset":"BTAD","model":"WeakREST-Un","rank_in_archive_order":10,"of":15,"metrics":{"Detection AUROC":"94.4","Segmentation AP":"63.1","Segmentation AUPRO":"84.9","Segmentation AUROC":"98.7"},"uses_additional_data":true},{"leaderboard":"/sota/anomaly-detection-on-mvtec-ad","task":"Anomaly Detection","dataset":"MVTec AD","model":"WeakREST-Un","rank_in_archive_order":18,"of":148,"metrics":{"Detection AUROC":"99.6","FPS":"25.2","Segmentation AP":"83.0","Segmentation AUPRO":"97.6","Segmentation AUROC":"99.3"},"uses_additional_data":false},{"leaderboard":"/sota/supervised-anomaly-detection-on-btad","task":"Supervised Anomaly Detection","dataset":"BTAD","model":"WeakREST-Block","rank_in_archive_order":2,"of":2,"metrics":{"Detection AUROC":"96.5","Segmentation AP":"84.6","Segmentation AUPRO":"90.8","Segmentation AUROC":"99.3"},"uses_additional_data":true},{"leaderboard":"/sota/supervised-anomaly-detection-on-mvtec-ad","task":"Supervised Anomaly Detection","dataset":"MVTec AD","model":"WeakREST-Block","rank_in_archive_order":1,"of":8,"metrics":{"Detection AUROC":"99.8","Segmentation AP":"87.6","Segmentation AUPRO":"98.4","Segmentation AUROC":"99.7"},"uses_additional_data":true},{"leaderboard":"/sota/unsupervised-anomaly-detection-on","task":"Unsupervised Anomaly Detection","dataset":"KolektorSDD2","model":"WeakREST-Un","rank_in_archive_order":1,"of":3,"metrics":{"Segmentation AP":"76.9","Segmentation AUPRO":"98.5","Segmentation AUROC":"99.7"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.03492","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}