Method for detecting wafer defects, storage medium, equipment and program product

By introducing position coding and position attention modules into the wafer detection model, the problem of insufficient discrimination ability of wafer defects with similar appearances but different positions in the prior art is solved, and higher defect classification accuracy is achieved.

CN119693370AInactive Publication Date: 2025-03-25SHENZHEN ZHIXIAN FUTURE IND SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510206168.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When faced with defects with similar appearances and different positions, existing wafer detection methods have poor distinction capabilities and are difficult to accurately identify and classify.

Method used

A method of detecting wafer defects is adopted, using a wafer detection model, which includes an encoder, a position attention module and a classifier. Position information is introduced through position encoding, image features are fused with position attention maps, and comprehensive features are generated to improve the accuracy of defect classification.

Benefits of technology

By introducing position information, wafer defects with similar shapes but different positions can be more accurately identified, improving the accuracy of wafer defect classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693370A_ABST
    Figure CN119693370A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for detecting wafer defects, a storage medium, equipment and a program product, a wafer detection model is used for execution, the wafer detection model comprises an encoder, a position attention module and a classifier, a to-be-detected image is acquired, image features corresponding to the to-be-detected image are determined through the encoder, and the image features corresponding to the to-be-detected image are determined through the position attention module. Determining a position attention map corresponding to the image features according to the image features and the position codes; the position attention graph and the image features are fused, comprehensive features are obtained, position codes represent the corresponding relation between elements in the image features and positions in the to-be-detected image, the defect type of the to-be-detected image is determined through a classifier according to the comprehensive features, and in the wafer defect detection process, the defect types of the to-be-detected image are determined through the position codes. Position information is introduced as assistance, the difference between wafer defects with other similar elements and different positions can be identified more accurately, and the accuracy of wafer defect classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of data processing technology, and more specifically, to a method, storage medium, device, and program product for detecting wafer defects. Background Art

[0002] Due to the limitation of manufacturing process, various types of defects will inevitably occur in the process of manufacturing semiconductor wafers, which will have a certain impact on the performance and reliability of the chip. Different types of defects require different treatment measures for the wafers. For example, defects that damage the active area on the chip are likely to cause the produced chips to be scrapped.

[0003] At present, the existing wafer inspection methods mostly rely on the edge information, shape information, color information and texture information of the wafer extracted image to determine whether the wafer has defects and further distinguish the types of defects. The above-mentioned wafer inspection methods have poor distinguishing ability when facing defects with similar appearance but different locations.

[0004] Therefore, the present invention provides a method, storage medium, device and program product for detecting wafer defects. Summary of the invention

[0005] The embodiments of this specification are intended to provide a method, storage medium, device and program product for detecting wafer defects.

[0006] In one aspect, the present specification provides a method for detecting wafer defects, the method being performed using a wafer detection model, the wafer detection model including an encoder, a position attention module and a classifier, the method comprising: Acquire the image to be detected; Determining, by means of the encoder, image features corresponding to the image to be detected; Determine, by the position attention module, a position attention map corresponding to the image feature according to the image feature and the position code; and fuse the position attention map with the image feature to obtain a comprehensive feature, wherein the position code represents the correspondence between each element in the image feature and each position in the image to be detected; The defect type of the image to be detected is determined by the classifier according to the comprehensive features.

[0007] In some implementations, the position coding specifically includes: a position coding matrix, and the value of any element in the position coding matrix is ​​determined according to the row number and column number corresponding to the element.

[0008] In some implementations, the position coding matrix specifically includes: a row coding matrix in which the values ​​of elements in the same row are the same and the values ​​of elements in each row increase or decrease row by row, and / or a column coding matrix in which the values ​​of elements in the same column are the same and the values ​​of elements in each column increase or decrease column by column.

[0009] In some implementations, the image features specifically include: a number of image feature matrices corresponding to a number of channels; Determining a position attention map corresponding to the image feature according to the image feature and the position encoding specifically includes: The position code is used as an image feature matrix of a newly added channel and the plurality of image feature matrices are superimposed on the channel dimension to obtain a first position feature of N channels; Perform feature processing on the first position feature to determine a position attention map corresponding to the image feature.

