Wafer defect detection method and device, electronic equipment and storage medium
By calculating the similarity between the image to be tested and the text of preset defect description using the trained defect detection model, the problem of difficulty in obtaining new defect labeling samples is solved in the traditional detection system, and efficient and accurate wafer defect classification is achieved.
Patent Information
- Application Number
- CN202411593369.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional wafer defect detection systems require a large amount of labeled sample data for training, which makes the process of obtaining labeled samples in the face of new defects time-consuming and costly.
By acquiring the image of the wafer to be tested and multiple sets of preset defect description texts, using the trained defect detection model, the similarity between the image to be tested and the preset defect description text is calculated, and the preset defect description text with the highest similarity is determined as the target defect description text.
In the absence of new defect labeling samples, the wafer images with new defects can be effectively classified, the efficiency and accuracy of defect detection can be improved, and the refined classification of wafer defects can be achieved.
Smart Images

Figure CN119540618A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wafer detection, and in particular, to a wafer defect detection method, device, electronic equipment, storage medium and computer program product. Background Art
[0002] In the semiconductor manufacturing process, defect detection for wafers is a crucial link. With the advancement of technology, automated and intelligent defect detection systems have been widely used. However, traditional defect detection systems usually rely on well-trained machine learning models, which require a large amount of labeled sample data for training. When faced with new types of defects on wafers, obtaining labeled samples for new defects is a time-consuming and costly process. Summary of the invention
[0003] The present invention is proposed in view of the above problems. Embodiments of the present invention provide a wafer defect detection method, device, electronic device, storage medium and computer program product. This solution can effectively classify wafer images with new defects when there are no labeled samples of new defects of the wafer, and the efficiency and accuracy of defect detection are high.
[0004] According to one aspect of the present invention, a wafer defect detection method is provided. The method includes: obtaining an image to be tested and multiple sets of preset defect description texts obtained by performing image acquisition on the wafer to be tested; inputting multiple sets of input data corresponding to the multiple sets of preset defect description texts into a trained defect detection model to determine the similarity between the image to be tested and each set of preset defect description texts in the multiple sets of preset defect description texts, each set of input data in the multiple sets of input data includes the corresponding preset defect description text and the image to be tested; determining the preset defect description text with the highest similarity to the image to be tested as the target defect description text of the image to be tested; wherein the defect detection model includes a text feature extraction module, an image feature extraction module, and a target defect description text of the image to be tested. Like a feature extraction module and a similarity calculation module, the text feature extraction module is used to extract the text features of the input preset defect description text, the image feature extraction module is used to extract the image features to be tested of the image to be tested, the image features to be tested include feature values under the preset attention channel, the feature values under the preset attention channel are used to indicate the attention level of each area of the image to be tested, the similarity calculation module is used to calculate the similarity between the text features of the input preset defect description text and the image features to be tested, and the similarity between the preset defect description text and the image to be tested is the similarity between the text features of the preset defect description text and the image features to be tested.
[0005] Optionally, the preset attention channel includes one or more of the following: a transparency channel, a spectral information channel, and a morphology information channel.
[0006] Optionally, the training process of the defect detection model is as follows: inputting positive sample data and / or negative sample data into the defect detection model to obtain positive sample similarity corresponding to the positive sample data and / or negative sample similarity corresponding to the negative sample data, wherein the positive sample data includes a sample image and a preset defect description text in multiple groups of preset defect description texts that matches the sample image, and the negative sample data includes a sample image and a preset defect description text in multiple groups of preset defect description texts that does not match the sample image, the positive sample similarity is the similarity between the sample image in the positive sample data and the preset defect description text, and the negative sample similarity is the similarity between the sample image in the negative sample data and the preset defect description text; inputting the positive sample similarity and / or the negative sample similarity into the contrast loss function to calculate the loss value of the defect detection model, and optimizing the defect detection model based on the loss value until the preset requirements are met.
[0007] Optionally, before inputting multiple groups of input data corresponding one by one to multiple groups of preset defect description texts into the trained defect detection model to determine the similarity between the image to be tested and each group of preset defect description texts in the multiple groups of preset defect description texts, the method also includes: preprocessing the image to be tested, the preprocessing including one or more of noise removal, image enhancement and size normalization.
[0008] Optionally, the similarity calculation module calculates the similarity between the text features of the input preset defect description text and the image features to be tested in the following manner: normalizing the text features of the preset defect description text and the image features to be tested respectively to obtain normalized text features and normalized image features; calculating the cosine distance between the normalized text features and the normalized image features to obtain the similarity between the text features of the preset defect description text and the image features to be tested.
[0009] According to another aspect of the present invention, a wafer defect detection device is also provided, including: an acquisition module, used to acquire an image to be tested and multiple groups of preset defect description texts obtained by performing image acquisition on the wafer to be tested; an input module, used to input multiple groups of input data corresponding to the multiple groups of preset defect description texts into a trained defect detection model respectively, so as to determine the similarity between the image to be tested and each group of preset defect description texts in the multiple groups of preset defect description texts, each group of input data in the multiple groups of input data includes the corresponding preset defect description text and the image to be tested; a determination module, used to determine the preset defect description text with the highest similarity to the image to be tested as the target defect description text of the image to be tested ; Wherein, the defect detection model includes a text feature extraction module, an image feature extraction module and a similarity calculation module, the text feature extraction module is used to extract the text features of the input preset defect description text, the image feature extraction module is used to extract the image features to be tested of the image to be tested, the image features to be tested include feature values under the preset attention channel, the feature values under the preset attention channel are used to indicate the attention of each area of the image to be tested, the similarity calculation module is used to calculate the similarity between the text features of the input preset defect description text and the image features to be tested, and the similarity between the preset defect description text and the image to be tested is the similarity between the text features of the preset defect description text and the image features to be tested.
[0010] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used to execute the above-mentioned wafer defect detection method when the processor is running.
[0011] According to yet another aspect of the present invention, a storage medium is provided, on which program instructions are stored, and the program instructions are used to execute the above-mentioned wafer defect detection method when running.
[0012] According to yet another aspect of the present invention, a computer program product is provided, comprising computer program instructions, which are used to execute the wafer defect detection method as described above when the computer program instructions are run.
[0013] The above technical solution can realize one-to-one matching of the image to be tested with the known preset defect description texts by respectively combining multiple groups of preset defect description texts with the image to be tested as input data and inputting them into the trained defect detection model, and then determine the preset defect description text with the highest degree of matching as the target defect description text used to describe the defects in the image to be tested, and determine at least part of the defects contained in the corresponding wafer to be tested. This technical solution can still classify the defects of wafers containing unknown new defects in the absence of annotated samples of new defects, and generate corresponding text descriptions, which is conducive to improving the defect detection efficiency of the wafer, and can realize the refined classification of wafer defects, so that the defect classification results obtained are more accurate. On the other hand, by additionally extracting the eigenvalues of the image to be tested under the preset attention channel, the information of the target area that needs to be paid attention to in the image to be tested can be integrated into the prediction process of the defect detection model, so that the defect detection model can use this information to predict the similarity between the image to be tested and the preset defect text, which is conducive to improving the matching accuracy between the image to be tested and the preset defect text.
[0014] 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, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0016] Figure 1 A schematic flow chart of a wafer defect detection method according to an embodiment of the present invention is shown;
[0017] Figure 2 A schematic block diagram of a wafer defect detection device according to an embodiment of the present invention is shown;
[0018] Figure 3 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.
[0020] As mentioned above, in the related art, it is difficult and costly to obtain labeled samples for new defect types of wafers. In order to at least partially solve the above technical problems, an embodiment of the present invention provides a wafer defect detection method, device, electronic device, storage medium and computer program product. This solution can effectively classify wafer images with new defects when there are no labeled samples of new defects of the wafer, and the efficiency and accuracy of defect detection are high.
[0021] See also Figure 1 As shown, it is a schematic flow chart of a wafer defect detection method according to an embodiment of the present invention. According to one aspect of the present invention, a wafer defect detection method is provided, the method comprising: step S110, step S120 and step S130.
[0022] In step S110, the image to be tested and multiple groups of preset defect description texts obtained by performing image acquisition on the wafer to be tested are obtained.
[0023] Exemplarily, the wafer to be tested may be any one of the multiple wafers to be measured. After determining the wafer to be tested, an image acquisition module may be used to scan the wafer to be tested to obtain an image to be tested. The image acquisition module may be a two-dimensional image acquisition module for obtaining two-dimensional information of the surface of a target object (i.e., the wafer to be tested in this embodiment), or a three-dimensional image acquisition module for obtaining three-dimensional information of a target object. More specifically, the image acquisition module may be, for example, an industrial camera, a CCD camera, a CMOS camera, a laser confocal microscope (CLSM), a scanning probe microscope (SPM), a white light interferometer (WLI), etc. In some embodiments, the scanning area of the image acquisition module may cover the entire surface area of the wafer to be tested, and accordingly, the obtained image to be tested may include the entire surface area of the wafer to be tested. In other embodiments, the scanning area of the image acquisition module may cover the area to be defect-detected in the entire surface area of the wafer to be tested, and accordingly, the obtained image to be tested may include the area to be defect-detected in the entire surface area of the wafer to be tested. It can be understood that the obtained image to be tested may be a grayscale image or an RGB image, etc. The number of preset defect description texts can be multiple groups, and each group of preset defect description texts can be used to describe one or more types of preset defects of the wafer. For example, multiple groups of preset defect description texts can include: small point defects such as foreign matter, dirt, dust, and various metal slags, large area defects such as cracks, scratches, broken edges, shearing, shedding, and ruptures, various defects on and around round grains (bumps), fracture defects such as poor bridging, and other defects. The preset defect description texts can be defined by the user based on the defect type of the wafer, and each group of preset defect description texts can be composed of one or more words, phrases, and sentences used to describe wafer defects.
[0024] In step S120, multiple groups of input data corresponding to multiple groups of preset defect description texts are respectively input into the trained defect detection model to determine the similarity between the image to be tested and each group of preset defect description texts in the multiple groups of preset defect description texts, and each group of input data in the multiple groups of input data includes the corresponding preset defect description text and the image to be tested.
[0025] Exemplarily, the defect detection model of the embodiment of the present invention can process different types of input data, such as images and text, and the model category of the defect detection model can be a multimodal model. For each set of preset defect description texts, it can form a set of input data together with the image to be tested. In other words, each set of input data includes the image to be tested and a set of preset defect description texts. In the trained defect detection model, for each set of input data, the similarity between the image to be tested and the preset defect description text in the set of input data can be obtained, and the similarity can describe the consistency or correlation between the image to be tested and the preset defect description text. Specifically, the similarity between the image to be tested and the preset defect description text can be determined by calculating the cosine similarity, Euclidean distance, Manhattan distance, correlation coefficient, etc. between the two. The embodiment of the present invention does not make specific restrictions on the measurement method of similarity. It can be understood that the similarities between the image to be tested and different preset defect description texts may be different. Accordingly, the similarities between the image to be tested determined by the defect detection model based on each group of input data and multiple groups of preset defect description texts may be different.
[0026] In step S130, the preset defect description text with the highest similarity to the image to be tested is determined as the target defect description text of the image to be tested; wherein the defect detection model includes a text feature extraction module, an image feature extraction module and a similarity calculation module, the text feature extraction module is used to extract the text features of the input preset defect description text, the image feature extraction module is used to extract the image features to be tested of the image to be tested, the image features to be tested include feature values under a preset attention channel, the feature values under the preset attention channel are used to indicate the attention of each area of the image to be tested, the similarity calculation module is used to calculate the similarity between the text features of the input preset defect description text and the features of the image to be tested, and the similarity between the preset defect description text and the image to be tested is the similarity between the text features of the preset defect description text and the features of the image to be tested.
[0027] Exemplarily, in the defect detection model, for each group of input data, the similarity between the preset defect description text in the group of input data and the image to be tested can be obtained. Among the similarities between the multiple groups of preset defect description texts and the image to be tested, the preset defect description text with the highest similarity can be selected to be determined as the target defect description text of the image to be tested. It can be understood that the defect described by the target defect description text can be used as at least part of the defect of the wafer to be tested corresponding to the image to be tested. Specifically, the defect detection model may include a text feature extraction module, which can be used to extract text features of the input text (i.e., the preset defect description text in the embodiment of the present invention). The text feature extraction module can be a model trained using a large-scale corpus, such as a language model such as a BERT model, a RoBERTa model, and a DistilBERT model. The defect detection model may also include an image feature extraction module, which can use a feature extractor such as a ResNet model and a VIT model, which can be used to extract the image features of the image to be tested. The image features to be tested may include feature values of the image to be tested under multiple channels. Taking the image to be tested as an RGB image as an example, the features of the image to be tested may include the feature values of the image to be tested under the R channel, G channel, and B channel respectively, and may also include the feature values under the preset attention channel. The feature values of the image to be tested under the preset attention channel can be used to indicate the attention level of each area of the image to be tested. The preset attention channel may include, for example, one or more of the following: brightness channel, saturation channel, transparency channel, spectral information channel, morphology information channel, etc. Specifically, taking the preset attention channel as the transparency channel (also known as the alpha channel) as an example, the value range of each pixel of the image to be tested under the alpha channel is between 0 and 1, 1 represents the object of attention, 0 represents the background, and the closer the value of the pixel is to 1, the higher the attention level of the pixel. By extracting the feature values of the image to be tested under the preset attention channel, the attention level of each area of the image to be tested can be determined. The defect detection model may also include a similarity calculation module, which may be used to calculate the similarity between the text features of the preset defect description text in each group of input data and the image features of the image to be tested. In the similarity calculation module, the feature values of the text features of the preset defect description text and the feature values of the image features to be tested of the image to be tested can be mapped to the same feature space, and the similarity between the text features of the preset defect description text and the image features to be tested of the image to be tested can be calculated using a preset similarity measurement method (for example, calculating cosine similarity, calculating Euclidean distance, calculating Manhattan distance, calculating correlation coefficient, etc.).
[0028] The above technical solution can realize one-to-one matching of the image to be tested with the known preset defect description texts by respectively combining multiple groups of preset defect description texts with the image to be tested as input data and inputting them into the trained defect detection model, and then determine the preset defect description text with the highest degree of matching as the target defect description text used to describe the defects in the image to be tested, and determine at least part of the defects contained in the corresponding wafer to be tested. This technical solution can still classify the defects of wafers containing unknown new defects in the absence of annotated samples of new defects, and generate corresponding text descriptions, which is conducive to improving the defect detection efficiency of the wafer, and can realize the refined classification of wafer defects, so that the defect classification results obtained are more accurate. On the other hand, by additionally extracting the eigenvalues of the image to be tested under the preset attention channel, the information of the target area that needs to be paid attention to in the image to be tested can be integrated into the prediction process of the defect detection model, so that the defect detection model can use this information to predict the similarity between the image to be tested and the preset defect text, which is conducive to improving the matching accuracy between the image to be tested and the preset defect text.
[0029] Optionally, the preset attention channel includes one or more of the following: a transparency channel, a spectral information channel, and a morphology information channel.
[0030] Exemplarily, the preset attention channel may include a transparency channel. Specifically, the transparency channel may be used to indicate the transparency level of each pixel of the image to be tested. The value in the transparency channel may be between 0 and 1, wherein 0 indicates complete transparency, 1 indicates complete opacity, and the value between 0-1 may indicate different degrees of transparency. In an embodiment of the present invention, if the channel of a pixel under transparency is closer to 1, it can be considered that the pixel has a higher degree of attention in the image to be tested. The image to be tested may be an image obtained by an image acquisition module based on spectral imaging technology after performing image acquisition on the wafer to be tested. The image to be tested may have one or more spectral information channels, and each spectral information channel may correspond to a wavelength. The preset attention channel may also be a spectral information channel. When there are defects in the wafer to be tested, the reflection characteristics (e.g., reflectivity) of the defective area and the non-defective area at different wavelengths are different. It can be understood that the spectral information channel can be used to indicate the reflection characteristics of each pixel of the image to be tested at different wavelengths, thereby determining the degree of attention of each area of the image to be tested. The image to be tested may be an image obtained by processing the initial image obtained by the image acquisition module after performing image acquisition on the wafer to be tested. In the process of image processing the initial image, the morphological information of the wafer to be tested can be obtained. The image to be tested can have one or more morphological information channels, and each morphological information channel can correspond to morphological features such as roughness, height, and texture. The preset attention channel can also be a morphological information channel. When there are defects in the wafer to be tested, the morphological features of the defective area are different from those of the area without defects. It can be understood that the morphological information channel can be used to indicate the morphological features of each pixel of the image to be tested, and then determine the attention of each area of the image to be tested. It can be understood that when the preset attention channel includes multiple items of the transparency channel, the spectral information channel, and the morphological information channel, the attention of each area of the image to be tested obtained based on the transparency channel, the spectral information channel, and the morphological information channel can be normalized, and after the normalization, the attention of each area of the image to be tested is obtained by weighting, averaging, and other methods.
[0031] The above technical scheme can obtain the attention degree of each area of the image to be tested based on the image characteristics of the image to be tested collected for the wafer to be tested in multiple dimensions by obtaining the characteristics of the image to be tested in one or more channels among the transparency channel, the spectral information channel and the morphology information channel. The obtained attention degree can be helpful in reducing the influence of the background elements in the image to be tested on the similarity between the preset defect description text and the image to be tested, so that the obtained similarity can accurately indicate the preset defect description text corresponding to the defect of the image to be tested.
[0032] Optionally, the training process of the defect detection model is as follows: inputting positive sample data and / or negative sample data into the defect detection model to obtain positive sample similarity corresponding to the positive sample data and / or negative sample similarity corresponding to the negative sample data, wherein the positive sample data includes a sample image and a preset defect description text in multiple groups of preset defect description texts that matches the sample image, and the negative sample data includes a sample image and a preset defect description text in multiple groups of preset defect description texts that does not match the sample image, the positive sample similarity is the similarity between the sample image in the positive sample data and the preset defect description text, and the negative sample similarity is the similarity between the sample image in the negative sample data and the preset defect description text; inputting the positive sample similarity and / or the negative sample similarity into the contrast loss function to calculate the loss value of the defect detection model, and optimizing the defect detection model based on the loss value until the preset requirements are met.
[0033] Exemplarily, the training samples of the defect detection model may be multiple groups of sample data, and the multiple groups of sample data may include only positive sample data, only negative sample data, or both positive sample data and negative sample data. Specifically, each group of sample data may include a sample image and a group of preset defect description texts in multiple groups of preset defect description texts. For any group of sample data, when one or more defects described by the preset defect description texts in the group of sample data match the defects of the sample wafer in the sample image in the group of sample data, the group of sample data may be used as a group of positive sample data. Correspondingly, among the one or more defects described by the preset defect description texts in the group of sample data, if at least some of the defects do not match the defects of the sample wafer in the corresponding sample image, the group of sample data may be used as a group of negative sample data. For each group of sample data input into the defect detection model, the similarity calculation module in the defect detection model may obtain the similarity corresponding to the group of sample data. Specifically, when the group of sample data is positive sample data, the similarity calculation module may obtain the similarity between the sample image in the group of positive sample data and the preset defect description text (which may be recorded as "positive sample similarity"). Similarly, when the group of sample data is negative sample data, the similarity calculation module can obtain the similarity between the sample image in the group of negative sample data and the preset defect description text (which can be recorded as "negative sample similarity"). After obtaining the positive sample similarity and / or the negative sample similarity, the input contrast loss function of the positive sample similarity and / or the negative sample similarity can be used, and the contrast loss function used can be, for example, the InfoNCE loss function (Information Noise-Contrastive Estimation) to obtain the loss value of the defect detection model. The loss value can be used to optimize the defect detection model until the preset requirements are met. Specifically, the defect detection model can be adjusted based on the loss value so that the positive sample similarity obtained based on the positive sample data meets the first preset requirement, and the negative sample similarity based on the negative sample data meets the second preset requirement. The first preset requirement can be, for example, that the positive sample similarity is greater than or equal to a first preset threshold, and the second preset requirement can be, for example, that the negative sample similarity is less than or equal to a second preset threshold, wherein the second preset threshold is less than the first preset threshold. Taking the similarity calculation module adopting the similarity measurement method of calculating cosine similarity as an example, the value range of cosine similarity is from -1 to 1, the first preset threshold value may be, for example, 0.5, and the second preset threshold value may be, for example, -0.5.
[0034] The above technical solution can generate multiple different text prompt words based on each set of preset defect description texts during the training of the defect detection model, and calculate the similarity between the text prompt words and the sample image features of the sample image. In this way, the image defect classification problem can be converted into a picture-text matching problem, and a large amount of unlabeled text data can be used as sample data during the model training process, and the sample data is less difficult to obtain. On the other hand, by taking contrast loss as the optimization target, the defect detection model can learn the ability to distinguish between positive and negative samples, so as to achieve more accurate defect classification of images to be tested with new defects during the test phase.
[0035] Optionally, before inputting multiple groups of input data corresponding one by one to multiple groups of preset defect description texts into the trained defect detection model to determine the similarity between the image to be tested and each group of preset defect description texts in the multiple groups of preset defect description texts, the method also includes: preprocessing the image to be tested, the preprocessing including one or more of noise removal, image enhancement and size normalization.
[0036] Exemplarily, before inputting the input data into the trained defect detection model, a preprocessing operation may be performed on the image to be tested. The preprocessing operation may include noise removal. When performing noise removal on the image to be tested, one or more filtering methods such as mean filtering, median filtering, and bilateral filtering may be used to denoise the image to be tested. A denoising method based on a neural network may also be used. Neural networks that can be used for denoising include convolutional neural networks (CNNs), generative adversarial networks (GANs), and the like. The embodiment of the present invention does not limit the specific method of noise removal, and the denoising method can be selected based on actual conditions. Exemplarily, the preprocessing operation may also include image enhancement. When performing image enhancement on the image to be tested, image enhancement methods such as spatial domain enhancement methods (such as adjusting brightness and contrast, histogram equalization, image sharpening, image smoothing, etc.) and / or frequency domain enhancement methods (such as Fourier transform, wavelet transform) may be used. Similarly, the embodiment of the present invention does not limit the specific method of image enhancement, and the image enhancement method can be selected based on actual conditions. Exemplarily, the preprocessing operation may also include size normalization, and the size of the image to be tested after size normalization may be consistent with the size of the sample image used when training the defect detection model. The size normalization method may be, for example, resampling, image cropping, image padding, etc. Similarly, the embodiment of the present invention does not limit the specific method of size normalization, and the size normalization method may be selected based on actual conditions. It can be understood that when the preprocessing operation may include two or more of noise removal, image enhancement, and size normalization, the execution order of each preprocessing operation may be defined based on actual needs, and the embodiment of the present invention does not specifically limit the execution order of the preprocessing operations.
[0037] The above technical solution is beneficial to reducing the noise of the image to be tested and improving the recognizability of the features of the image to be tested by performing one or more preprocessing operations on the image to be tested, and is beneficial to reducing the processing speed of the defect detection model on the image and the accuracy of feature extraction of the image to be tested.
[0038] Optionally, the similarity calculation module calculates the similarity between the text features of the input preset defect description text and the image features to be tested in the following manner: normalizing the text features of the preset defect description text and the image features to be tested respectively to obtain normalized text features and normalized image features; calculating the cosine distance between the normalized text features and the normalized image features to obtain the similarity between the text features of the preset defect description text and the image features to be tested.
[0039] Exemplarily, the similarity calculation module can calculate the similarity between the text features of the input preset defect description text and the image features to be tested by using a method for calculating cosine similarity. Specifically, the text features of the preset defect description text and the image features to be tested can be normalized respectively. For example, a normalization function can be used to normalize the text features of the preset defect description text and the image features to be tested according to the L2 norm (which is a unit norm) to obtain normalized text features and normalized image features respectively. The normalized text features and the normalized image features can be regarded as two vectors respectively. By calculating the cosine distance (i.e., cosine similarity) of the two vectors, the similarity between the text features of the preset defect description text and the image features to be tested can be obtained. More specifically, the value range of cosine similarity is between -1 and 1. If the normalized text features and the normalized image features are exactly the same, the similarity is 1. It can be understood that the more similar the text features of the preset defect description text are to the image features to be tested, the greater the cosine similarity obtained.
[0040] The above technical scheme uses cosine similarity to represent the similarity between the text features of the preset defect description text and the features of the image to be tested, which is beneficial to improving the accuracy and processing efficiency of high-dimensional data (image features and text features in the embodiment of the present invention). When the amount of input data is large, the similarity calculation module in the defect detection model can still quickly and accurately determine the similarity between the text features of each group of preset defect description texts and the features of the image to be tested.
[0041] See also Figure 2 As shown, it is a schematic block diagram of a wafer defect detection device according to an embodiment of the present invention. According to another aspect of the present invention, a wafer defect detection device 200 is also provided, comprising:
[0042] The acquisition module 210 is used to acquire the image to be tested and multiple groups of preset defect description texts obtained by performing image acquisition on the wafer to be tested;
[0043] An input module 220, for inputting a plurality of sets of input data corresponding to a plurality of sets of preset defect description texts into the trained defect detection model, respectively, to determine the similarity between the image to be tested and each set of preset defect description texts in the plurality of sets of preset defect description texts, wherein each set of input data in the plurality of sets of input data includes a corresponding preset defect description text and the image to be tested;
[0044] A determination module 230, configured to determine the preset defect description text having the highest similarity with the image to be tested as the target defect description text of the image to be tested;
[0045] Among them, the defect detection model includes a text feature extraction module, an image feature extraction module and a similarity calculation module. The text feature extraction module is used to extract the text features of the input preset defect description text, and the image feature extraction module is used to extract the image features to be tested of the image to be tested. The image features to be tested include feature values under a preset attention channel, and the feature values under the preset attention channel are used to indicate the attention level of each area of the image to be tested. The similarity calculation module is used to calculate the similarity between the text features of the input preset defect description text and the features of the image to be tested. The similarity between the preset defect description text and the image to be tested is the similarity between the text features of the preset defect description text and the features of the image to be tested.
[0046] See also Figure 3 As shown, it is a schematic block diagram of an electronic device according to an embodiment of the present invention. According to another aspect of the present invention, an electronic device 300 is also provided, including: a processor 310 and a memory 320, wherein the memory 310 stores computer program instructions, and the computer program instructions are used by the processor 310 to execute the above-mentioned wafer defect detection method when it is running.
[0047] According to another aspect of the present invention, a storage medium is also provided, on which program instructions are stored, and when the program instructions are executed by a computer or a processor, the computer or the processor executes the corresponding steps of the above-mentioned wafer defect detection method of the embodiment of the present invention, and is used to implement the corresponding module in the above-mentioned wafer defect detection device according to the embodiment of the present invention or the corresponding module in the above-mentioned wafer defect detection device. The storage medium may include, for example, a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0048] According to yet another aspect of the present invention, a computer program product is provided, comprising computer program instructions, which are used to execute the wafer defect detection method as described above when the computer program instructions are run.
[0049] A person of ordinary skill in the art can understand the specific implementation and beneficial effects of the above-mentioned wafer defect detection device by reading the above-mentioned specific description of the wafer defect detection method. For the sake of brevity, they will not be repeated here.
[0050] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as required by the appended claims.
[0051] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0052] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0053] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0054] Similarly, it should be understood that in order to streamline the present invention and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.
[0055] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0056] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.
[0057] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some modules in a wafer defect detection device according to an embodiment of the present invention. The present invention may also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0058] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0059] The above is only a specific embodiment or description of a specific embodiment of the present invention, and the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A wafer defect detection method, characterized in that: include: Acquire an image to be tested and multiple groups of preset defect description texts obtained by performing image acquisition on the wafer to be tested; Inputting a plurality of groups of input data corresponding to the plurality of groups of preset defect description texts into the trained defect detection model respectively to determine the similarity between the image to be tested and each group of preset defect description texts in the plurality of groups of preset defect description texts, wherein each group of input data in the plurality of groups of input data includes a corresponding preset defect description text and the image to be tested; Determine the preset defect description text with the highest similarity to the image to be tested as the target defect description text of the image to be tested; Among them, the defect detection model includes a text feature extraction module, an image feature extraction module and a similarity calculation module, the text feature extraction module is used to extract the text features of the input preset defect description text, the image feature extraction module is used to extract the image features to be tested of the image to be tested, the image features to be tested include feature values under a preset attention channel, and the feature values under the preset attention channel are used to indicate the attention level of each area of the image to be tested, the similarity calculation module is used to calculate the similarity between the text features of the input preset defect description text and the features of the image to be tested, and the similarity between the preset defect description text and the image to be tested is the similarity between the text features of the preset defect description text and the features of the image to be tested.
2. The method according to claim 1, characterized in that The preset attention channel includes one or more of the following: a transparency channel, a spectral information channel, and a morphology information channel.
3. The method according to claim 1, characterized in that The training process of the defect detection model is as follows: Inputting positive sample data and / or negative sample data into the defect detection model to obtain a positive sample similarity corresponding to the positive sample data and / or a negative sample similarity corresponding to the negative sample data, wherein the positive sample data includes a sample image and a preset defect description text matching the sample image in the multiple sets of preset defect description texts, and the negative sample data includes a sample image and a preset defect description text not matching the sample image in the multiple sets of preset defect description texts, the positive sample similarity is the similarity between the sample image and the preset defect description text in the positive sample data, and the negative sample similarity is the similarity between the sample image and the preset defect description text in the negative sample data; The positive sample similarity and / or the negative sample similarity are input into a contrast loss function to calculate a loss value of the defect detection model, and the defect detection model is optimized based on the loss value until a preset requirement is met.
4. The method according to claim 1, characterized in that: Before inputting the plurality of groups of input data corresponding to the plurality of groups of preset defect description texts into the trained defect detection model to determine the similarity between the image to be tested and each group of preset defect description texts in the plurality of groups of preset defect description texts, the method further includes: The image to be tested is preprocessed, wherein the preprocessing includes one or more of noise removal, image enhancement and size normalization.
5. The method according to claim 1, characterized in that The similarity calculation module calculates the similarity between the text features of the input preset defect description text and the features of the image to be tested in the following manner: Normalizing the text features of the preset defect description text and the features of the image to be tested respectively to obtain normalized text features and normalized image features; The cosine distance between the normalized text feature and the normalized image feature is calculated to obtain the similarity between the text feature of the preset defect description text and the image feature to be tested.
6. A wafer defect detection device, characterized in that: include: An acquisition module is used to acquire the image to be tested and multiple groups of preset defect description texts obtained by performing image acquisition on the wafer to be tested; An input module, used to input a plurality of groups of input data corresponding to the plurality of groups of preset defect description texts into the trained defect detection model, respectively, to determine the similarity between the image to be tested and each group of preset defect description texts in the plurality of groups of preset defect description texts, wherein each group of input data in the plurality of groups of input data includes a corresponding preset defect description text and the image to be tested; A determination module, configured to determine a preset defect description text having the highest similarity with the image to be tested as a target defect description text of the image to be tested; Among them, the defect detection model includes a text feature extraction module, an image feature extraction module and a similarity calculation module, the text feature extraction module is used to extract the text features of the input preset defect description text, the image feature extraction module is used to extract the image features to be tested of the image to be tested, the image features to be tested include feature values under a preset attention channel, and the feature values under the preset attention channel are used to indicate the attention level of each area of the image to be tested, the similarity calculation module is used to calculate the similarity between the text features of the input preset defect description text and the features of the image to be tested, and the similarity between the preset defect description text and the image to be tested is the similarity between the text features of the preset defect description text and the features of the image to be tested.
7. An electronic device, comprising a processor and a memory, characterized in that: The memory stores computer program instructions, which are used by the processor to execute the wafer defect detection method according to any one of claims 1 to 5 when the processor is running the computer program instructions.
8. A storage medium having program instructions stored thereon, characterized in that: The program instructions are used to execute the wafer defect detection method as described in any one of claims 1-5 when running.
9. A computer program product comprising computer program instructions, characterized in that The computer program instructions are used to execute the wafer defect detection method as described in any one of claims 1 to 5 when running.