Industrial anomaly detection method and system based on fine-grained text prompt feature engineering
Through fine-grained text prompt feature engineering, an anomaly detection model framework is built, which solves the problem of insufficient generalization ability of visual language models in industrial anomaly detection in the existing technology, achieves the ability to efficiently identify abnormal data in complex industrial environments, and reduces cost and time overhead.
Patent Information
- Application Number
- CN202411059783.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-08-05
AI Technical Summary
Existing large-scale pre-trained visual language models have insufficient generalization capabilities in industrial anomaly detection. Especially when data acquisition is difficult, single-category training models cannot effectively adapt to the diversity and differentiation of industrial data, resulting in poor model generalization capabilities.
Using a method based on fine-grained text prompt feature engineering, an anomaly detection model framework is built through the feature extraction module, fine-grained text prompt engineering module and cross-modal space domain multi-granularity interaction module to extract text features, image block features and image features of industrial images. Features, use image features to optimize text prompts, perform similarity comparison analysis, generate final anomaly detection results, and balance the detection results through a dynamic modulation mechanism.
It improves the generalization ability of the model, enhances the accuracy and stability of anomaly detection in small-sample industrial images, can effectively identify abnormal data in complex industrial environments, and reduces labor costs and time costs.
Smart Images

Figure CN118568650B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer vision and image recognition, and in particular to an industrial anomaly detection method and system based on fine-grained text prompt feature engineering. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] At present, large pre-trained visual language models have shown strong recognition capabilities in various tasks of visual anomaly detection and have played a certain important role. However, the application of this technology in actual industrial environments still needs continuous improvement. The task of industrial image anomaly detection, that is, the task of identifying abnormal data in industrial data samples, often relies on a large number of training samples. However, in real industry, product samples are complex and numerous, and it is extremely difficult to collect a large number of abnormal product samples for a certain category. The labor cost and time cost brought by model replacement and anomaly collection are immeasurable. Therefore, in the case of difficult data acquisition, few-sample industrial image anomaly detection is crucial. Only a small number of normal images of the target category are needed to complete the task of anomaly detection of the target category.
[0004] Most of the current anomaly detection models mainly adopt the method of training a single model for a single category, or directly use large pre-trained visual language models. Training a detection model framework for a specific single industrial product, and using a language and visual model that is not well generalized, are not suitable for the industrial field to cope with the differentiation of industrial data and the diversification of industrial products. Therefore, it is crucial to design a general anomaly detection model framework using pre-trained visual language models. Summary of the invention
[0005] In response to the above-mentioned defects, the present invention proposes an industrial anomaly detection method and system based on fine-grained text prompt feature engineering. For anomaly detection of industrial images with a small number of samples, an anomaly detection model framework is built through a feature extraction module, a fine-grained text prompt engineering module and a cross-modal spatial domain multi-granularity interaction module, thereby improving the generalization ability of the model.
[0006] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0007] The first aspect of the present disclosure provides an industrial anomaly detection method based on fine-grained text prompt feature engineering, comprising the following steps:
[0008] Extract text features, image block features and image features of industrial images;
[0009] Use image features to optimize and update text prompts to obtain fine-grained text prompt features;
[0010] Perform similarity comparison analysis on the image block features and the fine-grained text prompt features, and add and fuse the abnormal result graphs generated by the comparison to obtain the final abnormality detection result;
[0011] Optimize the parameters of the model to minimize the loss function, and use the trained model to perform anomaly detection on the test set.
[0012] As a further implementation method, the image block features include image block features output from four stages from shallow to deep layers, and the image features are global image features.
[0013] As a further implementation method, the text prompt is optimized and updated using image features to obtain fine-grained text prompt features, specifically:
[0014] The text features and image features are linearly transformed, and the results of the two are weighted fused element by element to obtain the first text prompt feature, the image features and text features are efficiently fused cross-modally to obtain the second text prompt feature, and the first text prompt feature and the second text prompt feature are dynamically fused to obtain a fine-grained text prompt feature.
[0015] As a further implementation method, before performing similarity comparison analysis between the image block features and the fine-grained text prompt features, the four-stage image block features and the fine-grained text prompt features need to be mapped into the same spatial feature domain.
[0016] As a further implementation method, in order to obtain multi-level image semantic information, the image information of the four stages is efficiently fused to obtain the image block features of the fifth stage, and the image block features mapped from the five stages are compared and analyzed for similarity with the fine-grained text prompt features.
[0017] As a further implementation method, the loss function of the model is defined as:
[0018]
[0019] in, is the multimodal heterogeneous matching loss function, is the global loss function, are the weight parameters of each loss function.
[0020] As a further implementation method, a dynamic modulation mechanism is introduced to balance the anomaly detection results guided by few-sample images and the detection results guided by text prompts.
[0021] A second aspect of the present disclosure provides an industrial anomaly detection system based on fine-grained text prompt feature engineering, comprising:
[0022] The feature extraction module is configured to: extract text features, image block features and image features of the industrial image;
[0023] The fine-grained text prompt engineering module is configured to: optimize and update the text prompt using the image features to obtain the fine-grained text prompt features;
[0024] The cross-modal spatial domain multi-granularity interaction module is configured to: perform similarity comparison analysis on the image block features and the fine-grained text prompt features, and add and fuse the abnormal result graphs generated by the comparison to obtain the final abnormality detection result;
[0025] The detection module is configured to: optimize the parameters of the model to minimize the loss function and use the trained model to perform anomaly detection on the test set.
[0026] The third aspect of the present disclosure provides a medium on which a program is stored. When the program is executed by a processor, the steps of the industrial anomaly detection method based on fine-grained text prompt feature engineering described in the first aspect of the present disclosure are implemented.
[0027] The fourth aspect of the present disclosure provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of an industrial anomaly detection method based on fine-grained text prompt feature engineering described in the first aspect of the present disclosure are implemented.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The industrial anomaly detection method based on fine-grained text prompt feature engineering proposed in the present invention aims to solve the problem that manually designed text prompt templates have limitations in describing normal / abnormal information of industrial images. A fine-grained text prompt engineering module is designed to capture image semantic feature information, use image features to adaptively optimize and update text prompts, and then fuse the fine-grained text prompt features with multi-stage image block features to obtain the final outlier result map, thereby improving the generalization ability of the model.
[0030] The industrial anomaly detection method based on fine-grained text prompt feature engineering proposed in the present invention aims at the problem that in real industry, product samples are complex and numerous, and it is extremely difficult to collect a large number of abnormal product samples for a certain category. By building a multi-level feature memory library for few-sample images, multi-level features of a small number of images are stored from normal sample images of the test category, and the category diversity of the features of a small number of images is enhanced. For the anomaly detection branch guided by the few-sample images, the classification and segmentation results are obtained by comparing them step by step with the features stored in the constructed multi-level feature memory library for the few-sample images, thereby improving the accuracy of the few-sample industrial detection results.
[0031] The industrial anomaly detection method based on fine-grained text prompt feature engineering proposed in the present disclosure includes an image-guided anomaly detection branch and a text-guided anomaly detection branch in the test inference process of industrial anomaly detection. In order to comprehensively consider the different degrees of influence of the two branches, a dynamic modulation mechanism is introduced to explicitly balance the anomaly detection results guided by the few-sample image and the detection results guided by the text prompt. For the usual additive fusion, this mechanism takes into account the different situations when detecting different industrial data samples, ensuring the stability and efficiency of the detection results.
[0032] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0034] Figure 1 It is a framework flow chart of the industrial anomaly detection method based on fine-grained text prompt feature engineering disclosed in the present invention;
[0035] Figure 2 is a structural diagram of a fine-grained text prompt engineering module disclosed in the present invention;
[0036] Figure 3 is a structural diagram of a cross-modal spatial domain multi-granularity interaction module disclosed in the present invention;
[0037] Figure 4 It is a structural diagram of the overall training model framework of the present disclosure;
[0038] Figure 5 It is an overall structural diagram of the test framework using the dynamic modulation mechanism disclosed in the present invention. DETAILED DESCRIPTION
[0039] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0040] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0041] In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0042] Embodiment 1
[0043] like Figure 1 As shown, the first embodiment of the present disclosure provides an industrial anomaly detection method based on fine-grained text prompt feature engineering, which mainly includes the following steps:
[0044] S1 extracts text features, image block features and image features of industrial images;
[0045] S2 uses image features to optimize and update text prompts to obtain fine-grained text prompt features;
[0046] S3 performs similarity comparison analysis on the image block features and the fine-grained text prompt features, and adds and fuses the abnormal result graphs generated by the comparison to obtain the final abnormality detection result;
[0047] S4 optimizes the parameters of the model to minimize the loss function and uses the trained model to perform anomaly detection on the test set.
[0048] Any existing labeled industrial images are given as the training set of this anomaly detection model. The training set contains normal and abnormal industrial product images, as well as their corresponding labeled images. In order to meet the scenario setting of few-sample anomaly detection, the industrial image categories in the test set can be completely inconsistent with those in the training set. The test set contains various abnormal images and normal images of the industrial images to be detected. Normal images are used to establish a multi-level feature memory library. First, these industrial images are Perform preprocessing operations, including represents the image dimension, Indicates the height of the image. Represents the width of the image. The following formula is used to convert the industrial image:
[0049]
[0050] in, It means that all industrial images are uniformly resolved to the same size of 518×518. Represents the size of the image area cropped from the center of the image. It represents the linear mapping of the image value range from [0, 255] to [0.0, 1.0], which becomes a tensor that can be input into the neural network. The training set is recorded as , the test set is denoted as Contains normal and abnormal images.
[0051] S1 extracts text features, image block features, and image features of industrial images.
[0052] The text feature extraction module and the image feature extraction module are mainly derived from the pre-trained CLIP text encoder and image encoder. The output of the text encoder is recorded as ,in Represents text feature dimensions:
[0053]
[0054] in, For the text prompt template, is a pre-trained text encoder.
[0055] In addition, after the image encoder, we extract the image block features output from the shallow layer to the deep layer in four stages. And a global image feature .in Represents the number of image blocks, Represents the feature dimension.
[0056]
[0057] in, It is a pre-trained image encoder. The pre-trained image encoder we use can extract 24 layers of features. We divide it into 4 stages, with 6 layers in each stage.
[0058] S2 uses image features to optimize and update text prompts to obtain fine-grained text prompt features.
[0059] The design of artificial prompt templates is divided into state-level prompts and template-level prompts. For the state level, it is divided into normal state and abnormal state. The normal state is:
[0060]
[0061] The normal state word [state] includes perfect, unblemished, etc.
[0062] Abnormal status:
[0063]
[0064] The abnormal state includes damaged, broken, etc.
[0065] For industrial template-level text prompts include:
[0066]
[0067] in, It indicates normal or abnormal status level.
[0068] like Figure 2 As shown in the figure, due to the limitations of the manually designed text prompt template in describing the normal / abnormal information of industrial images, the fine-grained text prompt engineering module mainly optimizes and updates the text prompts adaptively by capturing the image semantic feature information. The fine-grained text prompt engineering module consists of several linear layers. First, the image semantic information is captured:
[0069]
[0070] in, and represents the learnable parameters of the linear transformation of image features, represents the matrix multiplication operation, It refers to performing Softmax function on the captured image features. is the global image feature obtained by the pre-trained image encoder. Then the text feature obtained by the pre-trained text encoder To perform self-optimization learning, perform the following operations:
[0071]
[0072] in, Learnable parameters representing the linear transformation of text features. It means adding a Activation function. Finally, the results of the two are aligned in a certain dimension, and then weighted fusion operation is performed element by element to obtain the text prompt feature containing image semantic information. In addition, through the multimodal cross-attention fusion mechanism, the image features and text features are efficiently fused across modalities to obtain Finally, the two are dynamically fused to obtain fine-grained text prompt features :
[0073]
[0074]
[0075]
[0076] in, It is expressed as the dimension change and dimension expansion operation of the feature vector. is the linear transformation matrix, is the channel dimension, It is represented as an element-by-element multiplication operation. }and is the learning parameter weight in the feature learning process.
[0077] S3 performs similarity comparison analysis on the image block features and the fine-grained text prompt features, and adds and fuses the abnormal result graphs generated by the comparison to obtain the final abnormality detection result.
[0078] like Figure 3 As shown in the figure, the construction of the cross-modal spatial domain multi-granularity interaction module aims to transform the image block features obtained by the pre-trained image encoder into The fine-grained text features obtained from the pre-trained text encoder and the fine-grained text hint engineering module Mapping to the same spatial feature domain facilitates comparison and interaction. The cross-modal spatial domain multi-granularity interaction module is mainly composed of convolutions of different sizes:
[0079] ,
[0080] ,
[0081] The image feature block features of the four stages are mapped to the same feature space domain as the text features, where and It is an average pooling operation on the image block features in the x-dimension and the y-dimension. It is to fill the feature map. represents a convolution with a kernel size of 3×3. Represents a convolution with a convolution kernel size of 5×5. In order to obtain multi-level image semantic information, the image information of the four stages is efficiently fused:
[0082]
[0083] in, Represents the concatenation operation of tensors, It represents the use of 1×1 convolution to fuse the concatenated features. Finally, the mapped image block features are used to perform similarity comparison analysis with the fine-grained text prompt features. The main operations are as follows:
[0084]
[0085] in, It is represented by using bilinear interpolation to restore the points to the original input image resolution. The Softmax function is used for the interpolated result. Finally, the abnormal result graphs generated by the five stages are added and fused to obtain the final abnormal value result graph. .
[0086] The present disclosure also includes the construction of a multi-level feature memory library for a small number of sample images. The construction of a multi-level feature memory library for a small number of sample images is to obtain a normal sample image of the test category. The multi-level features of a small number of images are stored in the memory. Specifically, the pre-trained CLIP image encoder is used to extract the multi-level features of the few sample images in four stages and store them in the memory:
[0087]
[0088] in, It refers to randomly selecting a small number of normal images of the test category, the number of which is greater than or equal to 1. represents the pre-trained image encoder, In addition, to enhance the category diversity of a small number of image features, they are passed through a feature diversifier, which consists of the following operations:
[0089]
[0090] in, They represent five enhancement operations in feature enhancement: small angle rotation, translation, horizontal flipping, conversion to grayscale image, and random combination of the same category. The diversified features are stored in a multi-level feature memory library of few-sample images.
[0091] S4 optimizes the parameters of the model to minimize the loss function and uses the trained model to perform anomaly detection on the test set.
[0092] like Figure 4 As shown in the figure, the feature extraction module, fine-grained text prompt engineering module and cross-modal spatial domain multi-granularity interaction module are used to build the anomaly detection model framework, and the training data set is input into the built anomaly detection model for training. First, the multi-modal heterogeneous matching loss function is used Training optimization of fine-grained text prompt engineering module:
[0093]
[0094] in, are model parameters, is the regularization coefficient, represents the L2 norm, Represents a matrix multiplication operation. is the attention weight between text features and image features. It is a transformation matrix operation. The multimodal heterogeneous matching loss function is used to continuously integrate the image semantic information into fine-grained text prompts for adaptive optimization.
[0095] Secondly, the optimization of anomaly classification and anomaly location in industrial image anomaly detection tasks is to train the entire framework. A global loss function is used Continuously optimize anomaly detection performance:
[0096]
[0097] in, It represents the use of Focal Loss function to solve the sample imbalance problem in classification problems. It represents the Sørensen-Dice Loss function, which is an indicator used to measure the similarity between two sets. refers to the true label value corresponding to the training image, Represents the loss balance weight parameter. Finally, through the weighted combination of the multimodal heterogeneous ratio loss function and the global loss function, the entire method framework and the learning and training of each module are updated:
[0098]
[0099] in, is the multimodal heterogeneous matching loss function, is the global loss function, are the weight parameters of each loss function.
[0100] like Figure 5 As shown, during the test inference process, the test image After pre-training the image encoder and the cross-modal spatial domain multi-granularity interaction module, the image block features of five stages are obtained. and a global image feature . Fine-grained text hint features Generated by the pre-trained text encoder and fine-grained text prompt engineering module. For the text-guided anomaly classification detection result branch, it is obtained by the following formula:
[0101]
[0102] in, It represents the maximum value in the abnormal score map. The probability corresponding to the abnormality is used as the abnormality score of the image. By setting a certain threshold range, the task of detecting whether the image is normal or abnormal can be completed.
[0103] For the text-guided anomaly segmentation detection result branch, it is obtained by the following formula:
[0104]
[0105] For the few-sample image guided anomaly detection branch, the classification and segmentation results are obtained by comparing the features stored in the constructed few-sample image multi-level feature memory library step by step, which is mainly obtained by the following operation:
[0106]
[0107]
[0108] in, To take the minimum value of the image anomaly score. and Figure 5 In the box, © indicates consistency. To calculate the similarity between the two, the calculation formula is as follows:
[0109]
[0110] in, and represents a set of image vectors, is the local weight of the image feature, is the dot product of the vectors, is the Euclidean norm of the vector. In order to comprehensively consider the different degrees of influence of the two branches, a dynamic modulation mechanism is introduced to explicitly balance the anomaly detection results guided by the few-sample image and the detection results guided by the text prompt. It is mainly obtained by the following formula:
[0111]
[0112]
[0113] in, is the dynamically modulated parameter weight. For the usual additive fusion, this mechanism takes into account the different situations when detecting different industrial data samples, ensuring the stability and efficiency of the detection results.
[0114] Embodiment 2
[0115] Embodiment 2 of the present disclosure provides an industrial anomaly detection system based on fine-grained text prompt feature engineering, including:
[0116] The feature extraction module is configured to: extract text features, image block features and image features of the industrial image;
[0117] The fine-grained text prompt engineering module is configured to: optimize and update the text prompt using the image features to obtain the fine-grained text prompt features;
[0118] The cross-modal spatial domain multi-granularity interaction module is configured to: perform similarity comparison analysis on the image block features and the fine-grained text prompt features, and add and fuse the abnormal result graphs generated by the comparison to obtain the final abnormality detection result;
[0119] The detection module is configured to: optimize the parameters of the model to minimize the loss function and use the trained model to perform anomaly detection on the test set.
[0120] The more detailed steps are the same as those in the first embodiment and will not be repeated here.
[0121] Embodiment 3
[0122] Embodiment 3 of the present disclosure provides a medium on which a program is stored. When the program is executed by a processor, the steps of an industrial anomaly detection method based on fine-grained text prompt feature engineering as described in Embodiment 1 of the present disclosure are implemented.
[0123] The more detailed steps are the same as those in the first embodiment and will not be repeated here.
[0124] Embodiment 4
[0125] Embodiment 4 of the present disclosure provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of an industrial anomaly detection method based on fine-grained text prompt feature engineering as described in Embodiment 1 of the present disclosure are implemented.
[0126] The more detailed steps are the same as those in the first embodiment and will not be repeated here.
[0127] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An industrial anomaly detection method based on fine-grained textual hint feature engineering, characterized in that: The following steps are involved: Extract text features, image block features and image features of industrial images; The text prompts are optimized and updated using image features to obtain fine-grained text prompt features, specifically: Perform linear transformation on text features and image features, perform element-by-element weighted fusion operation on the results of the two to obtain a first text prompt feature, perform cross-modal efficient fusion of image features and text features to obtain a second text prompt feature, and dynamically fuse the first text prompt feature and the second text prompt feature to obtain a fine-grained text prompt feature; Perform similarity comparison analysis on the image block features and the fine-grained text prompt features, and add and fuse the abnormal result graphs generated by the comparison to obtain the final abnormality detection result; Optimize the model parameters to minimize the loss function, and use the trained model to perform anomaly detection on the test set; Use multimodal heterogeneous matching loss function Optimizing training for fine-grained textual cues: in, are model parameters, is the regularization coefficient, represents the L2 norm, represents the matrix multiplication operation, is the attention weight between text features and image features, is the transformation matrix operation, is a global image feature. It is a fine-grained text hint feature; Adopt a global loss function Optimize anomaly detection performance: in, Indicates the use of Focal Loss loss function, represents the Sørensen-Dice Loss function, refers to the true label value corresponding to the training image, represents the loss balance weight parameter, is the outlier result graph; Through the weighted combination of multimodal heterogeneous ratio loss function and global loss function, the entire method framework and the learning and training of each module are updated: in, is the multimodal heterogeneous matching loss function, is the global loss function, are the weight parameters of each loss function.
2. The industrial anomaly detection method based on fine-grained text prompt feature engineering as described in claim 1, characterized in that: The image block features include image block features output from four stages from shallow to deep layers, and the image features are global image features.
3. The industrial anomaly detection method based on fine-grained text prompt feature engineering as described in claim 2, characterized in that: Before performing similarity comparison analysis between image block features and fine-grained text prompt features, the four-stage image block features and fine-grained text prompt features need to be mapped into the same spatial feature domain.
4. The industrial anomaly detection method based on fine-grained textual prompt feature engineering as described in claim 3, characterized in that: In order to obtain multi-level image semantic information, the image information of the four stages is efficiently fused to obtain the image block features of the fifth stage. The image block features mapped from the five stages are then compared and analyzed for similarity with the fine-grained text prompt features.
5. The industrial anomaly detection method based on fine-grained text prompt feature engineering as described in claim 1, characterized in that: A dynamic modulation mechanism is introduced to balance the anomaly detection results guided by few-sample images and the detection results guided by text prompts.
6. Industrial anomaly detection system based on fine-grained textual prompt feature engineering, characterized by: include: The feature extraction module is configured to: extract text features, image block features and image features of the industrial image; The fine-grained text prompt engineering module is configured to optimize and update the text prompt using image features to obtain fine-grained text prompt features, specifically: Perform linear transformation on text features and image features, perform element-by-element weighted fusion operation on the results of the two to obtain a first text prompt feature, perform cross-modal efficient fusion of image features and text features to obtain a second text prompt feature, and dynamically fuse the first text prompt feature and the second text prompt feature to obtain a fine-grained text prompt feature; The cross-modal spatial domain multi-granularity interaction module is configured to: perform similarity comparison analysis on the image block features and the fine-grained text prompt features, and add and fuse the abnormal result graphs generated by the comparison to obtain the final abnormality detection result; The detection module is configured to: optimize the parameters of the model to minimize the loss function and use the trained model to perform anomaly detection on the test set; Use multimodal heterogeneous matching loss function Optimizing training for fine-grained textual cues: in, are model parameters, is the regularization coefficient, represents the L2 norm, represents the matrix multiplication operation, is the attention weight between text features and image features, is the transformation matrix operation, is a global image feature. It is a fine-grained text hint feature; Adopt a global loss function Optimize anomaly detection performance: in, Indicates the use of Focal Loss loss function, represents the Sørensen-Dice Loss function, refers to the true label value corresponding to the training image, represents the loss balance weight parameter, is the outlier result graph; Through the weighted combination of multimodal heterogeneous ratio loss function and global loss function, the entire method framework and the learning and training of each module are updated: in, is the multimodal heterogeneous matching loss function, is the global loss function, are the weight parameters of each loss function.
7. A medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the industrial anomaly detection method based on fine-grained text prompt feature engineering as described in any one of claims 1 to 5 are implemented.
8. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the industrial anomaly detection method based on fine-grained text prompt feature engineering as described in any one of claims 1 to 5 are implemented.
