Wafer defect detection model establishment method, detection method, equipment and medium

By using the self-attention mechanism and feature fusion technology in the wafer defect detection model, the problem of low accuracy of traditional detection methods is solved, high-accuracy detection of wafer surface defects is achieved, and product quality and system reliability are improved.

CN117853464BActive Publication Date: 2024-08-30PRESYS (SUZHOU) INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410054460.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-15
Publication Date
2024-08-30
Estimated Expiration
2044-01-15

AI Technical Summary

Technical Problem

Traditional manual inspection methods have low accuracy when detecting wafer defects and cannot accurately identify defects, resulting in unstable product quality and affecting system reliability.

Method used

The wafer defect detection model is used to obtain wafer images, separate coarse-grained and fine-grained features, and use self-attention mechanism and feature fusion to output defect parameters and their weights to achieve rapid screening and accurate detection.

Benefits of technology

It improves the accuracy and sensitivity of wafer surface defect detection, can effectively identify local and global features, improves detection accuracy, and reduces the rate of defective products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117853464B
    Figure CN117853464B
Patent Text Reader

Abstract

The present invention discloses a method for establishing a wafer defect detection model, a detection method, a device and a medium. The method for establishing a wafer defect detection model comprises: acquiring a wafer image; determining a coarse-grained sample image and a fine-grained sample image according to the wafer image; inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation, respectively; performing feature fusion on the coarse-grained feature representation and the fine-grained feature representation, and outputting various defect parameters and weights corresponding to the various defect parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for establishing a wafer defect detection model, a detection method, a device and a medium. Background Art

[0002] The wafer manufacturing process is susceptible to various minor defects, such as surface scratches, insufficient glue, and impurities. These defects will have an adverse effect on the performance and reliability of the entire system. Especially in semiconductor manufacturing, defects on the wafer surface directly affect conductivity, current flow, and signal transmission. Therefore, serious defects may cause the products produced to become defective products, or even cause the failure of the entire system. Traditional manual inspection methods have low detection accuracy and cannot accurately detect defects.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a method for establishing a wafer defect detection model, a detection method, a device and a medium, aiming to solve the problem that traditional manual detection methods have low detection accuracy and cannot accurately detect defects.

[0005] To achieve the above object, the present invention provides a method for establishing a wafer defect detection model, the method for establishing a wafer defect detection model comprising:

[0006] Acquire wafer images;

[0007] According to the wafer image, respectively determining a coarse-grained sample image and a fine-grained sample image;

[0008] Inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation, respectively;

[0009] The coarse-grained feature representation and the fine-grained feature representation are feature fused to output various defect parameters and weights corresponding to the various defect parameters.

[0010] Preferably, in the method for establishing the wafer defect detection model, the step of inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting the coarse-grained feature representation and the fine-grained feature representation, respectively, in the step of coarse-grained feature learning, comprises:

[0011] According to the coarse-grained sample image, adjacent regions are merged and the features of the merged regions are updated;

[0012] According to the merged regional features, the coarse-grained feature representation is determined using the self-attention mechanism.

[0013] Preferably, in the method for establishing the wafer defect detection model, the step of merging adjacent regions and updating the features of the merged regions according to the coarse-grained sample image specifically includes:

[0014] According to the preset similarity measurement model, the similarity of adjacent regions is determined; the formula for similarity measurement is as follows:

[0015] ;

[0016] When the determined similarity is greater than the preset threshold, it is determined to merge the adjacent regions, and the merging function is as follows:

[0017] ;

[0018] Update the merged regional features, and the update formula is as follows:

[0019] ;

[0020] in,

[0021] S(R i ,R j ) is the region R i and region R j Similarity measurement function of ;

[0022] The mean μ(R) of region R is calculated as follows:

[0023] ;

[0024] I(x, y) is the coarse-grained sample image;

[0025] G(merged_region) is the merged region feature.

[0026] Preferably, in the method for establishing the wafer defect detection model, in the step of determining the coarse-grained feature representation using the self-attention mechanism based on the merged regional features, the calculation process includes:

[0027] ;

[0028] ;

[0029] ;

[0030] ;

[0031] in,

[0032] MutiHeadAttention() is the multi-head self-attention function;

[0033] G is the regional feature after merging;

[0034] LayerNorm() represents the layer normalization function;

[0035] FeedForward() is the forward propagation function;