[0010] In some implementations, performing feature processing on the first position feature includes: The first position feature is convolved using an N-channel 1×1 dimensional convolution kernel, and the convolution result is activated to obtain the position attention map.

[0011] In some implementations, the dimension of the position attention map is the same as the dimension of the image feature matrix; The position attention map is fused with the image features to obtain comprehensive features, specifically including: The image feature is positionally multiplied with the position attention map, and the calculation result of the positional multiplication is positionally added to the image feature to obtain a comprehensive feature.

[0012] In some implementations, the method further includes: Acquire a training sample, wherein the training sample includes a sample defect image and a defect label corresponding to the sample defect image; Determining, by means of the encoder, a sample image feature corresponding to the sample defect image; Determine, by the position attention module, a sample position attention map corresponding to the sample image feature according to the sample image feature and the position code; and fuse the sample position attention map with the sample image feature to obtain a sample comprehensive feature; Determining, based on the comprehensive features of the sample, a prediction score of each defect type corresponding to the sample defect image; The wafer inspection model is trained according to the prediction score and the defect label.

[0013] A second aspect of the present specification 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.

[0014] A third aspect of the specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.

[0015] A fourth aspect of the present specification provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0016] In the solution for detecting wafer defects provided in the embodiments of this specification, position information is introduced as an aid through position coding during the process of detecting wafer defects, which can more accurately identify the differences between wafer defects with similar other elements but different positions, thereby improving the accuracy of wafer defect classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of this specification, 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 recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 is a schematic structural diagram of a wafer provided by an embodiment of the present invention; Figure 2 It is a structural schematic diagram of a wafer detection model provided by an embodiment of the present invention; Figure 3 It is a flow chart of a method for detecting wafer defects provided by an embodiment of the present invention; Figure 4 It is a structural diagram of row coding and column coding provided by an embodiment of the present invention; Figure 5 is a schematic diagram of a flow chart of performing convolution processing on a first position feature provided by an embodiment of the present invention; Figure 6 It is a flowchart of a method for training a wafer inspection model provided by an embodiment of the present invention; Figure 7 It is a schematic diagram of a specific process of determining a defect type corresponding to an image to be detected provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0020] Wafer manufacturing is a critical link in the semiconductor industry. It can process high-purity semiconductor materials into wafers with tiny circuit structures for the manufacture of various chips. In order to ensure the yield rate of the produced wafers, the manufacturer needs to conduct quality inspections on the produced wafers to eliminate defective wafers; further, it is necessary to identify the types of wafer defects in order to improve its own manufacturing process accordingly.

[0021] In traditional image processing, feature extraction methods are usually used to extract edge information, shape information, color information, texture information and other elements of the image, and then classify the image accordingly. In the field of wafer inspection, there is another key element, which is different from traditional image processing: defect location, because whether the defect damages the key area has important guiding significance for the classification of wafer defects. Figure 1 The schematic diagram of the wafer structure shows that the dotted line indicates the active area, which is the key area in the semiconductor device for realizing active functions (such as amplification, switching, etc.). The area between each active area is the scribe groove. Even defects of the same shape will have different effects on the performance of the wafer depending on whether they damage the active area.

[0022] Therefore, it is difficult to achieve an ideal classification effect by directly using traditional image processing methods to detect wafer defects. This specification provides a method for detecting wafer defects, which can identify the defect type of the wafer to be inspected shown in the image to be inspected. The method can be executed using a server or a computing device with computing capabilities. For the convenience of expression, the following description only uses the server as the execution entity.

[0023] Figure 2A schematic diagram of the structure of a wafer inspection model in this specification is shown. The wafer inspection model can be arranged in a server. The wafer inspection model can be formed based on a convolutional neural network (CNN), for example, and can specifically include an encoder, a position attention module and a classifier. The encoder can be used to process the image to be inspected input into the wafer inspection model and encode the image to be inspected into image features; the position attention module can be used to use the image features and the position encoding to determine the comprehensive features containing the position information of the image to be inspected; the classifier can be used to determine the defect type of the image to be inspected based on the comprehensive features.

[0024] Figure 3 A schematic flow chart of a method for detecting wafer defects provided in this specification is shown. The method is performed using a pre-trained wafer detection model. The method includes: Step S301: Acquire an image to be detected.

