Semiconductor chip anomaly detection method and medium based on multimodal feature matching
Through multi-modal feature matching and multi-task learning strategies, multi-scene data is used to train anomaly detection models, and image and text features are combined to achieve fast, effective and high generalization capabilities for semiconductor chip anomaly detection, solving the performance problems in existing technologies. Insufficiencies and difficulties in implementation.
Patent Information
- Application Number
- CN202410587949.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-13
AI Technical Summary
Existing semiconductor chip anomaly detection algorithms are difficult to achieve rapid and effective detection in an environment with fast product iterations, many types of models, and complex backgrounds. They also rely on a large number of labeled samples or good product data, resulting in insufficient performance and difficulty in practical applications. .
A method based on multi-modal feature matching is adopted, using annotated multi-scenario chip anomaly detection data as source domain data, by generating description annotations and image segmentation annotations, combining image features and text features, training anomaly detection models, and optimizing model parameters to Improve generalization capabilities and perform transfer training in target domain data to achieve rapid detection under zero-sample conditions.
It improves the accuracy and generalization of the semiconductor chip anomaly detection algorithm, reduces the dependence on target scene data, realizes fast, effective, and highly generalized anomaly detection tasks, and solves the problem of insufficient performance and difficulty in implementation in the existing technology. problem.
Smart Images