[0036] E G It is a coarse-grained feature representation.

[0037] Preferably, in the method for establishing the wafer defect detection model, the step of inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting the coarse-grained feature representation and the fine-grained feature representation, respectively, in the step of fine-grained feature learning, comprises:

[0038] The fine-grained sample image is convolved to obtain the output features of different convolution sub-branches;

[0039] Merge the output features of different convolution sub-branches to obtain the merged fine-grained features;

[0040] The merged fine-grained features are subjected to self-attention calculation to obtain the encoded fine-grained feature representation.

[0041] Preferably, in the method for establishing the wafer defect detection model, in the step of performing self-attention calculation on the fine-grained features to obtain the encoded fine-grained feature representation, the calculation process is as follows:

[0042] ;

[0043] ;

[0044] ;

[0045] ;

[0046] in,

[0047] MutiHeadAttention() is the multi-head self-attention function;

[0048] F is the merged fine-grained feature;

[0049] LayerNorm() represents the layer normalization function;

[0050] FeedForward() is the forward propagation function;

[0051] E F is the encoded fine-grained feature representation.

[0052] Preferably, in the method for establishing the wafer defect detection model, the step of fusing the coarse-grained feature representation and the fine-grained feature representation and outputting various defect parameters and weights corresponding to the various defect parameters includes:

[0053] According to the coarse-grained feature representation and the fine-grained feature representation, the loss function is optimized by back propagation, and various defect parameters and weights corresponding to the various defect parameters are output;

[0054] Among them, the loss function is:

[0055] ;

[0056] in,

[0057] p ci is the true label c of sample i i probability;

[0058] q ci is the model's predicted probability for the sample;

[0059] W ci is the weight;

[0060] N is the number of samples.

[0061] Preferably, in the method for establishing the wafer defect detection model, the step of respectively determining the coarse-grained sample image and the fine-grained sample image according to the wafer image comprises:

[0062] According to the wafer image, feature extraction is performed based on the division of scale space to obtain sample images of different scales as coarse-grained sample images;

[0063] According to the wafer image, convolution kernels with different kernel sizes are adopted based on the convolution branch to capture local information of the wafer image as a fine-grained sample image.

[0064] Preferably, in the method for establishing the wafer defect detection model, the step of extracting features based on the wafer image and obtaining sample images of different scales as coarse-grained sample images based on the division of scale space comprises:

[0065] According to the wafer image, a Gaussian pyramid is used to generate sample images Z∈R of different scales H×W×C ;

[0066] Among them, H, W, and C represent the height, width, and number of channels of the image respectively.

[0067] Preferably, in the method for establishing the wafer defect detection model, before the step of coarse-grained feature learning in the step of inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting the coarse-grained feature representation and the fine-grained feature representation, and after the step of determining the coarse-grained sample image and the fine-grained sample image respectively according to the wafer image, the establishment method comprises:

[0068] The sample image Z is Gaussian filtered by a Gaussian filter to obtain ρ(Z, σ), where the kernel function used in the Gaussian filter is k(σ), and the formula is as follows:

[0069] ;

[0070] Use the Gaussian pyramid to downsample ρ(Z,σ) to generate a downsampled image D(Z);

[0071] The Laplacian pyramid is used to represent the detail information of the downsampled image. The Laplacian pyramid is as follows:

[0072] ;

[0073] Where, σ is the standard deviation of the Gaussian kernel;

[0074] x and y represent the horizontal and vertical coordinates respectively;

[0075] L(Z,σ) is the detail information of the sampled image;

[0076] Z is the sample image, that is, the original image.

[0077] In order to achieve the above object, the present invention also provides a method for detecting wafer defects, the method comprising:

[0078] Acquire an image of a wafer to be inspected;

[0079] Input the wafer image to be inspected into the detection model established by the above-mentioned method for establishing a wafer defect detection model, and output various defect parameters and weights corresponding to the various defect parameters;

[0080] Sort various defect parameters and their corresponding weights;

[0081] According to the order of the defect parameter weights, the defect parameters of the wafer to be inspected are compared.

[0082] In order to achieve the above object, the present invention further provides a computer device, the computer device comprising:

[0083] at least one processor; and,

[0084] a memory communicatively connected to the at least one processor; wherein,

[0085] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for establishing a wafer defect detection model or the above-mentioned method for detecting wafer defects.

