Deep learning model training and wafer defect detection method and device
By training the deep learning model and utilizing the similarity between the wafer defect view and the reference view, the problem of low manual detection accuracy and low efficiency is solved, efficient and accurate wafer defect detection is achieved, the cost is reduced, and the model's quality is improved. robustness.
Patent Information
- Application Number
- CN202411018843.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-22
AI Technical Summary
In the existing technology, manual detection of wafer defects has the problems of low detection accuracy, low efficiency and high labor cost. Moreover, existing deep learning models only use a single view for detection and fail to consider the correlation of defects in different views.
By obtaining multiple samples including wafer defect views and their corresponding reference views, multiple samples are used to iteratively train the deep learning model, calculate the similarity between view features, adjust model parameters to reduce contrast loss, and improve detection efficiency and accuracy. Rate.
It achieves efficient and accurate wafer defect detection, reduces manual inspection costs, and improves the accuracy and robustness of the model by utilizing multi-view information.
Smart Images

Figure CN118823482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of defect detection technology, and in particular to deep learning model training and wafer defect detection methods and devices. Background Art
[0002] In the process of manufacturing semiconductor wafers, various defects may occur, so it is necessary to perform defect inspection on the wafers and eliminate defective wafers in actual production.
[0003] In traditional methods, wafer images are usually manually inspected by humans to determine whether there are defects in the wafer images. Manual inspection methods are not only affected by personal subjective factors, but also by visual fatigue. With the increase in working hours or workload, eyestrain will occur, affecting the accuracy of defect judgment. Manual inspection methods often have problems such as low detection accuracy, low detection efficiency, and high labor costs. Therefore, manual inspection of wafer defects can no longer meet the industrial needs of high precision and high efficiency. In recent years, with the rapid development of the Al field, more and more vertical fields have begun to use deep learning algorithms to automatically replace manual inspections, such as the medical industry, education industry, and semiconductor industry. In the semiconductor industry, a large number of wafer automatic defect detection models have emerged. However, these existing models often only use a single view to detect a defect, and cannot consider the correlation of the defect in different views.
[0004] Therefore, it is urgent to propose a defect detection method with higher efficiency and accuracy. Summary of the invention
[0005] In order to solve the above problems, the present application proposes a deep learning model training and wafer defect detection method, device, computer-readable storage medium and electronic device, which can utilize the correlation between different views of the same defect to improve the efficiency and accuracy of defect detection.
[0006] In a first aspect, the present application provides a deep learning model training method, the method comprising: obtaining multiple samples including a wafer defect view and its corresponding reference view; the wafer defect view and the corresponding reference view each have a defect label; using a first number of samples from the multiple samples to iteratively train the deep learning model, comprising: for each sample, inputting the wafer defect view and the corresponding reference view in the sample into the deep learning model for feature extraction, respectively, to obtain a first feature and a second feature; calculating the similarity between the first feature and the second feature, and then determining the contrast loss, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity; when the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity; at least with the goal of reducing the contrast loss, adjusting the parameters of the deep learning model.
[0007] Therefore, the present application uses samples consisting of wafer defect views and reference views to train the deep learning model including contrast loss, thereby obtaining a deep learning model that can efficiently and accurately perform wafer defect detection.
[0008] In one possible implementation, a first feature is input into a classifier to obtain a first prediction result, and a first loss is determined based on the first prediction result and a defect label of a wafer defect view; a second feature is input into a classifier to obtain a second prediction result, and a second loss is determined based on the second prediction result and a defect label of a reference view; and parameters of a deep learning model are adjusted with at least one goal of reducing contrast loss, including: adjusting parameters of the deep learning model based on a weighted loss calculated based on the first loss, the second loss, and the contrast loss.
[0009] In one possible implementation, the weighted loss is calculated as:
[0010] loss = α * loss 1 +α*loss 2 +β*loss 3 ,
[0011] 2*α+β=1,
[0012] Among them, loss is the weighted loss, loss 1 、loss 2 are the first loss and the second loss, respectively. 3 is the contrast loss; α and β are hyperparameters used to adjust the weights of the first loss, the second loss, and the contrast loss.
[0013] In a possible implementation, the wafer defect view and the corresponding reference view correspond to the same wafer local area, and the defect label of the corresponding reference view is no defect.
[0014] In a possible implementation, the calculation formulas of the first loss and the second loss are as follows:
[0015]
[0016]
[0017] Among them, loss 1 、loss 2 are the first loss and the second loss respectively, N is the first number of samples, K is the total number of defect categories, and the defect categories include no defect and multiple preset defect types; y 0(i,k) is a vector representing the defect label of the wafer defect view of the i-th sample, p 0(i,k) is the first prediction result of the i-th sample, indicating the probability that the wafer defect view is predicted to be the k-th defect; y 1(i,k) is a vector representing the defect label of the reference view of the i-th sample, p 1(i,k) is the second prediction result of the i-th sample, indicating the probability that the reference view is predicted to be the k-th defect.
[0018] In one possible implementation, the contrast loss is calculated as follows:
[0019]
[0020]
[0021] Among them, r 0 、r 1 are the first feature and the second feature respectively, cos(θ) represents the cosine similarity, and loss 3 is the contrast loss, m and n are hyperparameters used to adjust the tolerable range of cosine similarity.
[0022] In one possible implementation, a deep learning model is iteratively trained using a first number of samples from a plurality of samples, including: repeatedly iteratively training the deep learning model using the first number of samples according to a set number of training times to obtain a trained deep learning model for the number of training times; verifying the trained deep learning model for the number of training times using a second number of samples from the plurality of samples to select an optimal model therefrom; and testing a processing effect of the optimal model using a third number of samples from the plurality of samples; wherein the first number of samples, the second number of samples, and the third number of samples are different samples.
[0023] In a second aspect, the present application provides a wafer defect detection method, the method comprising: obtaining a deep learning model obtained according to any one of the first aspects; using the feature encoder, maximum pooling layer, flattening layer and fully connected layer of the deep learning model to extract features of the target wafer defect view input into the deep learning model in sequence to obtain corresponding target features; using the corresponding target features to predict the probability of the target wafer defect view corresponding to no defects and multiple preset defect types; determining the defect type corresponding to the target wafer defect view or no defects based on the probability.
[0024] In a third aspect, the present application provides a deep learning model training device, which includes: an acquisition module for acquiring multiple samples including a wafer defect view and its corresponding reference view; the wafer defect view and the corresponding reference view each have a defect label; a training module for iteratively training the deep learning model using a first number of samples from the multiple samples, including: for each sample, inputting the wafer defect view and the corresponding reference view in the sample into the deep learning model for feature extraction, respectively, to obtain a first feature and a second feature; calculating the similarity between the first feature and the second feature, and then determining the contrast loss, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity; when the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity; at least with the goal of reducing the contrast loss, adjusting the parameters of the deep learning model.
[0025] In a fourth aspect, the present application provides a wafer defect detection device, which includes: an acquisition module for acquiring a deep learning model obtained according to any one of the first aspects of the claim; a processing module for inputting a target wafer defect view into the deep learning model, and using the feature encoder, maximum pooling layer, flattening layer and fully connected layer of the deep learning model to extract features of the target wafer defect view in sequence to obtain corresponding target features; the processing module is also used to predict the probability of the target wafer defect view corresponding to no defects and multiple preset defect types using the corresponding target features; an output module is used to determine and output the defect type or no defects corresponding to the target wafer defect view based on the probability.
[0026] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect or any possible implementation of the first aspect.
[0027] In a sixth aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory; wherein, when the programs stored in the memory are executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect, and the second aspect or any possible implementation of the second aspect.
[0028] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 It is a training structure diagram for deep learning model training and an inference structure diagram for wafer defect detection provided in an embodiment of the present application;
[0031] Figure 2 It is a flow chart of a deep learning model training method provided in an embodiment of the present application;
[0032] Figure 3 It is a schematic diagram of a deep learning model training device provided in an embodiment of the present application;
[0033] Figure 4 It is a schematic diagram of a wafer defect detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0035] In the description of the embodiments of the present application, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.
[0036] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "multiple" means two or more. For example, multiple systems refers to two or more systems, and multiple screen terminals refers to two or more screen terminals.
[0037] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0038] Based on the above problems, the embodiment of the present application uses samples consisting of wafer defect views and corresponding reference views to train the deep learning model including contrast loss, and then uses the trained deep learning model to perform defect detection on the target wafer defect view. Compared with manual detection, it can improve the efficiency of defect detection and reduce costs; in addition, in the process of training the deep learning model, the wafer defect view and the corresponding reference view are referred to, and the idea of contrast loss is added. Compared with the previous detection method using a single view, the view information used in this scheme is richer and more comprehensive, which can improve the accuracy and robustness of the deep learning model.
[0039] The deep learning model training and wafer defect detection process in this solution includes:
[0040] First, historical wafer defect views (defect) and corresponding reference views (reference) are obtained through sampling.
[0041] Exemplarily, sufficient data needs to be collected for training, validating and testing the model. Two views are obtained by collecting data: a wafer defect view and a corresponding reference view. The wafer defect view and the corresponding reference view have the same wafer local area.
[0042] Second, build a dataset that can be used to train the model.
[0043] After the collected data is cleaned, missing values are processed, feature engineering is performed, and the data is standardized or normalized, it is annotated manually or semi-manually to obtain the defect labels of the wafer defect view and the corresponding reference view. The defect label of the reference view is no defect, and the defect label of the wafer defect view is no defect or one of multiple preset defect types. The preset defect types can be scratches, pits, chemical stains, etc. Defect classification includes no defect and multiple preset defect types.
[0044] For example, if there are 16 defect categories, 15 of which are preset defect types and 1 is normal, the defect label of the wafer defect view is one of the 16 categories, and the defect label of the reference view is normal.
[0045] Each piece of sample data constructed in the above manner includes: a wafer defect view, a corresponding reference view, and defect labels of the wafer defect view and the corresponding reference view. These constructed sample data constitute an available data set for training the model.
[0046] Third, divide the sample data in the available dataset into training set, validation set and test set.
[0047] The training set is used to train the detection model, the validation set is used to select the best model, and the test set is used to test the model effect. For example, the sample data in the available data set is divided into 70% training set, 15% validation set and 15% test set, or 80% training set, 10% validation set and 10% test set.
[0048] The sample data in the training set, validation set, and test set are different from each other.
[0049] Fourth, use the sample data in the training set to train the model.
[0050] Choose an initial deep learning model architecture, such as a convolutional neural network based on deep learning. Train the model using sample data from the training set. During the training process, the model learns the characteristics of the sample data.
[0051] For example, Figure 1 (a) shows a training structure diagram for deep learning model training provided in an embodiment of the present application. The training process can be run on any device, apparatus, platform, server, device cluster, etc. with computing and processing capabilities.
[0052] like Figure 1As shown in (a), in the training structure diagram, for each sample data in the training set, the wafer defect view is input into the deep learning model, and the feature encoder encoder, the maximum pooling layer max pooling, the flatten layer flatten and the fully connected layer fc included in the model are used to process the wafer defect view in sequence to extract the first feature r 0 .
[0053] Similarly, the model is used to process the corresponding reference view and extract the second feature r 1 .
[0054] Input the first feature and the second feature into the classifier respectively to obtain the corresponding first prediction result and the second prediction result. Determine the first loss according to the first prediction result and the defect label of the wafer defect view 1 The second loss loss is determined based on the second prediction result and the defect label of the corresponding reference view. 2 . And according to the first feature r 0 , the second feature r 1 Calculate contrast loss 3 Then, according to the above first, second and contrast losses, the hyperparameters are set to obtain the weighted loss of the deep learning model.
[0055] Backpropagation is performed using the weighted loss to gradually adjust the parameters of the deep learning model.
[0056] Fifth, use the sample data in the validation set to evaluate the model performance.
[0057] After each training cycle (epoch), the validation set is used to evaluate the model performance, such as accuracy, recall, F1 score, etc. The best model is selected from the models obtained in each training cycle.
[0058] Sixth, use the sample data in the test set to test the performance of the model.
[0059] Analyze the performance indicators on the test set to determine the generalization ability of the model. If the model performs well on the test set, it can be deployed to the production environment. Otherwise, use the training set to iterate and improve the model again until it meets the deployment accuracy.
[0060] Seventh, use the trained deep learning model for inference.
[0061] The target wafer defect view to be inspected is input into the trained deep learning model. During the inference process, the model learns the target features of the target wafer defect view, predicts the probability of the wafer defect view corresponding to no defects and multiple preset defect types based on the target features, and determines the defect type or no defects in the wafer defect view based on the probability.
[0062] For example, Figure 1 (b) shows the use of Figure 1 (a) Inference structure diagram of the trained deep learning model for wafer defect detection.
[0063] like Figure 1 As shown in (b), in the inference structure diagram, the wafer defect view to be detected is input into the deep learning model, and the wafer defect view is processed in sequence using the feature encoder encoder, the maximum pooling layer max pooling, the flatten layer flatten and the fully connected layer fc included in the model to extract the first feature r 0 The probability of the wafer defect view corresponding to different defect classifications is predicted according to the first feature, so as to output the defect type including the defect in the wafer defect view or whether it is defect-free.
[0064] Therefore, the automatic defect detection method based on the deep learning model replaces the traditional manual detection, improves the detection efficiency and accuracy, and can greatly reduce labor costs.
[0065] In addition, based on the wafer defect view and the corresponding reference view, the deep learning model is constructed using the idea of contrast loss. This method makes full use of the correlation between the wafer defect view and the corresponding reference view to further improve the accuracy and robustness of the model. Compared with the previous detection method using a single view, the view information used in the present invention is richer and more comprehensive.
[0066] Figure 2 A flow chart of a deep learning model training method provided by an embodiment of the present application is shown. Figure 2 As shown, the method comprises the following steps:
[0067] Step S201, obtaining a plurality of samples including wafer defect views and corresponding reference views, wherein the wafer defect views and the corresponding reference views each have a defect label.
[0068] In this embodiment, multiple samples constitute an available data set for model training. Each sample data includes a wafer defect view and its corresponding reference view. The wafer defect view and the corresponding reference view correspond to the same wafer local area.
[0069] In addition, each sample data also includes defect labels of the wafer defect view and the corresponding reference view. The defect label corresponds to one of the defect classifications, and the defect classification includes no defect and multiple preset defect types.
[0070] The defect label of the reference view is non-defective, and the defect label of the wafer defect view is non-defective or one of multiple preset defect types.
[0071] Step S202, iteratively training a deep learning model using a first number of samples from a plurality of samples, including: for each sample, inputting a wafer defect view and a corresponding reference view in the sample into a deep learning model for feature extraction, respectively, to obtain a first feature and a second feature. Calculate the similarity between the first feature and the second feature, and then determine the contrast loss, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity; when the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity. At least with the goal of reducing the contrast loss, adjust the parameters of the deep learning model.
[0072] In this embodiment, a training set allocated from the available data set consists of a first number of samples.
[0073] Exemplarily, according to the set number of training times, the deep learning model is repeatedly iteratively trained using samples in the training set to obtain a trained deep learning model of the training times. For example, the number of training times is set to 100, and each training is a training cycle. In a training cycle, all samples in the training set (for example, 500 samples) are used to iteratively train the deep learning model to obtain 1 trained deep learning model. Finally, 100 different trained deep learning models can be obtained.
[0074] In each iterative training (i.e., each training cycle), for each sample, the wafer defect view in the sample and the corresponding reference view are respectively input into the deep learning model for feature extraction, including:
[0075] The feature encoder, maximum pooling layer, flattening layer and fully connected layer of the deep learning model are used to extract features of the wafer defect view and the corresponding reference view respectively.
[0076] Specifically, the feature encoder is used to extract all features in the sample wafer defect view or the corresponding reference view. The maximum pooling layer is used to select the most important features from all features to reduce the computational complexity. In the flattening layer, the feature map is flattened into a one-dimensional vector for input to the fully connected layer. The one-dimensional feature vector is sent to one or more fully connected layers for processing to obtain the final image feature r 0 or 1 , that is, the first feature or the second feature.
[0077] The wafer defect view is predicted according to the first feature, and the corresponding reference view is predicted according to the second feature to respectively correspond to the probability of no defect and multiple preset defect types.
[0078] In some embodiments, the first feature is input into the classifier to obtain a first prediction result, and the first loss is determined according to the first prediction result and the defect label of the wafer defect view. And the second feature is input into the classifier to obtain a second prediction result, and the second loss is determined according to the second prediction result and the defect label of the reference view. The relevant calculation formulas (1) and (2) of the first loss and the second loss are as follows:
[0079]
[0080]
[0081] Among them, loss 1 、loss 2 are the first loss and the second loss respectively, N is the first number of samples, K is the total number of defect categories, and the defect categories include no defect and multiple preset defect types;
[0082] y 0(i,k) is a vector representing the defect label of the wafer defect view of the ith sample. For example, for 16 categories of defects, the vector y: (0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), means that the current sample belongs to the 5th defect category, p 0(i,k) is the first prediction result of the i-th sample, indicating the probability that the wafer defect view is predicted to be the k-th defect;
[0083] y 1(i,k) is a vector representing the defect label of the reference view of the i-th sample, p 1(i,k) is the second prediction result of the i-th sample, indicating the probability that the reference view is predicted to be the k-th defect.
[0084] In some embodiments, after obtaining the first feature and the second feature, the contrast loss between the first feature and the second feature is also calculated, and the parameters of the deep learning model are adjusted with at least the reduction of the contrast loss as the goal.
[0085] Specifically, the similarity between the first feature and the second feature is calculated, and then the contrast loss is determined, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity. When the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity.
[0086] Exemplarily, the above-mentioned calculation formulas (3) and (4) for contrast loss are as follows:
[0087]
[0088]
[0089] Among them, r 0 、r 1 are the first feature and the second feature respectively, cos(θ) represents the cosine similarity, and loss 3 is the contrast loss, m and n are hyperparameters used to adjust the tolerable range of cosine similarity.
[0090] Specifically, cos(θ) is used to calculate the cosine similarity of the vectors corresponding to the first feature and the second feature, that is, the cosine value of the angle between the two feature vectors, which is between 0 and 1. The angle between the two vectors tends to 0, and the cosine similarity is close to 1, indicating that the two vectors are more similar. The angle tends to 90 degrees, and the cosine value is close to 0, indicating that the two vectors are less similar. 3 In the above example, if the wafer defect view has the same label as the corresponding reference view, then minimizing the training loss of the model is equivalent to maximizing cos(θ), that is, making the angle between the two vectors as small as possible, which means that the features of the two views are as close as possible. If the defect view has different defect labels from the corresponding reference view, then minimizing the training loss of the model is equivalent to minimizing cos(θ), that is, making the angle between the two vectors as large as possible, which means that the features of the two views are as far apart as possible.
[0091] According to loss 1 、loss 2 And loss 3 The weighted loss of the entire network is obtained. The relevant calculation formulas (5) and (6) of the weighted loss are as follows:
[0092] loss = α * loss 1 +α*loss 2 +β*loss 3 , (5)
[0093] 2*α+β=1,(6)
[0094] Among them, loss is the weighted loss, loss 1 、loss 2 are the first loss and the second loss, respectively. 3 is the contrast loss; α and β are hyperparameters used to adjust the weights of the first loss, the second loss, and the contrast loss.
[0095] Backpropagation with weighted losses is used to incrementally adjust the parameters of deep learning models.
[0096] Optionally, the coefficients of α and β in formula (6) can also be set to other values according to the characteristics of the model so that the deep learning model can converge quickly.
[0097] In this embodiment, a second number of samples is also used to form a validation set allocated in the available data set.
[0098] The trained deep learning model (for example, 100 trained deep learning models) is validated by using a second number of samples among the multiple samples, and an optimal model is selected therefrom.
[0099] A third number of samples is also used to form a test set allocated from the available dataset.
[0100] The processing effect of the optimal model is tested using the third number of samples from the multiple samples. If the performance is good, it can be deployed to the production environment. Otherwise, the model is iteratively improved again using the training set until it meets the deployment accuracy.
[0101] The first number of samples, the second number of samples and the third number of samples are different samples.
[0102] In summary, the input for training the network model in the present application includes: a wafer defect view and a corresponding reference view, and the wafer defect view and the corresponding reference view each have a defect label. When training the deep learning model, by calculating the first loss, the second loss and the contrast loss, when the defect labels of the wafer defect view and the corresponding reference view are the same, the first feature of the wafer defect view extracted by the model is as close as possible to the second feature of the corresponding reference view; when the defect labels of the wafer defect view and the corresponding reference view are different, the features of the two are as far apart as possible. Like attracts, unlike repels. Compared with deep learning models using a single view, this method can better distinguish features between different categories, thereby improving the accuracy and robustness of the model.
[0103] It should be noted that although the operations of the method of the embodiment of the present application are described in a specific order in the above embodiment, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flow chart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0104] Exemplarily, the present application also proposes a wafer defect detection method, characterized in that the method comprises:
[0105] First, obtain the Figure 2 The deep learning model obtained by the method shown.
[0106] Secondly, the feature encoder, maximum pooling layer, flattening layer and fully connected layer of the deep learning model are used to extract features of the target wafer defect view input into the deep learning model in sequence to obtain the corresponding target features.
[0107] Furthermore, the corresponding target features are used to predict the probability of the target wafer defect view corresponding to different defect-free and multiple preset defect types.
[0108] Finally, the defect type or non-defect corresponding to the target wafer defect view is determined based on probability.
[0109] Based on the method in the above embodiment, illustratively, Figure 3 A deep learning model training device provided by an embodiment of the present application is shown. Figure 3 As shown, the deep learning model training device 300 includes:
[0110] The acquisition module 310 is used to acquire multiple samples including wafer defect views and their corresponding reference views. The wafer defect views and the corresponding reference views each have a defect label.
[0111] The training module 320 is used to iteratively train the deep learning model using a first number of samples from the plurality of samples, including:
[0112] For each sample, the wafer defect view in the sample and the corresponding reference view are respectively input into the deep learning model for feature extraction to obtain the first feature and the second feature.
[0113] The similarity between the first feature and the second feature is calculated, and then the contrast loss is determined, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity. When the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity.
[0114] At least adjust the parameters of the deep learning model with the goal of reducing the contrast loss.
[0115] Based on the method in the above embodiment, illustratively, Figure 4 A wafer defect detection device provided by an embodiment of the present application is shown. Figure 4 As shown, the wafer defect detection device 400 includes:
[0116] The acquisition module 410 is used to acquire Figure 2 The deep learning model obtained by the method in .
[0117] The processing module 420 is used to input the target wafer defect view into the deep learning model, and use the feature encoder, maximum pooling layer, flattening layer and full connection layer of the deep learning model to extract features of the target wafer defect view in sequence to obtain corresponding target features.
[0118] The processing module 420 is further configured to predict the probability of the target wafer defect view corresponding to no defect and multiple preset defect types using the corresponding target features.
[0119] The output module 430 is used to determine and output the defect type corresponding to the target wafer defect view or whether it is defect-free according to probability.
[0120] Based on the methods in the above embodiments, the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the methods described in the above embodiments.
[0121] Based on the method in the above embodiment, an embodiment of the present application provides an electronic device. The electronic device may include: at least one memory for storing a program; at least one processor for executing the program stored in the memory. Wherein, when the program stored in the memory is executed, the processor is used to execute the method described in the above embodiment. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a server, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, and a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) device, a virtual reality (virtual reality, VR) device, an artificial intelligence (artificial intelligence, AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
[0122] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0123] It is understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. It should be understood that in the embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0124] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.
Claims
1. A deep learning model training method, characterized in that: The method comprises: Acquire a plurality of samples including wafer defect views and corresponding reference views; the wafer defect views and corresponding reference views each have a defect label; Iteratively training a deep learning model using a first number of samples from the plurality of samples, including: For each sample, the wafer defect view in the sample and the corresponding reference view are respectively input into the deep learning model for feature extraction to obtain a first feature and a second feature; Calculating the similarity between the first feature and the second feature, and then determining the contrast loss, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity; when the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity; The parameters of the deep learning model are adjusted with the goal of at least reducing the contrast loss.
2. The method according to claim 1, characterized in that The method further comprises: Inputting the first feature into a classifier to obtain a first prediction result, and determining a first loss according to the first prediction result and a defect label of the wafer defect view; Inputting the second feature into the classifier to obtain a second prediction result, and determining a second loss according to the second prediction result and a defect label of a reference view; The adjusting the parameters of the deep learning model with at least the reduction of the contrast loss as the goal includes: The parameters of the deep learning model are adjusted based on the weighted loss calculated based on the first loss, the second loss and the contrast loss.
3. The method according to claim 2, characterized in that The calculation formula of the weighted loss is: loss=α*loss1+α*loss2+β*loss3, 2*α+β=1, Among them, loss is the weighted loss, loss1 and loss2 are the first loss and the second loss respectively, and loss3 is the contrast loss; α and β are hyperparameters used to adjust the weights of the first loss, the second loss, and the contrast loss.
4. The method according to claim 1, characterized in that The wafer defect view and the corresponding reference view correspond to the same wafer local area, and the defect label of the corresponding reference view is no defect.
5. The method according to claim 2, characterized in that: The calculation formulas of the first loss and the second loss are as follows: Wherein, loss1 and loss2 are the first loss and the second loss respectively, N is the first number of samples, K is the total number of defect categories, and the defect categories include no defect and multiple preset defect types; y 0(i,k) is a vector representing the defect label of the wafer defect view of the i-th sample, p 0(i,k) is the first prediction result of the i-th sample, indicating the probability that the wafer defect view is predicted to be the k-th defect; y 1(i,k) is a vector representing the defect label of the reference view of the i-th sample, p 1(i,k) is the second prediction result of the i-th sample, indicating the probability that the reference view is predicted to be the k-th defect.
6. The method according to claim 1, characterized in that The calculation formula of the contrast loss is as follows: Among them, r0 and r1 are the first and second features respectively, cos(θ) represents cosine similarity, loss3 is contrast loss, m and n are hyperparameters used to adjust the tolerable range of cosine similarity.
7. The method according to claim 1, characterized in that The iterative training of the deep learning model using a first number of samples from the plurality of samples comprises: Repeatedly iteratively train the deep learning model using the first number of samples according to a set number of training times to obtain a deep learning model after training for the number of training times; Using a second number of samples from the plurality of samples to verify the deep learning model trained for the number of training times, and selecting an optimal model therefrom; Using a third number of samples from the plurality of samples to test a processing effect of the optimal model; The first number of samples, the second number of samples and the third number of samples are different samples.
8. A wafer defect detection method, characterized in that: The method comprises: Obtain a deep learning model according to any one of claims 1 to 7; Using the feature encoder, the maximum pooling layer, the flattening layer, and the fully connected layer of the deep learning model, feature extraction is performed on the target wafer defect view input into the deep learning model in sequence to obtain corresponding target features; The corresponding target features are used to predict the probability that the target wafer defect view corresponds to no defects and multiple preset defect types: The defect type corresponding to the target wafer defect view is determined to be defect-free according to the probability.
9. A deep learning model training device, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of samples including a wafer defect view and a corresponding reference view; the wafer defect view and the corresponding reference view each have a defect label; A training module, for iteratively training a deep learning model using a first number of samples from a plurality of samples, comprising: For each sample, the wafer defect view in the sample and the corresponding reference view are respectively input into the deep learning model for feature extraction to obtain a first feature and a second feature; Calculating the similarity between the first feature and the second feature, and then determining the contrast loss, so that when the defect labels of the wafer defect view and the reference view are the same, the contrast loss is negatively correlated with the similarity; when the defect labels of the wafer defect view and the reference view are different, the contrast loss is positively correlated with the similarity; The parameters of the deep learning model are adjusted with the goal of at least reducing the contrast loss.
10. A wafer defect detection device, characterized in that: The device comprises: An acquisition module, used to acquire a deep learning model obtained according to any one of claims 1-7; A processing module, used to input the target wafer defect view into the deep learning model, and use the feature encoder, maximum pooling layer, flattening layer and fully connected layer of the deep learning model to extract features of the target wafer defect view in sequence to obtain corresponding target features; The processing module is further used to predict the probability of the target wafer defect view corresponding to no defect and multiple preset defect types by using the corresponding target feature; An output module is used to determine and output the defect type corresponding to the target wafer defect view or whether it is defect-free according to the probability.