[0025] First, the server can obtain the image to be detected pre-stored in the server's internal database or other communicable address, and the image to be detected can be obtained by collecting the wafer to be detected by the acquisition device. Usually, in an image to be detected, a complete wafer to be detected is displayed, so that in the subsequent step S303, the image features obtained by the wafer detection model according to the image to be detected are the image features corresponding to the complete wafer to be detected.

[0026] In some implementations, the content formats of each image to be inspected may be pre-aligned so that the sizes of each image to be inspected may be the same, the shapes and sizes of the wafers to be inspected displayed in each image to be inspected may be the same, and the wafers to be inspected in each image to be inspected may be in the same position in each image.

[0027] Therefore, the wafers to be inspected in different images to be inspected have the same corresponding relationship with each pixel of the images to be inspected, and the connection between the position coding and the image features can be enhanced in the subsequent step S305.

[0028] Step S303: Determine the image features corresponding to the image to be detected through the encoder.

[0029] After obtaining the image to be inspected, the server may input the image to be inspected into a wafer inspection model pre-deployed in the server. The encoder in the wafer inspection model may extract features from the image input, thereby encoding it into feature data.

[0030] Specifically, the encoder can be formed based on a convolutional neural network, including several convolution layers, and thus having several convolution kernels. The image to be detected can be represented as a two-dimensional or three-dimensional tensor composed of pixel values, that is, image tensor data. After such image tensor data is input into the encoder, the encoder can use the convolution kernel therein to perform a convolution operation on the image tensor data to extract the image features corresponding to the image to be detected.

[0031] Among them, the size of the convolution kernel, the number of convolution kernels, the convolution step size and padding parameters in the encoder can be determined through training, or some of the parameters can be set by the user as hyperparameters, so as to control the dimension of the image features corresponding to the image to be detected.

[0032] Step S305: Determine the position attention map corresponding to the image feature according to the image feature and the position code through the position attention module; and fuse the position attention map with the image feature to obtain a comprehensive feature, wherein the position code represents the correspondence between each element in the image feature and each position in the image to be detected.

[0033] After determining the image feature, the server can use the position attention module in the wafer inspection model to generate a position attention map and fuse it with the image feature, thereby introducing position information into the image feature.

[0034] Among them, the position code can be a pre-arranged position code matrix adapted to the dimension of the image feature. For example, when the dimension of the image feature is H×W×C (length×width×number of channels), the position code can be a tensor of H×W×n, and the value of any element in the position code matrix can represent the position coordinates of the position corresponding to the element. Therefore, because the position code representing the position information is introduced in the process of determining the position attention map using the position code and the image feature, the position attention map is fused with the image feature to obtain a comprehensive feature containing the position information and various other information extracted from the original image feature.

[0035] For example, for two defects with the same shape and color but different positions, the values ​​of the elements corresponding to the two defects in the extracted image features are the same. However, in the comprehensive features obtained after the introduction of position coding, the values ​​of the elements corresponding to the two defects are different, thereby increasing the distinction between the two defects.

[0036] In some implementations, based on the image feature and the position code, a position attention map corresponding to the image feature is determined. This may be done by directly adding or multiplying each element in the position code with each element in the image feature, or by further processing the calculation results of the bitwise addition or multiplication using an activation function. This specification does not limit this. The position attention map is fused with the image feature to obtain a comprehensive feature. The aforementioned method in this paragraph may also be used. This specification does not limit this.

[0037] Step S307: Determine the defect type of the image to be detected according to the comprehensive features.

[0038] After determining the comprehensive features, the server can use the classifier to determine the prediction scores of each defect type corresponding to the image to be detected based on the comprehensive features. The prediction scores can represent the probability of identifying the image to be detected as each defect type. Thus, the defect type with the highest corresponding probability can be determined as the defect type of the image to be detected.

[0039] Among them, according to the comprehensive feature, the defect type of the image to be detected is determined by first reducing the dimension of the comprehensive feature using the classifier, and then applying functions such as softmax to determine the probability corresponding to each defect type.