[0086] In order to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned method for establishing a wafer defect detection model or the above-mentioned method for detecting wafer defects.

[0087] The present invention has at least the following beneficial effects:

[0088] The method for establishing a wafer defect detection model provided by the present invention comprises the following steps: obtaining a wafer image; determining a coarse-grained sample image and a fine-grained sample image respectively according to the wafer image; inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a pre-established fine-grained feature learning model respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation respectively; performing feature fusion on the coarse-grained feature representation and the fine-grained feature representation, and outputting various defect parameters and weights corresponding to the various defect parameters, so that defects can be quickly screened out;

[0089] Furthermore, the Transformer network is used as the basic framework, and the self-attention mechanism is adopted to model the dependencies between the wafer surface image sequence data. At the same time, the wafer surface image is divided into image blocks of different scales through a multi-granularity processing strategy, and these image blocks are processed step by step to capture features at different levels;

[0090] Furthermore, the model uses the self-attention mechanism of Transformer to accurately capture dependencies in image sequences. The self-attention mechanism better models long-distance dependencies in images by automatically learning the correlation between each position and other positions in the image sequence. This feature enables the model to effectively identify local and global features in wafer surface images and improve the accuracy of defect detection. Secondly, a multi-granularity processing strategy is adopted to divide the wafer surface image into image blocks of different scales. This strategy helps to extract features at different levels in the image. By processing these image blocks step by step, the model can capture detailed information of different granularities, thereby more comprehensively understanding the defects on the wafer surface. This processing strategy not only improves the model's perception of wafer surface defects, but also improves the sensitivity and accuracy of the model's defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 It is a flow chart of a first implementation method of a method for establishing a wafer defect detection model of the present invention;

[0092] Figure 2 It is a flow chart of a second embodiment of a method for establishing a wafer defect detection model according to the present invention;

[0093] Figure 3 It is a flow chart of a third embodiment of a method for establishing a wafer defect detection model according to the present invention;

[0094] Figure 4 It is a flow chart of a fourth embodiment of a method for establishing a wafer defect detection model according to the present invention;

[0095] Figure 5 It is a schematic flow chart of a first embodiment of a method for detecting wafer defects of the present invention;

[0096] Figure 6 FIG. 1 is a schematic diagram of a computer device according to a first embodiment of the present invention.

[0097] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0098] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0099] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0100] In the embodiments of the present invention, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0101] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it can be understood by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present invention can also be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0102] In order to solve the above problems, the present embodiment relates to a method for establishing a wafer defect detection model, which can be applied to computer equipment. The computer equipment can be a desktop computer, a tablet computer, a notebook computer, and other electronic devices with data processing capabilities. In other embodiments, it can also be other electronic devices with data processing capabilities, and no specific restrictions are made here.

[0103] The implementation details of the method for establishing a wafer defect detection model according to the first embodiment of the present invention are described below. The following content is only the implementation details provided for ease of understanding and is not necessary for implementing this solution.

[0104] The specific process of this implementation is as follows: Figure 1 As shown, specifically including:

[0105] Step S100, acquiring a wafer image;

[0106] Step S200, determining a coarse-grained sample image and a fine-grained sample image respectively according to the wafer image;

[0107] It should be understood that the wafer surface image is divided into image blocks of different scales through a multi-granularity processing strategy, and these image blocks are processed step by step to capture features at different levels. A multi-granularity processing strategy is adopted to divide the wafer surface image into image blocks of different scales. This strategy helps to extract features at different levels in the image. By processing these image blocks step by step, the model can capture detailed information of different granularities, thereby more comprehensively understanding the defects on the wafer surface. This processing strategy not only improves the model's perception of wafer surface defects, but also improves the sensitivity and accuracy of the model's defect detection.

[0108] It should be noted that coarse-grained feature learning is based on the scale space division method to perform feature extraction; while fine-grained feature learning includes two steps: convolution branch and feature merging. The convolution branch captures the local information of the image by using convolution kernels of different kernel sizes.

[0109] Specifically, step S200 includes:

[0110] According to the wafer image, feature extraction is performed based on the division of scale space to obtain sample images of different scales as coarse-grained sample images;

[0111] According to the wafer image, convolution kernels with different kernel sizes are adopted based on the convolution branch to capture local information of the wafer image as a fine-grained sample image.

