Semantic Coarse-to-Fine Granularity Learning for Two-Stage Few-Shot Anomaly Detection

Semantic Coarse-to-Fine Granularity Learning for Two-Stage Few-Shot Anomaly Detection

Lei Zhang, Chengzhi Lyu, Ziheng Chen, Shaokang Li, Bin Xia
Copyright: © 2024 |Pages: 22
DOI: 10.4018/IJSWIS.344426
Article PDF Download
Open access articles are freely available for download

Abstract

Anomaly detection is critical in industrial inspection, where identifying defects significantly impacts product quality and safety. Existing models, primarily based on convolutional neural networks (CNNs), struggle with noise sensitivity and insufficient resolution for fine-grained feature discrimination. To address these issues, we propose a two-stage few-shot anomaly detection network that enhances semantic feature granularity and generalization. The network includes a coarse-grained anomaly detection module, a multi-scale channel attention module, and a fine-grained detection module. The coarse-grained module identifies abnormal regions, serving as the initial filter. The multi-scale channel attention module focuses on anomalous features, enhancing sensitivity to fine-grained characteristics. This step overcomes limitations in discerning subtle yet critical anomalies. The fine-grained detection module refines feature maps, enhancing generalization. Experimental results on the MVTec dataset show an image-level Area under the region of convergence (AUROC) of 92.3% and a pixel-level AUROC of 95.3%, a 1% to 2% improvement over leading FSAD methods.
Article Preview
Top

Introduction

Anomaly detection plays a crucial role in industrial settings by identifying irregularities such as scratches and broken parts, thereby enhancing production efficiency. While obtaining normal samples is typically straightforward in these environments, acquiring diverse and challenging defective examples can be challenging. The complexity of the process often renders classical supervised training (Ding et al., 2022; Li et al., 2023; Liu et al., 2023; Bozorgtabar & Mahapatra, 2023) impractical, leading to the prevalence of unsupervised methods in industrial anomaly detection. These methods, which only use normal samples during training, identify anomalies by contrasting the tested data with learned normal features (Ilyas et al., 2022; Salehi et al., 2021; Xu et al., 2023). While unsupervised anomaly detection methods (Sun et al., 2023; Fang et al., 2023) primarily focus on feature learning to capture normal data's intrinsic characteristics, recent approaches allow for the labeling of a small number of anomalous samples (Atabay & Hassanpour, 2023), albeit at an increased cost.

To address the challenges of limited sample images and reduce labeling costs, few-shot anomaly detection has been proposed. Conventional supervised anomaly detection relies on a combination of limited anomaly data and a large number of normal samples to detect anomalies (Ding et al., 2022; Atabay & Hassanpour, 2023; Bozorgtabar & Mahapatra, 2023; Pang, Yan, et al.,2020), as shown in Figure 1(a), but it often exhibits inferior performance compared to unsupervised methods in anomaly identification and localization. In contrast, embedding-based, unsupervised anomaly detection methods leverage pre-trained models (Wang et al. 2023) eliminating the need for a large amount of training data, as shown in Figure 1(b). On the other hand, unsupervised anomaly detection methods based on image reconstruction require training the reconstruction model from scratch, necessitating a larger training set, as shown in Figure 1(c). However, both methods still require adjustments to fit unseen categories.

Figure 1.

Four Different Common Anomaly Detection Methods

IJSWIS.344426.f01

Recent studies focus on few-shot anomaly detection. The aim of generalized few-shot anomaly detection is to use a limited number of labeled anomalies as partial knowledge of anomalies within a specific domain of interest for training (Sheynin et al., 2021) requiring only a small number of samples for each category, as illustrated in Figure 1(d). In the early stages, the form of transfer learning was used to improve the learning effect in related fields, utilizing knowledge from the source domain to assist in semantic anomaly detection in the target domain. To address the problem caused by insufficient abnormal samples, a single model is used for detection across multiple categories, and fine-tuning is conducted based on a small number of high-quality samples. Adversarial models are used for sample generation, and multi-scale convolutional networks are combined to differentiate images, thereby greatly reducing the demand for training samples. However, the adjustability of the adversarial model may pose challenges, and its generalization may decrease with an increase in the number of training samples.

Complete Article List

Search this Journal:
Reset
Volume 20: 1 Issue (2024)
Volume 19: 1 Issue (2023)
Volume 18: 4 Issues (2022): 2 Released, 2 Forthcoming
Volume 17: 4 Issues (2021)
Volume 16: 4 Issues (2020)
Volume 15: 4 Issues (2019)
Volume 14: 4 Issues (2018)
Volume 13: 4 Issues (2017)
Volume 12: 4 Issues (2016)
Volume 11: 4 Issues (2015)
Volume 10: 4 Issues (2014)
Volume 9: 4 Issues (2013)
Volume 8: 4 Issues (2012)
Volume 7: 4 Issues (2011)
Volume 6: 4 Issues (2010)
Volume 5: 4 Issues (2009)
Volume 4: 4 Issues (2008)
Volume 3: 4 Issues (2007)
Volume 2: 4 Issues (2006)
Volume 1: 4 Issues (2005)
View Complete Journal Contents Listing