Research on Lightweight Image Anomaly Detection Based on Anomaly Generation
(College of Electronics and Information Engineering, Sichuan University, Chengdu 610065, China)
Abstract
Industrial image anomaly detection aims to identify and locate defects on the surfaces of industrial products. Existing anomaly detection methods usually have long inference times and large model parameters, making it difficult to achieve fast detection on resource-constrained edge devices. To solve this problem, this paper proposes a lightweight anomaly detection model based on anomaly generation. By generating pixel-level defect pseudo-labels on images and feature maps, the traditional unsupervised anomaly detection task is transformed into a supervised pixel segmentation task, which significantly improves detection performance and drastically reduces computational overhead. The model structure is simple. It first uses a pre-trained residual network to extract features, then performs feature adaptation and feature detail enhancement, and finally outputs an anomaly distribution map through a segmentation head. Experiments on the MVTec AD dataset show that the model achieves high detection accuracy with fewer parameters.
Keywords
anomaly detection; anomaly generation; pixel segmentation; lightweight
References
- [1] BATZNER K,HECKLER L,KÖNIG R. EfficientAD: Accurate Visual Anomaly Detection at Millisecond-level Latencies [C]//2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV).Waikoloa:IEEE,2024:127-137.
- [2] LIU Z K,ZHOU Y M,XU Y S,et al. SimpleNet: A Simple Network for Image Anomaly Detection and Localization [C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Vancouver:IEEE,2023:20402-20411.
- [3] ZAVRTANIK V,KRISTAN M,SKOČAJ D. Recon-struction by Inpainting for Visual Anomaly Detection [J].Pattern Recognition,2021,112:107706.
- [4] RISTEA N C,MADAN N,IONESCU R T,et al. Self-supervised Predictive Convolutional Attentive Block for Anomaly Detection [C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).New Orleans:IEEE,2022:13576-13586.
- [5] LI C L,SOHN K,YOON J,et al. CutPaste: Self-supervised Learning for Anomaly Detection and Localization [C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Nashville:IEEE,2021:9659-9669.
- [6] ZAVRTANIK V,KRISTAN M,SKOČAJ D. DRÆM-A Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection [C]//2021 IEEE/CVF International Conference on Computer Vision (ICCV).Montreal:IEEE,2021:8330-8339.
- [7] YOU Z Y,CUI L,SHEN Y J,et al. A Unified Model for Multi-class Anomaly Detection [C]//Advances in Neural Information Processing Systems (NeurIPS).New Orleans:NeurIPS,2022:4571-4584.
- [8] ROLIH B,FUČKA M,SKOČAJ D. Supersimplenet: Unifying Unsupervised and Supervised Learning for Fast and Reliable Surface Defect Detection [C]//International Conference on Pattern Recognition (ICPR).Cham:Springer Nature Switzerland,2024:47-65.
- [9] BAE J,LEE J H,KIM S. PNI: Industrial Anomaly Detection Using Position and Neighborhood Information [C]//2023 IEEE/CVF International Conference on Computer Vision (ICCV).Paris:IEEE,2023:6359-6369.
- [10] HOU J L,ZHANG Y Y,ZHONG Q Y,et al. Divide-and-Assemble: Learning Block-Wise Memory for Unsupervised Anomaly Detection [C]//2021 IEEE/CVF International Conference on Computer Vision (ICCV).Montreal:IEEE,2021:8771-8780.
- [11] ROTH K,PEMULA L,ZEPEDA J,et al. Towards Total Recall in Industrial Anomaly Detection [C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).New Orleans:IEEE,2022:14318-14328.
- [12] DENG H,LI X. Anomaly Detection via Reverse Distillation from One-class Embedding [C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New Orleans:IEEE,2022:9737-9746.
- [13] REN T H,LIU S L,ZENG A L,et al. Grounded SAM: Assembling Open-World Models for Diverse Visual Tasks [J/OL].arXiv:2401.14159 [cs.CV].[2024-01-25].https://doi.org/10.48550/arXiv.2401.14159.
- [14] SUDRE C H,LI W,VERCAUTEREN T,et al. Generalised Dice Overlap as a Deep Learning Loss Function for Highly Unbalanced Segmentations [C]//Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support (DLMIA).Quebec City:Springer,2017:240-248.
- [15] BERGMANN P,BATZNER K,FAUSER M,et al. The MVTec Anomaly Detection Dataset: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection [J].International Journal of Computer Vision,2021,129(4):1038-1059.
About the authors
Wang Jie (1998-), male, Han ethnicity, from Yibin, Sichuan, is currently pursuing a master's degree in industrial image anomaly detection; Corresponding author: Yan Hua (1971-), male, Han ethnicity, from Dazhou, Sichuan, professor, PhD, research direction: intelligent information systems.