[0112] The step of extracting features based on the wafer image and dividing the scale space to obtain sample images of different scales as coarse-grained sample images includes:

[0113] According to the wafer image, a Gaussian pyramid is used to generate sample images Z∈R of different scales H×W×C ;

[0114] Among them, H, W, and C represent the height, width, and number of channels of the image respectively.

[0115] Step S300, inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation, respectively;

[0116] It should be understood that before step S300 and after step S200, the coarse-grained features further include:

[0117] The sample image Z is Gaussian filtered by a Gaussian filter to obtain ρ(Z, σ), where the kernel function used in the Gaussian filter is k(σ), and the formula is as follows:

[0118] ;

[0119] Use the Gaussian pyramid to downsample ρ(Z,σ) to generate a downsampled image D(Z);

[0120] The Laplacian pyramid is used to represent the detail information of the downsampled image. The Laplacian pyramid is as follows:

[0121] ;

[0122] Where, σ is the standard deviation of the Gaussian kernel;

[0123] x and y represent the horizontal and vertical coordinates respectively;

[0124] L(Z,σ) is the detail information of the sampled image;

[0125] Z is the sample image, that is, the original image.

[0126] Step S400: Fusing the coarse-grained feature representation and the fine-grained feature representation, and outputting various defect parameters and weights corresponding to the various defect parameters.

[0127] The method for establishing a wafer defect detection model provided by the present invention comprises the following steps: obtaining a wafer image; determining a coarse-grained sample image and a fine-grained sample image respectively according to the wafer image; inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a pre-established fine-grained feature learning model respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation respectively; performing feature fusion on the coarse-grained feature representation and the fine-grained feature representation, and outputting various defect parameters and weights corresponding to the various defect parameters, so that defects can be quickly screened out;

[0128] Furthermore, the Transformer network is used as the basic framework, and the self-attention mechanism is adopted to model the dependencies between the wafer surface image sequence data. At the same time, the wafer surface image is divided into image blocks of different scales through a multi-granularity processing strategy, and these image blocks are processed step by step to capture features at different levels;

[0129] Furthermore, the model uses the self-attention mechanism of Transformer to accurately capture dependencies in image sequences. The self-attention mechanism better models long-distance dependencies in images by automatically learning the correlation between each position and other positions in the image sequence. This feature enables the model to effectively identify local and global features in wafer surface images and improve the accuracy of defect detection. Secondly, a multi-granularity processing strategy is adopted to divide the wafer surface image into image blocks of different scales. This strategy helps to extract features at different levels in the image. By processing these image blocks step by step, the model can capture detailed information of different granularities, thereby more comprehensively understanding the defects on the wafer surface. This processing strategy not only improves the model's perception of wafer surface defects, but also improves the sensitivity and accuracy of the model's defect detection.

[0130] like Figure 2 As shown, Figure 2 The second embodiment of the method for establishing a wafer defect detection model of the present invention is illustrated. Based on the first embodiment, the step of coarse-grained feature learning in step S300 includes:

[0131] Step S310, merging adjacent regions and updating the merged region features according to the coarse-grained sample image;

[0132] It should be understood that by measuring the similarity of adjacent regions and merging regions with higher similarity, redundant data is reduced. In this embodiment, a region similarity measurement function is introduced to determine whether regions need to be merged.

[0133] Specifically, the step S310 includes:

[0134] According to the preset similarity measurement model, the similarity of adjacent regions is determined; the formula for similarity measurement is as follows:

[0135] ;

[0136] When the determined similarity is greater than the preset threshold, it is determined to merge the adjacent regions, and the merging function is as follows:

[0137] ;

[0138] Update the merged regional features, and the update formula is as follows:

[0139] ;

[0140] in,

[0141] S(R i ,R j ) is the region R i and region R j Similarity measurement function of ;

[0142] The mean μ(R) of region R is calculated as follows:

[0143] ;

[0144] I(x, y) is the coarse-grained sample image;

[0145] G(merged_region) is the merged region feature.

[0146] The region R is measured by the similarity measurement function i and region R j In order to merge adjacent regions (regions with higher similarity), the merge function is used to merge regions Ri and Rj into a new region merged_region. The setting of the preset threshold can effectively control the stop condition of region merging, and can control the preset threshold of similarity. When the similarity of two adjacent regions is less than the preset threshold, the merging is stopped.

