A Prototype-Based Neural Network for Image Anomaly Detection and Localization

Chao Huang,Zhao Kang,Hong Wu
DOI: https://doi.org/10.1007/s11063-024-11466-7
2024-05-25
Abstract:Image anomaly detection and localization perform not only image-level anomaly classification but also locate pixel-level anomaly regions. Recently, it has received much research attention due to its wide application in various fields. This paper proposes ProtoAD, a prototype-based neural network for image anomaly detection and localization. First, the patch features of normal images are extracted by a deep network pre-trained on nature images. Then, the prototypes of the normal patch features are learned by non-parametric clustering. Finally, we construct an image anomaly localization network (ProtoAD) by appending the feature extraction network with $L2$ feature normalization, a $1\times1$ convolutional layer, a channel max-pooling, and a subtraction operation. We use the prototypes as the kernels of the $1\times1$ convolutional layer; therefore, our neural network does not need a training phase and can conduct anomaly detection and localization in an end-to-end manner. Extensive experiments on two challenging industrial anomaly detection datasets, MVTec AD and BTAD, demonstrate that ProtoAD achieves competitive performance compared to the state-of-the-art methods with a higher inference speed. The source code is available at: <a class="link-external link-https" href="https://github.com/98chao/ProtoAD" rel="external noopener nofollow">this https URL</a>.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to efficiently identify and locate abnormal regions in images in image anomaly detection and localization. Specifically, the paper focuses on how to design a method that can both detect whether an image contains anomalies and accurately locate the abnormal regions at the pixel - level when only normal samples are available. This has wide application value in fields such as industrial optical inspection, video surveillance, and medical imaging. The paper proposes a prototype - based neural network method (ProtoAD) to achieve this goal through the following steps: 1. **Feature extraction**: First, use a pre - trained deep network to extract patch features from normal images. 2. **Prototype learning**: Then, learn the prototypes of these normal patch features through a non - parametric clustering algorithm. 3. **Anomaly detection and localization**: Finally, construct a neural network (ProtoAD) for image anomaly localization. This network realizes end - to - end anomaly detection and localization through an additional feature extraction network, L2 feature normalization, 1×1 convolutional layer, channel - wise max - pooling, and subtraction operations. The advantages of this method are: - **No training phase required**: Since a pre - trained feature extractor and a non - parametric clustering algorithm are used, the entire network does not require an additional training process. - **Efficient inference speed**: Compared with other methods, ProtoAD significantly improves the inference speed while maintaining high accuracy. - **End - to - end processing**: The entire process can be completed in one neural network, which is more concise and efficient. Experiments on two challenging industrial anomaly detection datasets, MVTec AD and BTAD, have proven that ProtoAD can be comparable to the state - of - the - art methods in performance, and has a higher inference speed, making it more suitable for practical applications.