[0040] In some implementations, the classifier may include a global average pooling layer (GAP Layer), a flatten layer, and a fully connected layer (FC Layer). The global average pooling layer can convert the fused features into a three-dimensional tensor of 1×1×C, and the flatten layer can similarly flatten the 1×1×C into a one-dimensional vector. The fully connected layer can determine the probability distribution of the output result based on the one-dimensional vector input to the flatten layer.

[0041] like Figure 3 A method for detecting wafer defects is shown. In the process of detecting wafer defects, position information is introduced as an aid through position encoding, which can more accurately identify the differences between wafer defects with similar other elements but different positions, thereby improving the accuracy of wafer defect classification.

[0042] In some implementations, the position coding specifically includes: a position coding matrix, and the value of any element in the position coding matrix is ​​determined according to the row number and column number corresponding to the element.

[0043] In the position coding matrix, each element corresponds to each position in the image to be detected according to its coordinates. The coordinates can be represented by the row number and column number corresponding to the element. Therefore, the difference in row (column) numbers of two elements with similar positions is smaller, and the difference in row (column) numbers of two elements with distant positions is larger. Correspondingly, the values ​​of elements with similar positions are closer, and the position information can be accurately represented in the form of values.

[0044] Furthermore, in some implementations, the position coding matrix specifically includes: a row coding matrix in which the values ​​of elements in the same row are the same and the values ​​of elements in each row increase or decrease row by row, and / or a column coding matrix in which the values ​​of elements in the same column are the same and the values ​​of elements in each column increase or decrease column by column.

[0045] Figure 4 This is an example of a row coding matrix and a column coding matrix. Furthermore, the row coding matrix and the column coding matrix in the figure can uniquely represent the element corresponding to each position.

[0046] In some implementations, the image features specifically include: a plurality of image feature matrices corresponding to a plurality of channels, such as Figure 3 In step S305, the position code can be used as an image feature matrix of a newly added channel and the plurality of image feature matrices for channel dimension superposition to obtain a first position feature of N channels. By performing feature processing on the first position feature, a position attention map corresponding to the image feature can be obtained.

[0047] Continuing with the above example, when the dimension of the image feature is H×W×C, the position encoding can be a tensor with a dimension of H×W×n (when n=1, the position encoding is a matrix with a dimension of H×W). Therefore, the position attention module can use the position encoding as a new channel for the image feature, and superimpose the image feature and the position encoding in the channel dimension to obtain the first position feature with a dimension of H×W×N, where N=C+n.

[0048] Among them, the position attention map corresponding to the image feature can be determined by performing weighted summation on the image feature matrix of each channel in the first position feature, or by convolving the first position feature with a convolution kernel of a certain size.

[0049] Therefore, by processing the features of the first position feature, a position attention map containing position information is obtained.

[0050] Specifically, in some implementations, Figure 3 In step S305 shown, the first position feature is convolved using an N-channel 1×1 dimensional convolution kernel, and the convolution result is activated to obtain the position attention map.

[0051] like Figure 5 As shown, the position attention module can use an N-channel 1×1 dimensional convolution kernel to perform convolution processing on the first position feature, and weight the elements of the i-th row and j-th column in the matrix of each channel of the first position feature through the parameters in the convolution kernel to obtain the elements of the i-th row and j-th column in the convolution processing result, thereby determining the convolution processing result with the same dimension as the image feature matrix. Subsequently, the convolution processing result is further activated using a pre-set activation function to obtain the position attention map.

[0052] On the other hand, the dimension of the position attention map is the same as the dimension of the image feature matrix. Figure 3 In step S305 shown, the image feature and the position attention map may be positionally multiplied, and the result of the positional multiplication may be positionally added to the image feature to obtain a comprehensive feature.

[0053] Specifically, when the dimension of the image feature is H×W×C (length×width×number of channels), that is, the image feature is composed of C image feature matrices with a dimension of H×W, the dimension of the position attention map is H×W. For any image feature matrix, the element of the i-th row and j-th column in the image feature matrix is ​​multiplied with the element of the i-th row and j-th column in the position attention map, and then the multiplication result is added to the element of the i-th row and j-th column in the image feature matrix. After calculating each image feature matrix, the comprehensive feature can be obtained.