[0147] Step S320, determining the coarse-grained feature representation using the self-attention mechanism based on the merged regional features.

[0148] It should be understood that the final coarse-grained feature representation is determined by introducing a self-attention mechanism. The self-attention mechanism better models long-range dependencies in the image by automatically learning the correlation between each position and other positions in the image sequence. This property enables the model to effectively identify local and global features in wafer surface images and improve the accuracy of defect detection.

[0149] In specific implementation, the calculation process includes:

[0150] ;

[0151] ;

[0152] ;

[0153] ;

[0154] in,

[0155] MutiHeadAttention() is the multi-head self-attention function;

[0156] G is the regional feature after merging;

[0157] LayerNorm() represents the layer normalization function;

[0158] FeedForward() is the forward propagation function. Usually FeedForward() consists of two fully connected layers and an activation function.

[0159] E G It is a coarse-grained feature representation.

[0160] Define the merged regional feature G of the input, perform self-attention calculation on G, and obtain the encoded coarse-grained feature representation E G .

[0161] like Figure 3 As shown, Figure 3 The third embodiment of the method for establishing a wafer defect detection model of the present invention is illustrated. Based on the first embodiment, the step of fine-grained feature learning in step S300 includes:

[0162] Step S330, performing a convolution operation on the fine-grained sample image to obtain output features of different convolution sub-branches;

[0163] It should be understood that the convolution branch captures the local information of the image by using convolution kernels of different kernel sizes. In this embodiment, the convolution kernel sizes are set to 3×3, 5×5, and 7×7, and the number of channels is set to K. After the convolution operation, F3∈R H×W×K , F5∈R H×W×K , F7∈R H×W×K , where H and W are the height and width of the input fine-grained sample image, respectively.

[0164] Step S340, merging the output features of different convolution sub-branches to obtain merged fine-grained features;

[0165] It should be understood that merging the output features of different convolution sub-branches means concatenating and merging the output features of different convolution sub-branches. Taking the three convolution kernel sizes set above as an example, concatenating F3, F5, and F7 to obtain the merged fine-grained feature F∈R H×W×(3K) .

[0166] In step S350, the merged fine-grained features are subjected to self-attention calculation to obtain an encoded fine-grained feature representation.

[0167] It should be understood that the merged fine-grained features F are calculated through self-attention to obtain the encoded fine-grained feature representation E F .

[0168] In specific implementation, the calculation process is as follows:

[0169] ;

[0170] ;

[0171] ;

[0172] ;

[0173] in,

[0174] MutiHeadAttention() is the multi-head self-attention function;

[0175] F is the merged fine-grained feature;

[0176] LayerNorm() represents the layer normalization function;

[0177] FeedForward() is the forward propagation function;

[0178] E F is the encoded fine-grained feature representation.

[0179] like Figure 4 As shown, Figure 4 The fourth embodiment of the method for establishing a wafer defect detection model of the present invention is illustrated. Based on the first embodiment, the step S400 includes:

[0180] Step S410, optimizing the loss function through back propagation according to the coarse-grained feature representation and the fine-grained feature representation, and outputting various defect parameters and weights corresponding to the various defect parameters;

[0181] Among them, the loss function is:

[0182] ;

[0183] in,

[0184] p ci is the true label c of sample i i probability;

[0185] q ci is the model's predicted probability for the sample;

[0186] W ci is the weight;

[0187] N is the number of samples.

[0188] In the specific implementation, in order to process the coarse-grained features, the input feature E G After three linear transformation mapping processes, three matrices are generated: query matrix Q c , key matrix K c Sum value matrix V c ; Similarly, for fine-grained features, input feature E F After three linear transformation mapping processes, three matrices are generated: query matrix Q f , key matrix K f Sum value matrix V f .

[0189] The coarse-grained feature transformation can be expressed as:

[0190] Q c =E G *W Q1 ;

[0191] K c =E G *W K1 ;

[0192] V c =E G *W V1 ;

[0193] The fine-grained feature transformation can be expressed as:

[0194] Q f =E F *W Q2 ;

[0195] K f =E F *W K2 ;

[0196] V f =E F *W V2 ;

[0197] Among them, W Q1 , W Q2 , W K1 , W K2 , W V1 , and W V2 ∈R D×D .

[0198] These matrices are input into the attention mechanism for cross-learning, and the process is as follows:

[0199] ;

