Skip to content
Chimera readability score 80 out of 100, Expert reading level.

Figures
Abstract
Industrial anomaly detection (IAD), aiming at automatically identifying abnormal patterns that deviate from the normal manufacturing process, plays a critical role in ensuring product quality and equipment safety for intelligent manufacturing systems. In this work, we delve into exploring the generalized and subtle-pattern awarded defect detection. We also propose a visual expert-guided multi-scale anomaly detection method. As the extracted regions often exhibit subtle and vague features that hamper the precise and reliable detection, we leverage the established super-resolution technique to enhance the spatial resolution and recover fine-grained details. It facilitates more discriminative defect representation and improves the model’s capacity at localize anomalies at finer scales. The multi-scale fusion module is constructed by the graph attention network. It aggregates the suspicious regions across different scales by modeling their inter-scale dependencies and contextual relationships. As it dynamically weights and localities those features, it preserves both the micro irregularities and macro structural deviations, hence offering comprehensive anomaly information. Extensive experiments under zero-shot and few-shot settings were conducted on several public datasets. The results demonstrate that the proposed method consistently outperforms existing mainstream approaches in both image-level and pixel-level anomaly detection, achieving pixel-level values of 98.6% and 98.1% under the 4-shot setting on two major benchmarks, and 94.6% under the zero-shot setting, with particularly strong capability in detecting subtle defects on fine-grained textures. It also exhibits enhanced robustness and generalization in cross-domain transfer scenarios.
Citation: Zhu X, Cui W, Tao Y, Wang X (2026) Vision expert guided inspection for industrial anomaly detection. PLoS One 21(7): e0353291. https://doi.org/10.1371/journal.pone.0353291
Editor: Paulo Jorge Simões Coelho, Polytechnic Institute of Leiria: Instituto Politecnico de Leiria, PORTUGAL
Received: January 30, 2026; Accepted: June 22, 2026; Published: July 8, 2026
Copyright: © 2026 Zhu et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: No data was generated by this study. The following existing data sources were used: [dataset name] from [dataset location] available via [web address or DOI hyperlink]. The MVTec AD dataset used in this study is publicly available at the official MVTec Software website: https://www.mvtec.com/research-teaching/datasets/mvtec-ad/downloads The VisA dataset used in this study is publicly available from the official source at Amazon Web Services (AWS) Simple Storage Service (S3): https://amazon-visual-anomaly.s3.us-west-2.amazonaws.com/VisA_20220922.tar A persistent identifier for this dataset is available at DOI: 10.57702/os78k58d. The NEU Surface Defect Database used in this study is managed and distributed by the faculty at Northeastern University. The dataset and its annotations can be accessed via the official project page at http://faculty.neu.edu.cn/songkc/en/zdylm/263265/list/index.htm where direct download links (including Google Drive and Baidu Pan) are provided.
Funding: This research was supported by the National Natural Science Foundation of China (62272093), the Economic and Social Development Research Topics of Liaoning Province (2025-10146-244), and the Postgraduate Education and Teaching Reform Research Project of Liaoning Province (LNYJG2024092). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
1. Introduction
Industrial anomaly detection represents a critical component in intelligent manufacturing systems [1], aiming to automatically identify abnormal patterns that deviate from normal conditions in manufacturing processes, thereby ensuring product quality and equipment safety. Current research approaches primarily include traditional statistical model-based detection frameworks and end-to-end discriminative methods based on deep learning. In particular, methods leveraging self-supervised learning and generative models have demonstrated considerable effectiveness in constrained scenarios [2]. Nevertheless, the field continues to grapple with several core challenges, a problem primarily due to the extreme scarcity of anomalous samples in industrial settings, which provides insufficient supervisory signals for supervised learning methods and thus severely limits model generalization. Moreover, real industrial anomalies often exhibit subtle deviations in morphology, texture, or structure, especially in high-end manufacturing environments where the differences between normal and anomalous samples are minimal [3]. This subtlety makes it challenging for existing methods to achieve an optimal balance between sensitivity and robustness. In image-based surface defect detection, anomalies frequently manifest as subtle, low-contrast irregularities on product surfaces, occurring across a wide spectrum of industrial products, from high-precision components to conventional hot-rolled steel sheets. Detecting such fine-grained surface defects is a central focus of the present study. The performance of these models is susceptible to significant degradation due to variations in the distribution of data between different production lines, components, or industrial sectors [4]. Similar challenges regarding data quality and environmental interference have also been noted in other engineering domains, such as image degradation in maritime navigation [5] and signal noise in infrastructure monitoring [6]. These challenges underscore the urgent need to develop detection frameworks with stronger generalization capacity and finer discriminative ability.
In recent years, numerous deep learning-based approaches have been developed for industrial anomaly detection. Most studies focus on learning global semantic representations from large-scale normal samples, and then identifying anomalies by comparing test instances against these established normal patterns [7]. However, such methods primarily rely on image-level feature matching. While effective for macroscopic anomalies, this paradigm does not explicitly encourage the model to localize defects, and may therefore fall short in the fine-grained perception of potential defective regions. As for the weak defect scenarios, which often demonstrate vague discriminative features and occupy a subtle areas of the defect regions in the images. those methods struggle to effectively capture the inconspicuous features hence exhibit limited identification capabilities. Several studies, including Anomaly-OV [8] and WinCLIP [9], have attempted to address this issue through multi-scale analysis strategies; however, their effectiveness in fine-grained defect perception is often constrained [10]. Although these methods partition input images into uniform patches through a sliding window mechanism for local inspection, they still suffer from notable drawbacks. Rather than dynamically focusing on semantically suspicious regions, they process the entire image in a rigid mechanical manner. The marginal improvement in sensitivity to subtle anomalies, together with the added computational cost, ultimately hinders their practical deployment in real-time industrial settings.
This paper presents a novel visual expert-guided multi-scale framework designed to advance the field of generalized anomaly detection, with a dedicated focus on identifying subtle structural defects. A primary challenge in this domain stems from the inherently vague and inconspicuous nature of features within localized regions of interest, which complicates reliable diagnostic outcomes. To address this limitation, the proposed method incorporates a super-resolution paradigm for generating magnified image patches. This enhancement of spatial resolution serves to recover fine-grained textual details, thereby fostering a more discriminative representation of potential defects and significantly improving localization precision at finer scales. The framework further integrates a multi-scale fusion module based on a Graph Attention Network. This component is engineered to aggregate features from suspicious regions across different scales by explicitly modeling their inter-dependencies and contextual relationships. Through dynamic attention weighting of these multi-scale features, the model achieves a balanced preservation of both micro-scale irregularities and macro-structural deviations, leading to a comprehensive and robust anomaly assessment.
The method proposed in this study introduces key innovations to existing industrial anomaly detection techniques. The key innovations are listed below:
- We propose a vision expert-guided subtle anomaly enhancement framework for industrial anomaly detection that selectively focuses on semantically suspicious regions rather than performing exhaustive inspection across the entire image, thereby enhancing the detection of weak and fine-grained defects.
- We introduce a region-aware super-resolution enhancement strategy that reconstructs and magnifies suspicious regions, recovering structural and texture details critical for detecting low-resolution and subtle anomalies.
- We design a graph-based multi-scale semantic fusion mechanism that integrates global contextual information with localized anomaly-aware features, enhancing robustness under scale variations and complex industrial scenarios.
- Extensive experiments on MVTec-AD, VisA, and NEU demonstrate that the proposed framework consistently improves zero-shot and few-shot anomaly detection performance and generalizes across different vision expert models.
2. Related work
2.1 Anomaly detection
Recent years have witnessed rapid progress in deep learning-based methods for industrial visual anomaly detection, with considerable performance achieved on established benchmarks. Current methodologies can be broadly divided into three groups, namely reconstruction-based, feature embedding-based, and synthetic anomaly-based techniques. While these approaches have continuously improved detection performance, the majority still rely on computing anomaly scores across entire image views, lacking dedicated mechanisms for the targeted perception of potentially defective regions.
Reconstruction-based methods typically learn the distribution of normal samples using encoder-decoder architectures and detect anomalies based on reconstruction errors [11–13], For instance, Iqbal et al. [14] proposed a pyramid visual transformer reconstruction network that integrates multi-scale features. Zhang et al. [15] introduced a masked multi-scale reconstruction approach to improve robustness against occlusions and domain shifts, while Hoang et al. [16] combined visual and geometric features for cross-modal anomaly detection. However, these methods often depend on global image reconstruction quality and exhibit limited sensitivity to local subtle anomalies.
Feature embedding-based methods employ pre-trained models to extract image features and identify anomalies by comparing them against normal prototypes stored in a memory bank. For example, Yang et al. [17] improved feature discriminability through self-supervised graph convolution, while Huang W et al. [18] proposed a patch-based deep support vector data description method to capture both structural and detailed information simultaneously. Wang X et al. [19] enhanced sensitivity to small defects via component-level feature augmentation. Although these methods avoid the training overhead associated with reconstruction-based approaches, their anomaly detection relies on global feature distances computed over the entire image or its uniformly partitioned blocks. Consequently, they fail to achieve adaptive focusing on suspicious regions.
The synthetic anomaly method improves the model’s capability to recognize anomalous patterns by generating realistic defective samples to augment the training set. For instance, Peng et al. [20] integrated synthetic anomalies with reconstruction consistency constraints to enhance surface defect detection. Chen et al. [21] proposed a boundary-guided anomaly synthesis strategy to emphasize anomalous features in critical regions, while Zhang et al. [22] developed a comprehensive detection framework combining synthetic data generation, feature selection, and residual analysis. Although synthetic approaches partially mitigate the scarcity of anomalous samples, the synthesis process remains largely based on full images or uniformly divided patches, lacking explicit modeling of potential defective regions.
2.2 Zero-/few-shot anomaly detection
In zero-shot and few-shot anomaly detection, several studies have explored cross-class generalization using pre-trained vision-language models [23,24]. For example, Huang C et al. [25] employed a multi-scale memory module to handle complex scenarios, Li et al. [26] adapted CLIP for language-guided anomaly localization, and Jeong et al. [9] leveraged CLIP’s zero-shot capability directly for anomaly detection. Although these methods exhibit certain adaptability under limited sample availability, most still primarily depend on global feature matching over entire images or fixed image patches, without incorporating targeted perception or magnification mechanisms for suspicious regions.
It is worth noting that although some methods employ sliding windows or multi-scale segmentation strategies to improve detection granularity, these approaches typically partition the image in a uniform, grid-like manner. They lack semantic or structural prior guidance to emphasize potentially defective regions. This uniform processing strategy not only incurs substantial computational overhead but may also introduce redundant computation in background areas. Meanwhile, truly subtle anomalies may be diluted during feature aggregation. The limited capacity of existing methods to perceive and localize faint and sparsely distributed anomalies therefore represents an ongoing challenge.
3. Method
3.1 Overview
The overall pipeline of the proposed method is illustrated in Fig 1. For a query image , the method first utilizes a visual expert model to localize n suspicious regions. The extraction of these regions results in a collection of patches, formally defined as . The method extracts a set of patches , where each patch has spatial dimensions and . These regions are then resized to match the original image dimensions (, ) via a generative super-resolution model. Both the original image and the extracted multi-scale region images are fed into an image encoder to extract multi-scale features. The multi-scale regions are constructed as a star graph where the original image is located at the center node. We propose the ROI multi-scale fusion module constructed by attention graph network to effectively integrate feature information from different sources and scales. Under unsupervised training, the image features from the encoder, together with the text features, are input into the multi-scale fusion module to produce an image-level anomaly score S and a pixel-level anomaly localization map . In the few-shot setting, the system localizes and detects anomalies by comparing image patches against features of normal samples stored in a memory bank.
3.2 Vision expert guided inspection
3.2.1 Region-of-interest patches extraction.
In industrial anomaly detection, partitioning entire images into patches typically incurs high computational overhead and redundant operations, primarily due to the fact that most patches contain no meaningful defect information. To address this limitation, this paper introduces a visual expert-guided region of interest extraction strategy. The approach leverages existing well-established anomaly detection models, including WinCLIP [9], AdaCLIP [27], and AA-CLIP [28], as vision experts to produce initial anomaly response maps. Regions with anomaly scores exceeding a threshold of 0.3 are selected as candidate anomalous zones to ensure broad coverage of potential defect locations.
To further aggregate discrete anomaly response points, the K-means algorithm is applied to cluster these hotspots into K salient regions. Bounding boxes are then computed for each cluster to obtain preliminary localization of key areas. To enhance contextual integrity, each bounding box is slightly expanded and resized to several fixed scales, including 64 × 64, 128 × 128, and 256 × 256 pixels. Each extracted region is then placed onto a zero-background anchor matrix matching the original image size, forming a region representation with explicit positional information. This representation preserves both the local characteristics of the suspicious region and its spatial location within the global image.
3.2.2 Enhancement with super resolution.
Since the extracted suspicious regions are considerably smaller than the original image, directly analyzing these areas often fails to capture effective defect-related features. To address this issue, this paper introduces a magnification strategy based on a generative super-resolution model, which aims to restore the small suspicious regions to the original image resolution, thereby enhancing the characterization of defects. For the super-resolution reconstruction, the Stable Diffusion model [29] is leveraged to augment the spatial resolution and recover fine-grained details in the suspicious regions. This type of model synthesizes visually faithful image details through an iterative denoising process and has demonstrated strong performance in image super-resolution tasks. Through this process, the suspicious regions are transformed into a set of magnified image patches , where each . This process significantly improves the visibility of defect features while preserving the semantic information of the regions.
3.3 Multi-scale region-of-interest fusion
This graph attention-based fusion mechanism exhibits three key characteristics. It preserves the hierarchical structure of features, enabling organic integration of visual information across different scales. By employing spatial-semantic dual attention, the model enhances its sensitivity to subtle anomalous patterns. The messaging mechanism of the star graph further ensures computational efficiency throughout the feature fusion process. Ultimately, the fusion module produces a fused block feature for each layer. As shown in Fig 2, this design enables the selective enhancement of anomaly-related local features while maintaining a consistent global context, which ultimately yields a more robust feature set for anomaly scoring and localization.
During the feature extraction stage, this work adopts a typical processing pipeline similar to methods such as WinCLIP and AdaCLIP. The image encoder is divided into four hierarchical levels, and patch-level features are extracted from the intermediate layers of each level. Both the original image and all images of the suspicious regions are independently fed into the encoder to obtain their corresponding multi-scale features. Additionally, the original unmagnified anchor images of the suspicious regions are also encoded to extract spatial embedding features that represent their positional and extent information. This process can be formally described as follows:
(1)(2)Where I denotes the collective of original image with and suspicious regions . denotes the patch feature at the stage j, and denotes the positional embedding at the stage j.
To integrate multi-scale patch features, a star graph structure is constructed with the original image features at the center node and features from various suspicious regions as surrounding nodes. Feature interaction is achieved through a message-passing mechanism. Within this graph, an attention-based fusion method is designed. Specifically, at each level j, the original image feature is formulated by Equation 3. The query vector encapsulates the semantic context of the global image and functions as a baseline reference for the selection and fusion of features.
(3)After concatenating all embedded features, the resulting representation is linearly transformed into the key vector , as expressed in Equation 4. This key vector captures the spatial distribution of each local region along with its relative positional relationship to the global image. Hence, it offers a searchable spatial-semantic index for subsequent query matching.
(4)Upon concatenation, all image patch features are linearly transformed into the value vector , as specified in Equation 5. The value vector aggregates multi-scale visual features derived from both global and local regions, thereby constituting the foundational information source for the fusion process.
(5)The attention weight is computed by scaling the dot product. This process constructs a correlation matrix between the global semantic context and local spatial locations, thereby quantifying the relative contribution of each local region to the global feature representation. The resulting fusion feature is given by Equation 6, where d denotes the feature dimension.
(6)This mechanism effectively recalibrates features across different regions and scales in both semantic and spatial dimensions, allowing the central node to adaptively incorporate the most anomaly-relevant local contextual information. Ultimately, the fusion module outputs a fused patch feature for each level, enriched with multi-scale context from both the original image and all suspicious regions.
3.4 Zero-shot & Few-shot
In the zero-shot anomaly detection setting, the proposed method computes the anomaly score by comparing the multi-scale fused region-of-interest patch features against predefined text features. Specifically, the feature maps from all four levels are upsampled, and their similarity to the text embeddings is computed. The pixel-level anomaly segmentation result is obtained as:
(7)(8)Where denots the zero-shot anomaly segmentation results. The anomaly maps are upsampled to the same resolution to the original image. is the zero-shot anomaly classification results.
In the few-shot setting, the system leverages the provided normal samples to extract multi-level features through the vision expert-guided region-of-interest (ROI) extraction module and the multi-scale fusion module. These features are used to construct a memory bank of normal features. During inference, the system generates a supervised anomaly segmentation map and a classification score by computing the cosine distance between the features of the query image and those stored in the normal feature memory.
To further enhance detection performance, this paper introduces a weighted fusion strategy that combines the results from both zero-shot and few-shot detection. The fused results are defined as:
(9)(10)This fusion mechanism leverages both the generalization capability of zero-shot detection and the domain adaptability of few-shot learning, thereby achieving more robust anomaly detection across diverse real-world scenarios.
3.5 Loss function
To achieve precise localization of pixel-level anomalous regions, the model is jointly optimized using a multi-objective loss function comprising cross-entropy loss, focal loss, and Dice loss. The cross-entropy loss defined as:
(11)Measures the discrepancy between the true pixel label and the predicted probability . It is widely used in semantic segmentation tasks to enhance inter-class discriminability. To address class imbalance, the focal loss is introduced.
(12)This loss reduces the influence of easily classified examples through the modulating factor , thus directing greater attention to challenging and rare anomalous regions. Additionally, to improve boundary fitting quality and spatial consistency, the Dice loss is employed:
(13)This quantifies the overlap between the prediction and the ground truth , thereby increasing the model’s sensitivity to the shape and location of anomalous areas. The overall loss function is a weighted sum of the three components:
(14)Where , , and are hyper parameters that balance the contributions of each loss term during training, through multi-objective optimization, the model demonstrates enhanced robustness and higher accuracy in pixel-level anomaly localization.
4. Experiments
4.1 Datasets
The proposed method was comprehensively evaluated on three industrial anomaly detection datasets, including the widely adopted public benchmarks MVTec Anomaly Detection (MVTec-AD) [30] and Visual Anomaly (VisA) [31], as well as a real-world dataset from the metallurgy industry, the Northeastern University (NEU) surface defect database [32]. All models were trained using only the normal samples from each dataset to adhere to real-world industrial anomaly detection conditions.
MVTec-AD comprises 15 categories of industrial products, with a training set of 3,629 normal images and a test set of 1,725 images containing various defect types and pixel-level annotations. VisA presents a more challenging benchmark with 12 object categories, featuring greater intra-class variation and more complex backgrounds. It includes 8,659 normal training images and 2,162 test images, of which 1,200 contain anomalies. The NEU surface defect database was adopted to validate performance in a metallurgical industrial context, containing 1,800 grayscale images across six typical hot-rolled steel strip surface defects.
To rigorously assess the model’s capability in detecting subtle defects, a multi-scale evaluation setup was established by proportionally resizing the images to 50% and 25% of their original dimensions, creating low-contrast, challenging detection scenarios.
4.2 Evaluation metrics
To evaluate the performance of the proposed method in industrial anomaly detection, we adopted image-level Area Under the Receiver Operating Characteristic Curve (AUROC) and pixel-level AUROC as the primary metrics. These criteria provide an objective assessment of the model’s capability in both anomaly classification and localization.
Image-level AUROC evaluates the model’s ability to distinguish between normal and abnormal images. This metric is computed as the area under the curve plotting the true positive rate (TPR) against the false positive rate (FPR) across various classification thresholds. A value closer to 1 indicates superior overall classification performance.
Pixel-level AUROC, on the other hand, assesses the accuracy of anomaly localization. It is derived by comparing pixel-wise predictions with ground truth annotations and calculating the area under the corresponding ROC. This metric effectively reflects the model’s capability in detecting subtle defects and delineating their boundaries.
4.3 Base models
The proposed method was evaluated against several representative baselines in industrial anomaly detection. WinCLIP [9] performs zero-shot and few-shot anomaly classification and segmentation by combining state words with prompt templates across window, patch, and image-level features. Similarly, AdaCLIP [27] introduces learnable static and dynamic prompts and is further trained on auxiliary data to improve cross-category generalization. In contrast, PatchCore [33] constructs a memory bank of multi-scale normal features for high-precision anomaly localization via similarity matching. SPADE [34] generates anomaly score maps using nearest-neighbor search in deep feature space, making it suitable for few-shot scenarios. APRIL-GAN [35] employs a hybrid architecture that integrates generative adversarial networks with feature matching in a joint image-text embedding space, enhanced by multiple memory banks under few-shot settings. PromptAD [36] introduces a one-class prompt learning framework that transforms normal prompts into anomalous versions via semantic splicing to construct negative samples and guide model training. Finally, AA-CLIP [28] addresses the inherent anomaly unawareness of CLIP through a two-stage adaptation strategy that disentangles anomaly-aware text anchors and aligns them with patch-level visual features, incorporating lightweight residual adapters to retain generalization while boosting anomaly sensitivity.
These baseline models encompass a diverse range of technical approaches, including feature reconstruction, memory-based mechanisms, prompt learning, and large-scale model inference, providing a representative and comprehensive benchmark for this study.
4.4 Implementation details
All experiments were conducted on a server equipped with an NVIDIA GeForce RTX 4090 GPU (24 GB), an Intel Xeon Silver 4314 CPU (64 cores), and 125 GB of RAM, running Ubuntu 24.04 LTS (kernel 6.17.0). The software environment included Python 3.12.0, PyTorch 2.10.0 with CUDA 12.8, Diffusers 0.21.0, Transformers 4.36.0, and OpenAI CLIP 1.0. The super-resolution module employed the Stable Diffusion x4 upscaler (stabilityai/stable-diffusion-x4-upscaler, checkpoint x4-upscaler-ema.ckpt), performing 4 × upscaling with 75 denoising steps using pretrained weights without fine-tuning on industrial textures. Average inference time for a 1024 × 1024 image was 3.5 s, with 2.8 s consumed by the Stable Diffusion upscaling, and peak GPU memory usage of 8.5 GB. During few-shot training, the CLIP vision and text encoders were frozen, while only the learnable prompt tokens and the multi-scale fusion module were optimized, with loss function hyperparameters set to α = 0.7, β = 0.3, and δ = 0.5. For visual expert-guided ROI extraction, candidate anomalous regions were defined as areas with anomaly scores exceeding 0.3, a threshold empirically determined on a validation subset of MVTec AD to balance defect coverage and false positives. These candidate points were subsequently grouped into coherent suspicious regions using K-means clustering with k = 3.
5. Experimental results
5.1 Comparison on few-shot anomaly detection
As shown in Table 1, the proposed method was systematically compared with existing mainstream baseline models under few-shot anomaly detection settings. Evaluation metrics included image-level AUROC [37] and pixel-level AUROC. Experiments were conducted on the MVTec-AD, VisA, and NEU surface defect database, covering various few-shot configurations including 1-, 2-, and 4-shot scenarios.
In terms of overall performance, the proposed method consistently outperforms all baseline models across all datasets and few-shot settings, demonstrating leading results in both image-level and pixel-level anomaly detection metrics. Specifically, under the one-shot setting, the method achieves image-level AUROC scores of 95.8% on MVTec-AD and 92.6% on VisA, improving upon the previous best models by 1.2 to 5.8 percentage points. It also attains an image-level AUROC of 91.8% on the NEU metal defect dataset. For pixel-level localization, the method reaches an AUROC of 97.8% on MVTec-AD, significantly surpassing other models. When the sample size increases to four, the image-level AUROC further improves to 97.8% on MVTec-AD and 94.8% on VisA, while the pixel-level AUROC values reach 98.6% and 98.1%, maintaining a clear advantage.
In comparison, baseline models such as WinCLIP and AA-CLIP perform competitively in image-level classification but show limitations in localizing subtle defects. Although PatchCore and SPADE exhibit acceptable localization performance in certain categories, their results depend heavily on the quantity and quality of normal samples. Prompt learning-based approaches, including AdaCLIP and PromptAD, demonstrate unstable performance in cross-category generalization. These experimental results confirm that the proposed method offers stronger adaptability and stability in complex industrial scenarios.
These results demonstrate the effectiveness of the proposed multi-scale visual expert mechanism and region fusion strategy under few-shot settings. The performance advantage primarily stems from the precise localization of suspicious regions and the effective integration of multi-scale contextual information, enabling more stable and refined anomaly identification with limited samples. As illustrated in Figs 3 and 4, the visualization results further confirm that the proposed method achieves superior defect boundary clarity and response consistency compared to other models, while maintaining high classification accuracy.
5.2 Comparison on zero-shot anomaly detection
Under the zero-shot anomaly detection setting, quantitative comparison results between the proposed method and existing mainstream models are presented in Table 2. Empirical results on multiple benchmarks, including MVTec-AD, VisA, and the NEU dataset, confirm that the proposed method consistently outperforms all baseline models in both image-level and pixel-level evaluation, underscoring its strong generalization and cross-domain stability.
It is worth noting that the construction of text features plays a critical role in the performance of zero-shot anomaly detection. For instance, WinCLIP relies on manually designed text prompt templates, which can maintain discriminative power in certain categories. However, owing to the limited semantic coverage of the predefined prompts, it often fails to capture the diverse anomalous patterns present across different industrial scenarios, leading to constrained detection performance. In contrast, the proposed method leverages a pre-trained vision-language model to automatically extract semantic features aligned with image content, thereby mitigating bias introduced by manual design. This approach results in more robust alignment between textual and visual representations.
5.3 Comparison on subtle defect detection
In the image down-scaling experiment designed to simulate subtle defect detection, a comparison of the proposed method with other approaches is presented in Tables 3 and 4. This experiment evaluates the robustness of the models under low-resolution conditions by down-scaling the original images to create more challenging detection scenarios with less discernible defects. The results demonstrate that the proposed method consistently outperforms existing state-of-the-art models in both image-level and pixel-level AUROC across various scaling factors, demonstrating its consistent and stable capability in detecting subtle anomalies.
As the image size decreases, the performance of most comparison models declines significantly. This effect is particularly evident in methods relying on global feature matching, such as PatchCore and WinCLIP. Due to the loss of fine-grained details and degraded feature representation, these models struggle to extract discriminative defect features from severely degraded images. In contrast, the proposed method actively focuses on suspected regions and enhances them locally via a vision expert-guided region-extraction mechanism coupled with generative super-resolution magnification. This approach effectively mitigates information loss due to reduced resolution.
As shown in the qualitative results in Fig 5, the proposed method demonstrates superior capability in detecting subtle anomalies under significant image down-scaling. Compared to baseline models, our approach generates anomaly localization maps with markedly higher spatial accuracy and stronger suppression of background noise. This performance is attributed to our super-resolution zooming mechanism, as shown in the second column of Fig 6. For challenging low-resolution inputs where subtle defects become nearly imperceptible, our method actively localizes suspicious regions and applies generative super-resolution to reconstruct high-fidelity, magnified image patches. This reconstruction effectively recovers critical structural and textural details essential for accurate defect identification, as evidenced by the clear revelation of defect patterns in the magnified views. These enhanced patches provide subsequent vision-language models with semantically rich and discriminative visual features, thereby enabling precise anomaly recognition and localization.
This study demonstrates that the introduced magnification mechanism significantly enhances sensitivity to subtle defects by enabling the targeted localization and reconstruction of suspicious regions. This strategy not only mitigates information loss from image down-scaling, but also improves robust recognition of low-contrast and small-target anomalies, thereby maintaining strong detection performance under challenging imaging conditions.
To further investigate the mechanism by which the proposed framework improves anomaly detection, we visualize the progressive enhancement of subtle anomalies in Fig 7. The vision expert first identifies the most suspicious region in the image, which is then enhanced using Stable Diffusion to recover fine-grained structural and texture details within the ROI. This enhancement strengthens the local anomaly-related feature responses, resulting in more precise anomaly localization.
The suspicious region identified by the vision expert is selectively enhanced using Stable Diffusion, resulting in stronger anomaly-related feature responses and more precise localization of subtle defects.
As illustrated in Fig 7, subtle defects in the original image are difficult to distinguish from normal regions due to low contrast and weak structural cues. After ROI localization, the framework concentrates on the most relevant region while suppressing background information. The subsequent enhancement of local features increases their discriminative capability, leading to stronger responses around defect regions. Consequently, the final anomaly maps exhibit clearer boundaries and more accurate localization. These observations indicate that the proposed framework improves anomaly detection performance by progressively amplifying subtle anomaly features rather than relying solely on stronger pre-trained feature extractors.
5.4 Ablation studies
5.4.1 Step wise ablation on core components.
To quantitatively evaluate the contribution of each component in the proposed framework, comprehensive ablation experiments were conducted on the MVTec-AD, VisA, and NEU datasets under the 4-shot setting. The AA CLIP vision expert was adopted as the baseline model, and ROI extraction, multi scale fusion, and super resolution enhancement were progressively incorporated into the framework.
As reported in Table 5, introducing the vision expert guided ROI extraction leads to consistent performance improvements across all three datasets. The pixel level AUROC increases from 96.5% to 97.1% on MVTec-AD, from 97.4% to 97.6% on VisA, and from 96.3% to 96.5% on NEU. These results indicate that restricting feature extraction to the most informative regions reduces the influence of irrelevant background content and facilitates the detection of subtle defects.
Further improvements are obtained after incorporating the proposed multi scale fusion module. Compared with the ROI based configuration, the pixel level AUROC increases from 97.1% to 97.8% on MVTec-AD, from 97.6% to 97.9% on VisA, and from 96.5% to 96.8% on NEU. This observation suggests that aggregating anomaly cues from multiple feature scales enables a more comprehensive representation of defect characteristics and improves localization accuracy.
To evaluate the effectiveness of image enhancement, bicubic interpolation and Stable Diffusion based super resolution were further investigated. Compared with the configuration without image enhancement, bicubic interpolation improves the pixel level AUROC to 98.2%, 97.9%, and 96.9% on MVTec-AD, VisA, and NEU, respectively. Replacing bicubic interpolation with Stable Diffusion based enhancement yields additional gains, resulting in final AUROC values of 98.6% on MVTec-AD, 98.1% on VisA, and 97.2% on NEU. The improvements are particularly evident on MVTec-AD and VisA, suggesting that enhancing fine grained structural details within suspicious regions facilitates more accurate anomaly localization.
Taken together, the results reveal a consistent performance improvement as each component is progressively incorporated into the framework. The full configuration achieves the highest performance on all three datasets, indicating that ROI extraction, multi scale fusion, and Stable Diffusion based enhancement provide complementary benefits and jointly contribute to the effectiveness of the proposed framework.
5.4.2 Generalization across different vision experts.
To evaluate whether the observed performance gains originate from the proposed framework rather than from a specific vision expert, experiments were conducted using four representative anomaly detection experts, including WinCLIP, AdaCLIP, PatchCore, and AA-CLIP. These methods represent different anomaly detection paradigms and exhibit varying baseline performance levels. To provide a controlled comparison across different experts, the experiments were conducted on the MVTec-AD dataset under the 4-shot setting using Pixel-AUROC as the evaluation metric, since this benchmark is the most widely adopted dataset for industrial anomaly detection and contains diverse defect categories.
For each expert, the proposed framework was integrated without modifying the original model architecture. The detection performance before and after incorporating the framework is summarized in Table 6 and illustrated in Fig 8.
As shown in Table 6, consistent improvements are observed across all evaluated experts. Specifically, the proposed framework improves the Pixel-AUROC from 96.2% to 97.8% for WinCLIP, from 90.1% to 92.0% for AdaCLIP, from 94.3% to 96.3% for PatchCore, and from 96.5% to 98.6% for AA-CLIP. The corresponding gains range from 1.6 to 2.1 percentage points. Notably, even AA-CLIP, which already provides strong baseline performance, achieves a further improvement of 2.1%.
Fig 8 provides a visual comparison of the performance improvements achieved by different experts after integrating the proposed framework. Despite the differences in their original performance levels, all experts benefit from the framework and exhibit consistent performance gains.
Overall, the results demonstrate that the effectiveness of the proposed framework is not limited to a particular expert architecture. The framework can be readily integrated with different anomaly detection experts and consistently improve detection performance across models with different architectures and baseline capabilities. Therefore, the observed gains cannot be solely attributed to the strength of a particular vision expert.
5.4.3 Impact on the multi-stage features.
To evaluate the effectiveness of the multi-stage feature fusion mechanism, we visualized the multi-level features extracted by the proposed method at different image scales. Fig 9 displays the multi-scale feature response maps obtained from the four stages of the image encoder, corresponding to input images at 100%, 50%, and 25% of the original size.
Observations indicate that the model progressively localizes anomalous regions while effectively suppressing background interference and irrelevant areas across various scales. In deeper layers, feature responses become increasingly concentrated at actual defect locations, demonstrating the strong semantic selectivity and structural awareness of the multi-scale ROI fusion module. Even as image size decreases, the model maintains well-localized responses within suspicious regions, and the extracted patch features remain highly discriminative across resolutions, confirming the robustness of the method to scale variations.
Line plots depict feature response strength at four network stages (Stage 1–4) under different image resolutions (100%, 50%, 25% scales) for MVTec-AD, VisA, and NEU datasets, as shown in Fig 10. Feature response strength across four encoder stages (shallow to deep) evaluated at three image scales. All datasets exhibit similar trends: shallow layers (Stage 1–2) show increased relative importance at lower resolutions, while deep layers (Stage 3–4) preserve strong semantic representations across scale variations.
These results underscore the critical role of the multi-stage feature fusion mechanism in enhancing the model’s semantic understanding. This process leverages shallow features to preserve detailed spatial information and deep features to supply high-level semantic abstractions. Through cross-stage integration and region-aware alignment, the model achieves comprehensive anomaly perception spanning local to global patterns. Even under substantial image resolution reduction, the model sustains precise anomaly localization and recognition performance.
5.4.4 Effectiveness evaluation of Stable Diffusion for super-resolution.
To assess the impact of super-resolution methods on anomaly detection, we conducted comprehensive experiments across all 15 categories of the MVTec AD dataset. Three ROI enhancement strategies were evaluated: Stable Diffusion, bicubic interpolation, and direct scaling without super-resolution, with Stable Diffusion implemented using the stable-diffusion-x4-upscaler configuration. As summarized in Table 7, Stable Diffusion outperforms bicubic interpolation in 14 categories, achieving an average pixel-level AUROC of 93.07% compared to 89.86%, corresponding to an overall improvement of approximately 3.2 percentage points. The only exception was the transistor category, which showed a marginal decrease of 0.83 percentage points, likely due to random variation.
A paired t-test across the 15 AUROC categories further confirmed the statistical significance of this improvement. Stable Diffusion significantly outperformed bicubic interpolation (t = 3.92, p = 0.0015), indicating that the observed gains are robust and unlikely to result from chance.
Visual inspection of reconstructed defective regions provides additional insight. Fig 11 presents ROI images from four representative categories: grids, capsules, screws, and bottles. For grids, Stable Diffusion produces noticeably sharper edges, while bicubic interpolation introduces blurring. Subtle scratches in capsules become clearly visible with Stable Diffusion enhancement. Fine screw threads are effectively restored, preserving high-frequency details lost in bicubic interpolation. In contrast, bottles, with smooth surfaces and large defect regions, exhibit minimal visual difference between the methods, consistent with a modest AUROC improvement of only one percentage point.
These results illustrate the applicability pattern of Stable Diffusion for super-resolution. It excels at recovering high-frequency details and regular textures, yielding pronounced performance gains in categories with rich textures or fine structural patterns, such as grids, screws, capsules, hazelnuts, and wood. For categories with smooth surfaces or extensive defects, such as bottles and transistors, conventional interpolation suffices, and the incremental benefits of Stable Diffusion are limited.
Finally, we evaluated Stable Diffusion in an industrially relevant scenario: detecting surface defects on rolled steel. Hot-rolled plates typically exhibit directional textures along the rolling direction, with complex patterns such as scale, scratches, and plaques, representing fine-grained structures rather than smooth surfaces. Accordingly, Stable Diffusion is theoretically well-suited for detecting rolling defects. Combining quantitative metrics and visual observations, we demonstrate that it substantially enhances industrial anomaly detection performance, particularly for subtle defects and textured surfaces. The framework allows flexible deployment, enabling selective use of Stable Diffusion based on specific industrial requirements, and its generalization can be further improved through domain-adaptive fine-tuning.
5.5 Practical deployment and efficiency analysis
While the previous sections focus on detection accuracy and generalization across experts, practical industrial deployment also requires consideration of computational efficiency and inference latency. To assess the applicability of the proposed framework in real-world scenarios, we analyzed the computational overhead of its components.
The average inference time for a 1024 × 1024 image is 3.5 s, with Stable Diffusion-based super-resolution accounting for approximately 2.8 s. In comparison, the vision expert-guided ROI extraction and multi-scale fusion modules introduce only minor overhead, indicating that the super-resolution stage represents the primary computational bottleneck.
To evaluate the tradeoff between efficiency and performance, we also investigated alternative lightweight enhancement strategies, including bicubic interpolation and direct scaling without super-resolution. Results show that bicubic interpolation substantially reduces inference time while still providing notable improvements over direct scaling. Although Stable Diffusion achieves the highest pixel-level AUROC, bicubic interpolation offers a more favorable balance between efficiency and detection performance.
These results indicate that the proposed framework can be flexibly deployed according to industrial requirements. In high-precision inspection scenarios, such as semiconductor manufacturing or fine-grained steel surface inspection, Stable Diffusion enhancement provides superior subtle defect perception. For latency-sensitive environments, lightweight strategies like bicubic interpolation can be adopted to achieve efficient yet effective anomaly detection.
6. Conclusions
This paper presents an industrial anomaly detection method based on vision-expert guidance and multi-scale feature fusion. The approach begins by localizing suspicious regions using a visual expert model, then enhances the representation of subtle defects through generative super-resolution to magnify and reconstruct these areas. A multi-stage feature fusion module based on a star graph attention mechanism is introduced to effectively integrate semantic information from both global images and multiple local regions. This module preserves contextual relationships while emphasizing high-fidelity details of anomalous areas. Experimental results demonstrate that the proposed method outperforms existing mainstream approaches across multiple datasets and few-shot settings, particularly in detecting subtle defects and generalizing across domains.
Although the proposed method achieves promising performance, several limitations remain. First, the quality of the visual expert model significantly affects the accuracy of suspicious-region extraction. If the expert model exhibits limited discriminative ability in specific categories, the effectiveness of subsequent processing may be compromised. Second, the computational overhead of super-resolution reconstruction and multi-scale feature fusion remains relatively high, which could pose challenges for deployment in real-time industrial applications. Additionally, the current method has not yet incorporated a dynamic text prompting mechanism, limiting its adaptability to previously unseen defect categories.
Future research will explore several promising directions to advance this work. Efforts will focus on developing lightweight feature extraction and fusion strategies to improve computational efficiency, alongside the investigation of adaptive prompt learning mechanisms to enhance zero-shot recognition of unseen anomaly types. The framework will also be extended to video anomaly detection and multi-modal industrial data scenarios, thereby broadening its practical applicability and generalization.
References
- 1. Liu J, et al. Deep industrial image anomaly detection: a survey. Mach Intell Res. 2024;21(1):104–35.
- 2. Staar B, Ltjen M, Freitag M. Anomaly detection with convolutional neural networks for industrial surface inspection. Procedia CIRP. 2019;79:484–9.
- 3.
Orti Navarro J, others. The surface defect identification problem in the industry: a novel approach with semantic segmentation and generative adversarial networks. Universitat Politècnica de Catalunya; 2024.
- 4. Wei L, et al. Surface defects detection of cylindrical high-precision industrial parts based on deep learning algorithms: a review. Oper Res Forum. 2024.
- 5.
Chen X, et al. Vision transformer-based image dehazing for climate-resilient maritime navigation. 2026.
- 6.
Chen X, et al. Anomaly detection and cleaning of highway elevation data from google earth using ensemble empirical mode decomposition. 2018;144(5):04018015.
- 7.
Bae J, Lee JH, Kim S. Pni: industrial anomaly detection using position and neighborhood information. Proceedings of the IEEE/CVF International Conference on Computer Vision; 2023.
- 8.
Xu J, et al. Towards zero-shot anomaly detection and reasoning with multimodal large language models. Proceedings of the Computer Vision and Pattern Recognition Conference; 2025.
- 9.
Jeong J, et al. Winclip: Zero-/few-shot anomaly classification and segmentation. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; 2023.
- 10. Shao H, et al. Multi-scale prototype fusion network for industrial product surface anomaly detection and localization. IEEE Sens J. 2024.
- 11.
Fung C, et al. Perspectives from a comprehensive evaluation of reconstruction-based anomaly detection in industrial control systems. European Symposium on Research in Computer Security; 2022.
- 12. Givnan S, Chalmers C, Fergus P, Ortega-Martorell S, Whalley T. Anomaly detection using autoencoder reconstruction upon industrial motors. Sensors (Basel). 2022;22(9):3166. pmid:35590855
- 13.
Erba A, et al. Constrained concealment attacks against reconstruction-based anomaly detectors in industrial control systems. Proceedings of the 36th Annual Computer Security Applications Conference; 2020.
- 14. Iqbal E, Khan SU, Javed S, Moyo B, Zweiri Y, Abdulrahman Y. Multi-scale feature reconstruction network for industrial anomaly detection. Knowl-Based Syst. 2024;305:112650.
- 15. Zhang Z, et al. Industrial anomaly detection with domain shift: a real-world dataset and masked multi-scale reconstruction. Comput Ind. 2023;151:103990.
- 16. Hoang DC, et al. Unsupervised visual-to-geometric feature reconstruction for vision-based industrial anomaly detection. IEEE Access. 2025.
- 17. Yang M, et al. SLSG: industrial image anomaly detection with improved feature embeddings and one-class classification. Pattern Recognit. 2024;156:110862.
- 18. Huang W, Li Y, Xu Z, Yao X, Wan R. Improved deep support vector data description model using feature patching for industrial anomaly detection. Sensors (Basel). 2024;25(1):67. pmid:39796858
- 19. Wang X, et al. Towards more accurate industrial anomaly detection: a component-level feature-enhancement approach. Electronics. 2025;14(8):1613.
- 20. Peng T, Zheng Y, Zhao L, Zheng E. Industrial product surface anomaly detection with realistic synthetic anomalies based on defect map prediction. Sensors (Basel). 2024;24(1):264. pmid:38203128
- 21. Chen Q, Luo H, Gao H, Lv C, Zhang Z. Progressive boundary guided anomaly synthesis for industrial anomaly detection. IEEE Trans Circuits Syst Video Technol. 2025;35(2):1193–208.
- 22.
Zhang X, Xu M, Zhou X. Realnet: a feature selection network with realistic synthetic anomaly for anomaly detection. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; 2024.
- 23.
Sheynin S, Benaim S, Wolf L. A hierarchical transformation-discriminating generative model for few shot anomaly detection. Proceedings of the IEEE/CVF International Conference on Computer Vision; 2021.
- 24.
Huang C, et al. Registration based few-shot anomaly detection. European Conference on Computer Vision; 2022.
- 25.
Huang C, et al. Multi-scale memory comparison for zero-/few-shot anomaly detection. arXiv:2308.04789 [Preprint]. 2023.
- 26.
Li Y, Ivanova E, Bruveris M. FADE: few-shot/zero-shot anomaly detection engine using large vision-language model. arXiv:2409.00556 [Preprint]. 2024.
- 27.
Cao Y, et al. Adaclip: adapting clip with hybrid learnable prompts for zero-shot anomaly detection. European Conference on Computer Vision; 2024.
- 28.
Ma W, et al. Aa-clip: enhancing zero-shot anomaly detection via anomaly-aware clip. Proceedings of the Computer Vision and Pattern Recognition Conference; 2025.
- 29.
Ho J, et al. Imagen video: high definition video generation with diffusion models. arXiv:2210.02303 [Preprint]. 2022.
- 30.
Bergmann P, et al. MVTec AD--A comprehensive real-world dataset for unsupervised anomaly detection. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; 2019.
- 31.
Zou Y, et al. Spot-the-difference self-supervised pre-training for anomaly detection and segmentation. European Conference on Computer Vision; 2022.
- 32. Song K, Hu S, Yan Y. Automatic recognition of surface defects on hot-rolled steel strip using scattering convolution network. J Comput Inf Syst. 2014;10(7):3049–55.
- 33.
Roth K, et al. Towards total recall in industrial anomaly detection. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; 2022.
- 34.
Cohen N, Hoshen Y. Sub-image anomaly detection with deep pyramid correspondences. arXiv:2005.02357 [Preprint]. 2020.
- 35.
Chen X, Han Y, Zhang J. A zero-/few-shot anomaly classification and segmentation method for CVPR 2023 (VAND) workshop challenge tracks 1 &2. 1st Place on Zero-shot AD and 4th Place on Few-shot AD; 2023. 17382 p.
- 36.
Li Y, et al. Promptad: Zero-shot anomaly detection using text prompts. Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision; 2024.
- 37.
Provost F, Fawcett T. Analysis and visualization of classifier performance with nonuniform class and cost distributions. Proceedings of AAAI-97 Workshop on AI Approaches to Fraud Detection & Risk Management; 1997.

Sentinel — Human

Confidence

This text exhibits strong characteristics of peer-reviewed academic research; it is highly structured, methodologically dense, and relies on specific technical details to present novel contributions.

Signals Detected
low severity: Sentence length variance is moderate; the writing flows logically but has dense, technical phrasing typical of academic work.
low severity: High coherence; the argument structure (problem $ ightarrow$ solution $ ightarrow$ mechanism $ ightarrow$ results) is highly logical and flows seamlessly across sections.
low severity: Use of internal citations and referencing established baseline works (e.g., WinCLIP, MVTec-AD) suggests grounding in existing literature rather than pure fabrication.
severity: Specific, nuanced technical details regarding the loss function (Equations 11-14), specific model architectures (Graph Attention Network, Stable Diffusion upscaler), and quantitative results (AUROC values) are highly detailed, which is characteristic of research reporting.
Human Indicators
The text contains explicit mathematical formulation references (Equations 11-14) and detailed experimental setup descriptions, indicating authorship by someone familiar with the full technical process.
The discussion successfully weaves together various advanced concepts (super-resolution, graph attention, few-shot learning) into a cohesive methodological narrative rather than just summarizing separate findings.