[0054] In common image processing methods, image features are often directly input into the classifier so that the classifier determines the defect type corresponding to the image to be detected based on the image features. In the method provided in this specification, on the one hand, the image features are multiplied with the position attention map to obtain the calculation result of the positional multiplication containing the position information. On the other hand, in order to minimize the compression of other elements such as edge information and shape information contained in the image features, the calculation result of the positional multiplication is added to the image features to obtain a comprehensive feature containing the position information. By using the comprehensive feature to determine the subsequent defect type, the position information can be introduced to make the classification result more accurate.

[0055] This specification also provides a method for training a wafer inspection model, which can also be executed by a server. The process of the method is as follows: Figure 6 As shown, including: S601: Acquire training samples, where the training samples include sample defect images and defect labels corresponding to the sample defect images.

[0056] Among them, the sample defect image and the image to be detected obtained in step S301 can be in the same format, so as to reduce the interference of format differences on the classification results of the trained wafer detection model; the defect label corresponding to the sample defect image can be determined by manual annotation.

[0057] S603: Determine, by means of the encoder, a sample image feature corresponding to the sample defect image.

[0058] For step S603 , specific implementation details may refer to step S303 .

[0059] It should be noted that Figure 6 The wafer inspection model in the method shown is similar to Figure 3 The wafer inspection model in the method shown has the same structure, according to Figure 6 The wafer inspection model trained by the method shown can be executed as follows Figure 3 A method for detecting wafer defects is shown.

[0060] S605: Determine, through the position attention module, a sample position attention map corresponding to the sample image feature according to the sample image feature and the position code; and fuse the sample position attention map with the sample image feature to obtain a comprehensive sample feature.

[0061] For step S605 , specific implementation details may refer to step S303 .

[0062] It should be noted that the same position code needs to be used in step S605 and step S303.

[0063] S607: Determine the prediction score of each defect type corresponding to the sample defect image according to the comprehensive characteristics of the sample.

[0064] For step S607 , specific implementation details may refer to step S307 .

[0065] It should be noted that after determining the prediction score in step S607, there is no need to further determine the defect type corresponding to the sample defect image.

[0066] S609: Training the wafer inspection model according to the prediction score and the defect label.

[0067] As mentioned above, each prediction score can represent the probability distribution of each defect type corresponding to the sample defect image. The defect label is the marked defect type corresponding to the sample defect image. According to the probability corresponding to each defect type and the marked defect type, the preset loss function can be used to determine the gradient of each model layer in the wafer inspection model, and then the wafer inspection model can be trained according to the preset learning rate and the determined gradient.

[0068] Among them, the preset loss function can be various common loss functions such as cross entropy loss, KL divergence, cosine similarity loss, etc., and this manual does not limit it here.

[0069] In some implementations, when performing Figure 6 After the wafer inspection model is trained for multiple rounds using the method shown, it can also be tested or validated.

[0070] Specifically, the complete data set can be divided into a training set, a test set, and a validation set. The representation of each sample in the data set is the same as that of the training sample. A sample includes a sample defect image and a defect label corresponding to the sample defect image. The samples in the training set can be used as training samples to perform the following operations: Figure 6 The training process is shown in the figure. The samples in the test set can be used as test samples to adjust the hyperparameters (model parameter scale, learning rate, etc.) of the wafer inspection model. The test process can refer to the following. Figure 6 The method shown in FIG. 1 is used; the samples in the validation set can be used as validation samples to validate the classification capability of the wafer detection model. The validation process can be referred to as Figure 3 Thus, several hyperparameters can be preset, and then the value of each hyperparameter can be determined during the model training process to improve the training efficiency and reduce the model calculation overhead.

[0071] like Figure 7 As shown, the specific process of determining the defect type corresponding to the image to be detected in the method provided in this specification is described below in combination with a specific embodiment.

[0072] First, obtain the image A to be detected taken by the acquisition device, and input the image A to be detected into the wafer detection model. In the first step, the encoder extracts features from the image A to be detected. The encoder includes four convolutional layers as shown in the figure to obtain image features. It can be seen from the figure that the image features include an image feature matrix of four channels. Continuing, the position attention module processes the image features to obtain comprehensive features with the same dimension as the image features. The comprehensive features are then input into the classifier, and the classifier can output the prediction score corresponding to the comprehensive features. If it is in the inference stage, the defect type of the image A to be detected can be directly determined based on the prediction score. If it is in the training stage, the cross entropy loss can be determined based on the defect label corresponding to the image A to be detected, and then the wafer detection model can be trained.