[0200] ;

[0201] where 1 / sqrt(d) is a scaling factor used for proper normalization.

[0202] The feature Attention (E G )、Attention(E F ) The loss function is optimized through back propagation, and various defect parameters and their corresponding weights are output.

[0203] During the training process, the improved cross entropy loss is used for model optimization. Specifically, the number of samples N is defined, and sample i belongs to category c i For each category c, the weight W is introduced c , which is used to adjust the contribution of this category in the loss function. By adjusting the weight W c The model can control the importance of each category in the loss function, W c The value of is set according to the frequency of occurrence of the category, so that the samples of the minority category have a higher weight, and the model can pay more attention to the learning of the minority category. Through the elastic feature fusion module, this module uses an adaptive weight mechanism to dynamically adjust the weight of the feature according to the importance of features of different granularities. This module can ensure that the model can fuse features of different granularities in a targeted manner, avoid excessive attention to or neglect of certain key features, and improve the robustness and adaptability of the model.

[0204] In order to solve the above problems, the present embodiment relates to a wafer defect detection method, which can be applied to computer equipment. The computer equipment can be a desktop computer, a tablet computer, a notebook computer, and other electronic devices with data processing capabilities. In other embodiments, it can also be other electronic devices with data processing capabilities, and no specific restrictions are made here.

[0205] The implementation details of the wafer defect detection method of the first embodiment of the present invention are described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.

[0206] The specific process of this implementation is as follows: Figure 5 As shown, specifically including:

[0207] Step S500, obtaining an image of a wafer to be inspected;

[0208] Step S600, inputting the wafer image to be inspected into the detection model established by the above-mentioned method for establishing a wafer defect detection model, and outputting various defect parameters and weights corresponding to the various defect parameters;

[0209] It should be understood that the embodiment provided by the present invention includes the embodiment of the above-mentioned method for establishing a wafer defect detection model, and the beneficial effects of the above-mentioned method for establishing a wafer defect detection model can also be applied to this embodiment.

[0210] Step S700, sorting various defect parameters and the weights corresponding to the various defect parameters;

[0211] Step S800 , comparing the defect parameters of the wafer to be inspected according to the order of the defect parameter weights.

[0212] It should be understood that according to the weight ranking of various defect parameters, defect parameters with large weights can be compared first to reduce the amount of calculation and facilitate rapid and accurate defect finding. It can be to find one or several defect parameters with the largest weights, which can be set according to needs.

[0213] In order to achieve the above object, the present invention also provides a computer device, such as Figure 6 As shown, the computer device includes at least one processor 901; and a memory 902 communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions executable by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the above-mentioned method for establishing a wafer defect detection model or the above-mentioned method for detecting wafer defects.

[0214] Among them, the memory 902 and the processor 901 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 901 and the memory 902 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art, and therefore, are not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 901 is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor 901.

[0215] The processor 901 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 902 can be used to store data used by the processor 901 when performing operations.

[0216] In order to achieve the above-mentioned purpose, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned method for establishing a wafer defect detection model or the above-mentioned method for detecting wafer defects.

[0217] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned implementation method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each implementation of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0218] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, ordinary technicians in this field can make other different forms of changes or modifications without creative work, which should fall within the scope of protection of the present invention.

Claims

1. A method for establishing a wafer defect detection model, characterized in that: include: Acquire wafer images; According to the wafer image, a coarse-grained sample image and a fine-grained sample image are respectively determined, including extracting features based on the scale space division according to the wafer image to obtain sample images of different scales as the coarse-grained sample image; according to the wafer image, using convolution kernels of different kernel sizes based on the convolution branch to capture local information of the wafer image as the fine-grained sample image; Inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation, respectively; The coarse-grained feature representation and the fine-grained feature representation are subjected to feature fusion, and various defect parameters and weights corresponding to the various defect parameters are output; Among them, the steps of coarse-grained feature learning include: According to the coarse-grained sample image, adjacent regions are merged and the features of the merged regions are updated; Based on the merged regional features, the self-attention mechanism is used to determine the coarse-grained feature representation; The steps of fine-grained feature learning include: The fine-grained sample image is convolved to obtain the output features of different convolution sub-branches; Merge the output features of different convolution sub-branches to obtain the merged fine-grained features; The merged fine-grained features are subjected to self-attention calculation to obtain the encoded fine-grained feature representation.