Figure CN118230009B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of semiconductor chip anomaly detection, and in particular to a semiconductor chip anomaly detection method and medium based on multi-modal feature matching. Background Art
[0002] In the existing technology, anomaly detection algorithms usually focus on designing customized models for each industrial quality inspection task. These models rely on a large amount of image data of target scenes, and their model accuracy is often limited by the amount of target scene data. Especially in the task of anomaly detection of semiconductor chips with fast product iteration, many models and complex background, the application speed and effect of existing algorithms are often not fully guaranteed.
[0003] At present, mainstream anomaly detection algorithms are mainly divided into two categories: supervised and unsupervised methods. Supervised methods generally use classification models based on convolutional neural networks, which require a large amount of labeled sample data for training in order to learn good feature representations and decision boundaries to distinguish abnormal data. However, in actual industrial detection scenarios, facing the imbalance and scarcity of abnormal data, it is relatively difficult to obtain a large number of manually labeled samples, so there are great limitations.
[0004] Existing unsupervised and self-supervised anomaly detection algorithms are usually based on hundreds to thousands of good product data. By designing auxiliary tasks including data enhancement and adding pseudo-noise, deep learning models are used to mine the data's own representational characteristics to distinguish abnormal data. Compared with supervised methods, this type of method reduces the demand for abnormal products, but still relies on a certain amount of good product data. In addition, due to the uncertainty and irregularity of abnormal data, the design of its auxiliary tasks is complex, and the generalization ability is insufficient when facing different target scenarios. Summary of the invention
[0005] In order to achieve the above-mentioned purpose and other advantages of the present invention, the first object of the present invention is to provide a semiconductor chip abnormality detection method based on multimodal feature matching, comprising the following steps:
[0006] Using the annotated multi-scenario chip anomaly detection data as source domain data for model training; wherein the multi-scenario chip anomaly detection data includes multi-scenario chip anomaly detection images and corresponding segmentation annotations;
[0007] Use unlabeled specific scene images as target domain data for model application;
[0008] Generating corresponding description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data;
[0009] Extract image features through anomaly detection models;
[0010] Calculating a loss function through the description annotation, the image segmentation annotation and the extracted features;
[0011] Using the source domain data to train an anomaly detection model, and optimizing model parameters according to the loss function until convergence;
[0012] The trained anomaly detection model is used to predict the category and abnormal area of the target domain data.
[0013] Furthermore, generating corresponding description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data includes the following steps:
[0014] A text generation template is used to generate corresponding text description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data.
[0015] Furthermore, the step of using the text generation template to generate corresponding text description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data includes the following steps:
[0016] Judging whether there is an abnormality in the training image according to the segmentation and annotation of the source domain data;
[0017] If there are no anomalies in the training image, a good product text description is generated;
[0018] If there are anomalies in the training image, a text description of the anomaly is generated based on the number and location of the anomaly. The image is divided into multiple grids and the location is determined based on the area where the defect center point is located.
[0019] Furthermore, the anomaly detection model includes an image feature extractor, a text feature extractor, a mask encoder and a text prediction model.
[0020] Furthermore, the extracting of image features by an anomaly detection model comprises the following steps:
[0021] Extracting global features of the image and fine-grained features of different regions in the image by the image feature extractor;
[0022] A text description is generated for the image using the chip model, the status word, and the image description word, and the text feature extractor is used to extract text features from the generated text description.
[0023] Furthermore, the calculation of the loss function through the description annotation, the image segmentation annotation and the extracted features comprises the following steps:
[0024] Matching the fine-grained features with the text features, calculating cosine similarity, and mapping to obtain pixel anomaly probability;
[0025] Obtaining image segmentation loss through the image segmentation annotation and the pixel abnormality probability calculation;
[0026] Inputting the pixel abnormality probability into the mask encoder as an abnormality position prompt;
[0027] The abnormal position prompt and the global feature of the image are fused and input into the text prediction model to obtain the predicted text;
[0028] Calculate cross entropy text loss through the text description annotation and the predicted text;
[0029] The weighted sum of the cross entropy text loss and the image segmentation loss is calculated to obtain the final loss.
[0030] Furthermore, matching the fine-grained features with the text features, calculating the cosine similarity, and mapping to obtain pixel anomaly probabilities comprises the following steps:
[0031] The image feature extractor is equally divided into a plurality of feature levels to obtain image features at different levels;
[0032] Using the normalized exponential function as a classifier, the cosine similarity between the fine-grained feature and the text feature is mapped to the pixel anomaly probability, and the calculation formula is as follows:
[0033] ;
[0034] in, Represents text features, Represents fine-grained features, Represents the region index corresponding to the fine-grained feature;
[0035] After the pixel anomaly probabilities of multiple feature layers are upsampled to the original image size through the nearest neighbor, the anomaly probability of each pixel in the input image is added together.
[0036] Furthermore, the image segmentation loss is a combination of the Dice loss function and the Focal loss function, and the formula is as follows:
[0037] ;
[0038] in, is the balance coefficient, n represents the number of pixels, represents the probability that the model predicts that the i-th pixel is abnormal, represents the true value of the pixel in the label, It is an adjustable parameter used to reduce the weight of easy-to-classify samples.
[0039] Furthermore, the calculation formula of the cross entropy text loss is:
[0040] ;
[0041] in, For predictive text, Describe the annotation for the text.
[0042] Further, optimizing the model parameters according to the loss function until convergence comprises the following steps:
[0043] According to the loss function, the model parameters are optimized until convergence through the back propagation algorithm and the stochastic gradient descent algorithm.
[0044] Furthermore, before using the trained anomaly detection model to predict the category and abnormal area of the target domain data, the following steps are also included:
[0045] Use target domain annotated data to transfer training of anomaly detection models;
[0046] During the reasoning process, the corresponding binary text description is generated according to the target scene.
[0047] Furthermore, the use of target domain labeled data to perform migration training on the anomaly detection model includes the following steps:
[0048] The target domain data is used as training data, the parameters of the image feature extractor and the text feature extractor of the anomaly detection model are frozen, and the above training method is used to perform secondary training on the model trained in the source domain.
[0049] A second object of the present invention is to provide a computer-readable storage medium having program instructions stored thereon, which, when executed, implement a semiconductor chip anomaly detection method based on multimodal feature matching.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] In the field of semiconductor chip image anomaly detection, the accuracy and generalization of the anomaly detection algorithm are key factors that determine whether the algorithm can succeed quickly and effectively in practical applications. In the prior art, anomaly detection algorithms generally rely on a large amount of good or abnormal data. When the application scenario data is difficult to obtain, there are problems of insufficient performance and difficulty in implementation. In order to improve the general ability of the algorithm and improve the implementation speed and effect, the present invention provides a semiconductor chip image anomaly detection method based on multimodal feature matching, which trains an anomaly detection model that is universal for multiple scenarios through existing large-scale anomaly detection data, designs a multi-task learning strategy that combines language with images to improve the general ability of the model, and makes full use of data image features and text features to improve the generalization ability of the model, thereby achieving fast, effective, and highly generalized anomaly detection tasks under zero-sample conditions.
[0052] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. The specific implementation of the present invention is given in detail by the following embodiments and their accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0054] Figure 1 This is a flow chart of a semiconductor chip anomaly detection method based on multimodal feature matching according to Example 1;
[0055] Figure 2 Generate a flow chart for text description annotation and image segmentation annotation of Example 1;
[0056] Figure 3 This is a flow chart of extracting image features through an anomaly detection model in Example 1;
[0057] Figure 4 The loss function calculation flow chart of Example 1;
[0058] Figure 5 This is a flowchart of pixel abnormality probability calculation in Example 1;
[0059] Figure 6 This is a flow chart of model transfer training in Example 1;
[0060] Figure 7 Schematic diagram of source domain and target domain images;
[0061] Figure 8 Generate schematic diagrams for abnormal text;
[0062] Fig. 9 Generate a flow chart for exception text;
[0063] Fig.10 Flowchart for text feature extraction;
[0064] Fig.11 is a schematic diagram of an electronic device of Example 2;
[0065] Fig.12 This is a schematic diagram of the storage medium of Example 3. DETAILED DESCRIPTION
[0066] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment. Example 1
[0067] A semiconductor chip anomaly detection method based on multimodal feature matching, such as Figure 1 As shown, the following steps are included:
[0068] S1. Use large-scale annotated multi-scenario chip anomaly detection data as source domain data for model training; wherein the multi-scenario chip anomaly detection data includes multi-scenario chip anomaly detection images and corresponding segmentation annotations; for example, chip defect images of different processes and models and the segmentation annotations corresponding to each image, such as Figure 7 shown.
[0069] S2. Use unlabeled specific scene images as target domain data for model application; for example, images of chips of specific models to be tested, such as Figure 7 shown.
[0070] S3, generating corresponding description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data;
[0071] In some embodiments, generating corresponding description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data includes the following steps:
[0072] Use the text generation template to generate corresponding text description annotations and image segmentation annotations for each training image based on the segmentation annotations of the source domain data. Figure 2 As shown, the specific steps include:
[0073] S31. Judging whether there is an abnormality in the training image according to the segmentation and annotation of the source domain data;
[0074] S32. If there are no anomalies in the training image, generate a good product text description; for example, “No, there are no anomalies in the image.”.
[0075] S33. If there are anomalies in the training image, generate an abnormal text description based on the number and location of the anomalies, and divide the image into multiple grids, for example, Figure 8As shown, divide the image into 3×3 grids, namely Top Left, Top, Top Right, Left, Center, Right, Bottom Left, Bottom, Bottom Right, and determine the location based on the area where the defect center is located. For example: "Yes, there is an anomaly, at the center of the image.".
[0076] S4, extracting image features through anomaly detection model;
[0077] In some embodiments, the anomaly detection model includes an image feature extractor, a text feature extractor, a mask encoder, and a text prediction model. For example, a Vision Transformer model is used as an image feature extractor, a Transformer model is used as a text feature extractor, and a Panda GPT model is used as a text prediction model.
[0078] like Figure 3 As shown, extracting image features through anomaly detection model includes the following steps:
[0079] S41, extracting global features of the image and fine-grained features of different regions in the image through an image feature extractor;
[0080] The above-mentioned Vision Transformer model is used to extract image features, which can retain the spatial location information of the features; the input image is divided into 14×14 blocks of different areas according to length and width, and the local fine-grained features corresponding to the above-mentioned different areas are obtained through the above-mentioned feature extractor.
[0081] like Fig.10 As shown, S42, a text description is generated for the image using the chip model, the status word, and the image description word, and a text feature extractor is used to extract text features corresponding to the image from the generated text description. Specifically, the above-mentioned Transformer model is used to extract text features.
[0082] S5, calculating the loss function by describing the annotation, the image segmentation annotation and the extracted features;
[0083] In some embodiments, Figure 4 As shown, the loss function is calculated by describing the annotation, image segmentation annotation, and extracted features, including the following steps:
[0084] S51, matching the fine-grained features with the text features, calculating the cosine similarity, and mapping to obtain the pixel anomaly probability; Figure 5 As shown, the specific steps include:
[0085] S511, dividing the image feature extractor into multiple feature levels to obtain image features at different levels; for example, dividing the image feature extractor into four levels to obtain image features at different levels.
[0086] S512, using the normalized exponential function (Softmax) as a classifier, the cosine similarity between the fine-grained features and the text features is mapped to the pixel abnormality probability, and the calculation formula is as follows:
[0087] ;
[0088] in, Represents text features, Represents fine-grained features, Represents the region index corresponding to the fine-grained feature;
[0089] S513 , after upsampling the pixel abnormality probabilities of multiple feature layers to the original image size through the nearest neighbor, the abnormality probability of each pixel of the input image is obtained by adding them up.
[0090] S52, the image segmentation loss is obtained by image segmentation annotation and pixel abnormality probability calculation; specifically, the image segmentation loss is a combination loss function of the Dice loss function and the Focal loss function, and the formula is as follows:
[0091] ;
[0092] in, is the balance coefficient, for example Set to 1, n=W×H represents the number of pixels, represents the probability that the model predicts that the i-th pixel is abnormal, represents the true value of the pixel in the label, It is an adjustable parameter used to reduce the weight of easy-to-classify samples.
[0093] S53, inputting the pixel abnormality probability into the mask encoder as an abnormality position prompt;
[0094] S54, the abnormal position prompt and the image global feature are fused and input into the text prediction model to obtain the predicted text; wherein the image global feature refers to Fig. 9 The last layer of features output by the Image Feature Extractor is mapped through the fully connected layer; the Panda GPT model weights are frozen during training and are only used to obtain text prediction results.
[0095] S55. Calculate the cross entropy text loss through the text description annotation and the predicted text; wherein the calculation formula of the cross entropy text loss is:
[0096] ;
[0097] in, For predictive text, Describe the annotation for the text.
[0098] S56. Calculate the weighted sum of the cross entropy text loss and the image segmentation loss to obtain the final loss.
[0099] S6. Use the source domain data to train the anomaly detection model, and optimize the model parameters according to the loss function until convergence;
[0100] In some embodiments, optimizing the model parameters according to the loss function until convergence comprises the following steps:
[0101] According to the loss function, the model parameters are optimized until convergence through the back propagation algorithm and the stochastic gradient descent algorithm. Specifically, the prediction loss of the model is obtained through the loss function, so as to calculate the gradient value of the model parameters, and the parameters are updated through stochastic gradient descent optimization.
[0102] S7. Use the trained anomaly detection model to predict the category and abnormal area of the target domain data.
[0103] In some embodiments, Figure 6 As shown, before using the trained anomaly detection model to predict the category and anomaly area of the target domain data, the following steps are also included:
[0104] S8. Use the target domain labeled data to perform migration training on the anomaly detection model; specifically, the following steps are included:
[0105] Use the target domain data as training data, freeze the parameters of the image feature extractor and text feature extractor of the anomaly detection model, and use the above training method to perform secondary training on the model trained in the source domain. The target domain annotation data also includes the above text description annotation and image segmentation annotation. For specific generation steps, see step S3 and steps S31 to S33.
[0106] S9. During the reasoning process, a corresponding binary text description is generated according to the target scene. The text description is also generated using the above-mentioned text feature extractor. For specific generation steps, see step S42 and Fig.10 . Then use the trained model to predict the category and abnormal area of the target domain image.
[0107] The semiconductor chip anomaly detection method based on multimodal feature matching provided in this embodiment has the following beneficial effects:
[0108] Compared with the existing technology that only relies on the image features of the target scene, this method uses semiconductor chip image data in multiple scenes, and trains the end-to-end anomaly detection model through the language model text loss and the image model segmentation loss, helping the model to learn deep semantic representations to improve the robustness and generalization of the model, reduce the data dependence on the target scene, and achieve zero-sample detection of the target scene.
[0109] This method uses a multi-level feature fusion network to combine the image features and text features of the data to enhance the model's ability to represent global features and fine-grained features, thereby improving the accuracy and versatility of the algorithm.
[0110] Different from the existing technology that requires setting an outlier threshold, this method learns and predicts the abnormal description of the image through a language model, thereby directly predicting whether the image is an abnormal image.
[0111] In the field of semiconductor chip image anomaly detection, the accuracy and generalization of anomaly detection algorithms are key factors that determine whether the algorithms can succeed quickly and effectively in practical applications. In the prior art, anomaly detection algorithms generally rely on a large amount of good or abnormal data. When application scenario data is difficult to obtain, there are problems of insufficient performance and difficulty in implementation. In order to improve the general ability of the algorithm and increase the speed and effect of implementation; the present invention provides a semiconductor chip image anomaly detection method based on multimodal feature matching, which trains an anomaly detection model that is universal for multiple scenarios through existing large-scale anomaly detection data, designs a multi-task learning strategy that combines language with images to improve the general ability of the model, and makes full use of data image features and text features to improve the generalization ability of the model, thereby achieving fast, effective, and highly generalized anomaly detection tasks under zero-sample conditions. Example 2
[0112] An electronic device, such as Fig.11 As shown, it includes: a memory on which program code is stored; a processor connected to the memory, and when the program code is executed by the processor, a semiconductor chip anomaly detection method based on multimodal feature matching is implemented. For a detailed description of the method, reference can be made to the corresponding description in the above method embodiment, which will not be repeated here. Example 3
[0113] A computer readable storage medium such as Fig.12 As shown, program instructions are stored thereon, and when the program instructions are executed, a semiconductor chip abnormality detection method based on multimodal feature matching is implemented. For a detailed description of the method, reference may be made to the corresponding description in the above method embodiment, and no further description is given here.
[0114] The number of devices and processing scales described here are used to simplify the description of the present invention. Applications, modifications and variations of the present invention will be obvious to those skilled in the art.
[0115] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
[0116] The apparatus, electronic device, non-volatile computer storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, electronic device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, electronic device and non-volatile computer storage medium will not be repeated here.
[0117] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software units for implementing the method and structures within the hardware component.
[0118] The systems, devices or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions in various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or more software and / or hardware.
[0119] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0120] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0124] The specification may be described in the general context of computer-executable instructions executed by a computer, such as program units. Generally, program units include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program units may be located in local and remote computer storage media, including storage devices.
[0125] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0126] The above description is only an embodiment of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of one or more embodiments of this specification.
Claims
1. A semiconductor chip anomaly detection method based on multimodal feature matching, characterized in that: The following steps are involved: Using the annotated multi-scenario chip anomaly detection data as source domain data for model training; wherein the multi-scenario chip anomaly detection data includes multi-scenario chip anomaly detection images and corresponding segmentation annotations; Use unlabeled specific scene images as target domain data for model application; Generating corresponding text description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data; Extracting image features through an anomaly detection model; wherein the anomaly detection model includes an image feature extractor, a text feature extractor, a mask encoder and a text prediction model; Calculating a loss function through the text description annotation, the image segmentation annotation and the extracted features; Using the source domain data to train an anomaly detection model, and optimizing model parameters according to the loss function until convergence; Use the trained anomaly detection model to predict the category and abnormal area of the target domain data; Generating corresponding text description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data comprises the following steps: Using a text generation template to generate corresponding text description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data; The extracting of image features by an anomaly detection model comprises the following steps: Extracting global features of the image and fine-grained features of different regions in the image by the image feature extractor; Generate a text description for the image using the chip model, status word, and image description word, and extract text features from the generated text description using the text feature extractor; The loss function is calculated by the text description annotation, the image segmentation annotation and the extracted features, comprising the following steps: Matching the fine-grained features with the text features, calculating cosine similarity, and mapping to obtain pixel anomaly probability; Obtaining image segmentation loss through the image segmentation annotation and the pixel abnormality probability calculation; Inputting the pixel abnormality probability into the mask encoder as an abnormality position prompt; The abnormal position prompt and the global feature of the image are fused and input into the text prediction model to obtain the predicted text; Calculate cross entropy text loss through the text description annotation and the predicted text; The weighted sum of the cross entropy text loss and the image segmentation loss is calculated to obtain the final loss.
2. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 1, characterized in that: The step of using the text generation template to generate corresponding text description annotations and image segmentation annotations for each training image according to the segmentation annotations of the source domain data comprises the following steps: Judging whether there is an abnormality in the training image according to the segmentation and annotation of the source domain data; If there are no anomalies in the training image, a good product text description is generated; If there are anomalies in the training image, a text description of the anomaly is generated based on the number and location of the anomaly. The image is divided into multiple grids and the location is determined based on the area where the defect center point is located.
3. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 1, characterized in that: The matching of the fine-grained features with the text features, calculating the cosine similarity, and mapping to obtain pixel anomaly probability comprises the following steps: The image feature extractor is equally divided into a plurality of feature levels to obtain image features at different levels; Using the normalized exponential function as a classifier, the cosine similarity between the fine-grained feature and the text feature is mapped to the pixel anomaly probability, and the calculation formula is as follows: , in, Represents text features, Represents fine-grained features, Indicates that the pixel category is abnormal; After the pixel anomaly probabilities of multiple feature layers are upsampled to the original image size through the nearest neighbor, the anomaly probability of each pixel in the input image is added together.
4. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 1, characterized in that: The image segmentation loss is a combination of the Dice loss function and the Focal loss function, and the formula is as follows: , , , in, is the balance coefficient, n represents the number of pixels, represents the probability that the model predicts that the i-th pixel is abnormal, represents the true value of the pixel in the label, It is an adjustable parameter used to reduce the weight of easy-to-classify samples.
5. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 1, characterized in that: The calculation formula of the cross entropy text loss is: , in, For predictive text, Describe the annotation for the text.
6. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 1, characterized in that: Optimizing the model parameters according to the loss function until convergence comprises the following steps: According to the loss function, the model parameters are optimized until convergence through the back propagation algorithm and the stochastic gradient descent algorithm.
7. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 1, characterized in that: Before using the trained anomaly detection model to predict the category and anomaly area of the target domain data, the following steps are also included: Use target domain annotated data to transfer training of anomaly detection models; During the reasoning process, the corresponding binary text description is generated according to the target scene.
8. The semiconductor chip anomaly detection method based on multimodal feature matching according to claim 7, characterized in that: The transfer training of the anomaly detection model using the target domain labeled data includes the following steps: The target domain data is used as training data, and the parameters of the image feature extractor and the text feature extractor of the anomaly detection model are frozen. The model trained in the source domain is trained again through the step of using the labeled multi-scenario chip anomaly detection data as the source domain data for model training to the step of using the source domain data to train the anomaly detection model, and the model parameters are optimized according to the loss function to convergence.
9. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed, the method according to any one of claims 1 to 8 is implemented.