[0073] Among them, in the position attention module, the position encoding of the two channels is first superimposed with the image features of the four channels in the channel dimension to obtain the first position features of the six channels. Then, the first position features are convolved using the 1×1 convolution kernel of the six channels, and the convolution results are activated to obtain a position attention map of the same dimension as the image feature matrix. Furthermore, after the image features and the position attention map are positionally multiplied, the calculation results of the positional multiplication are further positionally added to the image features to obtain the comprehensive features.

[0074] On the other hand, in the classifier, the comprehensive features first pass through the GAP layer and the flatten layer and are reduced to a one-dimensional vector B. After the one-dimensional vector B passes through the FC layer, the prediction score is obtained.

[0075] It should be understood that the descriptions such as “first” and “second” in this article are only used to distinguish similar concepts for the sake of simplicity of description and do not have any other limiting effect.

[0076] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0077] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0078] Those of ordinary skill in the art should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Among them, the software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0079] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention 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 invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting wafer defects, characterized in that: The method is performed using a wafer inspection model, the wafer inspection model including an encoder, a position attention module and a classifier, and the method includes: Acquire the image to be detected; Determining, by means of the encoder, image features corresponding to the image to be detected; Determine, by the position attention module, a position attention map corresponding to the image feature according to the image feature and the position code; and fuse the position attention map with the image feature to obtain a comprehensive feature, wherein the position code represents the correspondence between each element in the image feature and each position in the image to be detected; The defect type of the image to be detected is determined by the classifier according to the comprehensive features.

2. The method according to claim 1, characterized in that The position coding specifically includes: a position coding matrix, and the value of any element in the position coding matrix is ​​determined according to the row number and column number corresponding to the element.

3. The method according to claim 2, characterized in that The position coding matrix specifically includes: a row coding matrix in which the values ​​of elements in the same row are the same and the values ​​of the elements in each row increase or decrease row by row, and / or a column coding matrix in which the values ​​of elements in the same column are the same and the values ​​of the elements in each column increase or decrease column by column.

4. The method according to claim 1, characterized in that The image features specifically include: a number of image feature matrices corresponding to a number of channels; Determining a position attention map corresponding to the image feature according to the image feature and the position encoding specifically includes: The position code is used as an image feature matrix of a newly added channel and the plurality of image feature matrices are superimposed on the channel dimension to obtain a first position feature of N channels; Perform feature processing on the first position feature to determine a position attention map corresponding to the image feature.

5. The method according to claim 4, characterized in that Performing feature processing on the first position feature includes: The first position feature is convolved using an N-channel 1×1 dimensional convolution kernel, and the convolution result is activated to obtain the position attention map.

6. The method according to claim 1, characterized in that The dimension of the position attention map is the same as the dimension of the image feature corresponding matrix; The position attention map is fused with the image features to obtain comprehensive features, specifically including: The image feature is positionally multiplied with the position attention map, and the calculation result of the positional multiplication is positionally added to the image feature to obtain a comprehensive feature.

7. The method according to claim 1, characterized in that Also includes: Acquire a training sample, wherein the training sample includes a sample defect image and a defect label corresponding to the sample defect image; Determining, by means of the encoder, a sample image feature corresponding to the sample defect image; Determine, by the position attention module, a sample position attention map corresponding to the sample image feature according to the sample image feature and the position code; and fuse the sample position attention map with the sample image feature to obtain a sample comprehensive feature; Determining, based on the comprehensive features of the sample, a prediction score of each defect type corresponding to the sample defect image; The wafer inspection model is trained according to the prediction score and the defect label.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

9. A computing device, comprising a memory and a processor, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Behavior recognition method based on self-attention mechanism

    CN112257572A

  • Transform-based wafer defect detection method and system

    CN115311203A

  • Wafer defect classification model training method, classification method, equipment and medium

    CN117975120A