2. The method for establishing a wafer defect detection model according to claim 1, wherein: The step of merging adjacent regions and updating the features of the merged regions according to the coarse-grained sample image specifically includes: According to the preset similarity measurement model, the similarity of adjacent regions is determined; the formula for similarity measurement is as follows: ; When the determined similarity is greater than the preset threshold, it is determined to merge the adjacent regions, and the merging function is as follows: ; Update the merged regional features, and the update formula is as follows: ; in, S(R i ,R j ) is the region R i and region R j Similarity measurement function of ; The mean μ(R) of region R is calculated as follows: ; I(x, y) is the coarse-grained sample image; G(merged_region) is the merged region feature.

3. The method for establishing a wafer defect detection model according to claim 1, wherein: In the step of determining the coarse-grained feature representation using the self-attention mechanism based on the merged regional features, the calculation process includes: ; ; ; ; in, MutiHeadAttention() is the multi-head self-attention function; G is the regional feature after merging; LayerNorm() represents the layer normalization function; FeedForward() is the forward propagation function; E G It is a coarse-grained feature representation.

4. The method for establishing a wafer defect detection model according to claim 1, wherein: In the step of performing self-attention calculation on the merged fine-grained features to obtain the encoded fine-grained feature representation, the calculation process is as follows: ; ; ; ; in, MutiHeadAttention() is the multi-head self-attention function; F is the merged fine-grained feature; LayerNorm() represents the layer normalization function; FeedForward() is the forward propagation function; E F is the encoded fine-grained feature representation.

5. The method for establishing a wafer defect detection model according to claim 1, wherein: The step of fusing the coarse-grained feature representation and the fine-grained feature representation to output various defect parameters and weights corresponding to the various defect parameters includes: According to the coarse-grained feature representation and the fine-grained feature representation, the loss function is optimized by back propagation, and various defect parameters and weights corresponding to the various defect parameters are output; Among them, the loss function is: ; in, p ci is the true label c of sample i i probability; q ci is the model's predicted probability for the sample; W ci is the weight; N is the number of samples.

6. The method for establishing a wafer defect detection model according to claim 1, wherein: The step of extracting features based on the wafer image and dividing the scale space to obtain sample images of different scales as coarse-grained sample images includes: According to the wafer image, a Gaussian pyramid is used to generate sample images Z∈R of different scales H×W×C ; Among them, H, W, and C represent the height, width, and number of channels of the image respectively.

7. The method for establishing a wafer defect detection model according to claim 6, wherein: In the step of inputting the coarse-grained sample image and the fine-grained sample image into a pre-established coarse-grained feature learning model and a fine-grained feature learning model, respectively, and outputting a coarse-grained feature representation and a fine-grained feature representation, respectively, before the step of coarse-grained feature learning, and after the step of determining the coarse-grained sample image and the fine-grained sample image, respectively, according to the wafer image, the establishment method comprises: The sample image Z is Gaussian filtered by a Gaussian filter to obtain ρ(Z, σ), where the kernel function used in the Gaussian filter is k(σ), and the formula is as follows: ; Use the Gaussian pyramid to downsample ρ(Z,σ) to generate a downsampled image D(Z); The Laplacian pyramid is used to represent the detail information of the downsampled image. The Laplacian pyramid is as follows: ; Where, σ is the standard deviation of the Gaussian kernel; x and y represent the horizontal and vertical coordinates respectively; L(Z,σ) is the detail information of the sampled image; Z is the sample image, that is, the original image.

8. A method for detecting wafer defects, characterized in that: include: Acquire an image of a wafer to be inspected; Input the wafer image to be inspected into the detection model established by the method for establishing a wafer defect detection model according to any one of claims 1 to 7, and output various defect parameters and weights corresponding to the various defect parameters; Sort various defect parameters and their corresponding weights; According to the order of the defect parameter weights, the defect parameters of the wafer to be inspected are compared.

9. A computer device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for establishing a wafer defect detection model as described in any one of claims 1 to 7, or the method for detecting wafer defects as described in claim 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method for establishing a wafer defect detection model as described in any one of claims 1 to 7, or the method for detecting wafer defects as described in claim 8.

Citation Information

Patent Citations

  • Power transmission line defect intelligent identification method and system based on deep learning

    CN112950576A

  • Wafer detection method and device and storage medium

    CN113538392A