Wafer defect image synthesis method, model training method and defect detection method
Patent Information
- Application Number
- CN202611106059.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本发明提供晶圆缺陷图像的合成方法及模型训练方法、缺陷检测方法和计算机可读存储介质,主要解决对晶圆的样本图像进行数据增强后缺陷信息和标签不匹配的技术问题
[0032] According to the wafer defect image synthesis method, wafer defect detection model training method, wafer defect detection method, and computer-readable storage medium of the above embodiments, by obtaining the two-dimensional attention weights of defect sample images and normal sample images, and based on the two-dimensional attention weights of defect sample images and normal sample images, the defect sample images and normal sample images are fused to obtain wafer defect images, and the labels of the defect sample images are used as the labels of the wafer defect images, thereby generating new training data that can be used to train the wafer defect detection model, thus realizing data augmentation. This application does not use a fixed fusion coefficient to fuse defective and normal sample images. Instead, it sets two-dimensional attention weights for each image to represent the attention level to pixels. The two-dimensional attention weight for the defective sample image characterizes the difference in attention between defective and non-defective pixels, thus distinguishing them and highlighting defect information. The two-dimensional attention weight for the normal sample image characterizes the difference in attention between normal pixels in the central and outer regions. This is because defective pixels in the defective sample image are usually located in the central region; therefore, distinguishing between normal pixels in the central and outer regions of the normal sample image prevents complete overwriting of defective pixels during fusion. Thus, the wafer defect image synthesized by this method retains defect information. Furthermore, by using the labels of the defective sample image as the labels of the wafer defect image, the image information and labels are consistent, thereby avoiding the introduction of noise into the training of the wafer defect detection model while achieving data augmentation.
Smart Images

Figure CN122928643A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semiconductor inspection technology, specifically to a method for synthesizing wafer defect images and a model training method, as well as a defect detection method. Background Technology
[0002] As the core substrate in semiconductor manufacturing, the surface quality of wafers directly affects the performance and yield of semiconductor devices, thus requiring necessary inspection. Due to the complex background of wafer surfaces, deep learning-based methods are commonly used for inspection. However, deep learning algorithms are highly dependent on training data. In actual production, defects on a single production line often concentrate in a limited number of categories, exhibiting a significant data imbalance problem. In practice, data augmentation methods are used to alleviate this problem. A representative method is to multiply defect-free data and defective data separately by a fusion coefficient of 0.5, and then add them together to achieve fusion. The labels for defect-free and defective data are processed in the same way to generate labels for the fused data.
[0003] However, because defects on wafer surfaces are generally small and background textures are complex, directly enhancing the image using the methods described above will blur the categories corresponding to the enhanced image data. For example, if the original plan was to enhance and fuse a defect-free image and a defective image, the fused image might contain almost no defect information, while the label of the fused image would still have a large defect information value. This results in inconsistency between image information and labeling. Figure 1 In the diagram, Figures (a), (b), and (c) represent the defect-free image, the defective image, and the fused image, respectively. The label vectors for the defect-free and defective images are [0,1] and [1,0], respectively. Since the fusion coefficient is 0.5, the label vector for the fused image is [0.5, 0.5]. However, from... Figure 1 It can be seen that the fused image does not have obvious defect information and is more likely to be a defect-free image, while its label vector [0.5,0.5] contains a large defect information value. Therefore, adding the fused image to the training is equivalent to introducing noise into the model training, which may affect the accuracy of the model training. Summary of the Invention
[0004] This invention provides a method for synthesizing wafer defect images, a model training method, a defect detection method, and a computer-readable storage medium, mainly addressing the technical problem of mismatch between defect information and labels after data augmentation of sample images of wafers.
[0005] According to a first aspect, one embodiment provides a method for synthesizing wafer defect images, comprising:
[0006] Obtain normal sample images and their labels, as well as defective sample images and their labels;
[0007] The two-dimensional attention weights of the defective sample image and the normal sample image are obtained. The two-dimensional attention weights of the defective sample image are used to characterize the difference in attention between defective pixels and non-defective pixels in the defective sample image. The two-dimensional attention weights of the normal sample image are used to characterize the difference in attention between normal pixels in the central region and the outer region in the normal sample image.
[0008] Based on the two-dimensional attention weights of the defective sample image and the two-dimensional attention weights of the normal sample image, the defective sample image and the normal sample image are fused to obtain a wafer defect image, and the label of the defective sample image is used as the label of the wafer defect image.
[0009] In some embodiments, the two-dimensional attention weight of the normal sample image is related to the distribution of normal pixels in the image, and shows a trend of low weight for central pixels and high weight for outer pixels; the two-dimensional attention weight of the defective sample image is related to the distribution of defective pixels in the image, and shows a trend of high weight for central pixels and low weight for outer pixels.
[0010] In some embodiments, the two-dimensional attention weights of the defective sample image are configured as weights of a two-dimensional Gaussian distribution;
[0011] Alternatively, the two-dimensional attention weight of the defective sample image is configured such that the weight of pixels within a target region with a preset length and width size centered on the center pixel of the defective sample image is a preset value, and the preset value is greater than the weight value of pixels outside the target region.
[0012] In some embodiments, fusing the defective sample image and the normal sample image based on the two-dimensional attention weights of the defective sample image and the two-dimensional attention weights of the normal sample image to obtain a wafer defect image includes:
[0013] The wafer defect image is calculated using the following formula:
[0014] C = A·W + B·Q
[0015] Wherein, A is the defect sample image, W is the corresponding two-dimensional attention weight, B is the normal sample image, Q is the corresponding two-dimensional attention weight, Q is equal to 1-W or a custom matrix, and C is the wafer defect image.
[0016] In some embodiments, the two-dimensional attention weights of the defective sample image and the normal sample image are both not less than a preset effective value.
[0017] In some embodiments, the labels on the normal sample images are used to identify defect-free and defect-free areas, and the labels on the defective sample images are used to identify the type and location of defects.
[0018] According to the second aspect, one embodiment provides a method for training a wafer defect detection model, comprising:
[0019] Obtain a sample image set of the wafer, the sample image set including multiple sample images and their labels, the sample images including normal sample images and defect sample images;
[0020] A wafer defect image and its label are obtained by the wafer defect image synthesis method described in any embodiment of this document, and the wafer defect image and its label are added to the sample image set;
[0021] A neural network model is trained using the sample image set to obtain a wafer defect detection model.
[0022] In some embodiments, the labels of the sample images in the sample image set are obtained in the following ways:
[0023] Each sample image in the sample image set is input into a pre-trained feature detection model to detect defect features, and the detection result of the defect features of each sample image is used as the label of the sample image.
[0024] In some embodiments, training a neural network model using the sample image set to obtain a wafer defect detection model includes:
[0025] The network parameters of the neural network model are configured based on the network parameters of the pre-trained feature detection model, which is trained to detect defect features in the input image.
[0026] The sample images in the sample image set are input into the neural network model respectively to obtain the feature detection output results of the neural network model;
[0027] The loss function is calculated based on the labels of the sample images and the corresponding feature detection output results to obtain the loss value. The model is then judged to have converged based on the loss value. If not, the network parameters of the neural network model are updated based on the loss value. If so, the update of the network parameters of the neural network model is stopped, and the neural network model with updated network parameters is saved as a wafer defect detection model.
[0028] According to a third aspect, one embodiment provides a wafer defect detection method, comprising:
[0029] Acquire a wafer image of the wafer to be tested;
[0030] The wafer image is input into the wafer defect detection model trained by the training method of the wafer defect detection model described in any embodiment of this paper to obtain the defect detection result of the wafer to be tested.
[0031] According to a fourth aspect, one embodiment provides a computer-readable storage medium including a program that can be executed by a processor to implement a method for synthesizing wafer defect images, a method for training a wafer defect detection model, or a wafer defect detection method as described in any of the embodiments herein.
[0032] According to the wafer defect image synthesis method, wafer defect detection model training method, wafer defect detection method, and computer-readable storage medium of the above embodiments, by obtaining the two-dimensional attention weights of defect sample images and normal sample images, and based on the two-dimensional attention weights of defect sample images and normal sample images, the defect sample images and normal sample images are fused to obtain wafer defect images, and the labels of the defect sample images are used as the labels of the wafer defect images, thereby generating new training data that can be used to train the wafer defect detection model, thus realizing data augmentation. This application does not use a fixed fusion coefficient to fuse defective and normal sample images. Instead, it sets two-dimensional attention weights for each image to represent the attention level to pixels. The two-dimensional attention weight for the defective sample image characterizes the difference in attention between defective and non-defective pixels, thus distinguishing them and highlighting defect information. The two-dimensional attention weight for the normal sample image characterizes the difference in attention between normal pixels in the central and outer regions. This is because defective pixels in the defective sample image are usually located in the central region; therefore, distinguishing between normal pixels in the central and outer regions of the normal sample image prevents complete overwriting of defective pixels during fusion. Thus, the wafer defect image synthesized by this method retains defect information. Furthermore, by using the labels of the defective sample image as the labels of the wafer defect image, the image information and labels are consistent, thereby avoiding the introduction of noise into the training of the wafer defect detection model while achieving data augmentation. Attached Figure Description
[0033] Figure 1 These are defect-free images, defective images, and images obtained by fusing defect-free and defective images based on a fusion coefficient.
[0034] Figure 2 This is a flowchart of a method for synthesizing wafer defect images in one embodiment;
[0035] Figure 3 The attention weights are a two-dimensional Gaussian distribution.
[0036] Figure 4 The wafer defect image is a composite image of a defect-free image, a defective image, and a wafer defect image synthesized by the method for synthesizing wafer defect images based on this application.
[0037] Figure 5 A flowchart illustrating a method for training a wafer defect detection model according to one embodiment;
[0038] Figure 6 This is a flowchart illustrating how a sample image set is used to train a neural network model to obtain a wafer defect detection model in some embodiments.
[0039] Figure 7 This is a flowchart of a wafer defect detection method according to one embodiment. Detailed Implementation
[0040] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.
[0041] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0042] The serial numbers assigned to components in this document, such as "first," "second," etc., are used only to distinguish the described objects and have no sequential or technical meaning. They should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. "A plurality of" means two or more. Unless otherwise specified, the terms "connection" and "linkage" in this invention include both direct and indirect connections (linkages).
[0043] The technical solution of this application utilizes the characteristics of defect features on sample images of wafers to provide a method for synthesizing wafer defect images. This method can synthesize new wafer defect images using normal sample images and defect sample images, thereby alleviating the problem of imbalanced training data and avoiding the problems caused by traditional data augmentation methods.
[0044] The technical concept of this application mainly includes two points. First, it introduces local attention weights, i.e., two-dimensional attention weights. Unlike the fusion coefficients used in traditional data augmentation methods, the two-dimensional attention weights introduced in this application can characterize the differences in attention to local regions in an image. The two-dimensional attention weights can be configured according to the distribution of defect features and normal texture features in the image, so that regions related to defect features have different attention levels than other regions in the image. Second, it directly performs category coverage on the fused image; that is, instead of fusing the labels of the two images in the same way as image fusion, it directly uses the labels of the defect sample image as the labels of the synthesized wafer defect image.
[0045] Please refer to Figure 2 The method for synthesizing wafer defect images in some embodiments of this application includes steps 110 to 130, which will be described in detail below.
[0046] Step 110: Obtain normal sample images and their labels, as well as defective sample images and their labels.
[0047] Normal sample images are obtained by imaging a wafer with no surface defects. Labels on normal sample images identify defect-free areas. Defect sample images are obtained by imaging a wafer with surface defects. Labels on defect sample images identify the type and location of defects, such as scratches or cracks. Labels on defect sample images can be represented by image images with the same dimensions as the defect sample image. For example, the label image of a defect sample image can be an image with the same dimensions as the defect sample image. Each pixel in the label image has a value of 0 or 1. A pixel value of 1 indicates that the pixel at the corresponding location in the defect sample image is a defect pixel, and a pixel value of 0 indicates that the pixel at the corresponding location in the defect sample image is a non-defect pixel. The type of defect can be identified on the label image using text and graphic markings. Normal sample images contain only normal pixels and have virtually no defect pixels. Therefore, labels on normal sample images can be represented by an image with all pixel values of 0, indicating that there are no defects in the normal sample image, and the defect-free area represents the entire normal sample image.
[0048] Step 120: Obtain the two-dimensional attention weights of the defective sample image and the two-dimensional attention weights of the normal sample image.
[0049] Specifically, the two-dimensional attention weights for defective sample images are used to characterize the difference in attention between defective and non-defective pixels in the defective sample image, while the two-dimensional attention weights for normal sample images are used to characterize the difference in attention between normal pixels in the central region and the outer region of the normal sample image. It can be understood that the central region in the image is the area close to the center of the image, while the outer region is the area surrounding the central region and close to the image edge.
[0050] In some embodiments, the two-dimensional attention weights include the weights of each pixel in the image, used to characterize the attention level of each pixel. The two-dimensional attention weights can be represented as an attention weight map the same size as the image, where the pixel value of each pixel in the attention weight map represents the weight of the pixel at the corresponding position in the image. The two-dimensional attention weights for defective sample images can be configured such that the weights of defective pixels are different from the weights of non-defective pixels; the two-dimensional attention weights for normal sample images can be configured such that the weights of pixels in the central region are different from the weights of pixels in the outer regions.
[0051] In some embodiments, the two-dimensional attention weights of the defective sample image are related to the distribution of defective pixels in the image, and show a trend of higher weights for central pixels and lower weights for outer pixels. It can be understood that central pixels are pixels close to the center of the image, and outer pixels are pixels located around the central pixels and close to the image edge.
[0052] To preserve defect information in the synthesized wafer defect image as much as possible, defect pixels can be assigned a higher weight than non-defect pixels. This embodiment takes into account the distribution characteristic that defect features in defect sample images typically appear in the central region of the image. Therefore, the two-dimensional attention weights of the defect sample image are configured with a trend of higher weights for central pixels and lower weights for outer pixels. That is, pixels closer to the image center have higher weights, and pixels farther from the image center have lower weights, which can highlight the information in the central region, thereby preserving defect information in the wafer defect image.
[0053] It should be noted that the trend of higher weight for the central pixel and lower weight for the outer pixels is a general macro trend, and fluctuations may occur in between. It is not required that the weights decrease monotonically from the central pixel to the outer pixels.
[0054] In some embodiments, the two-dimensional attention weights of the defective sample image are configured as weights distributed in a two-dimensional Gaussian pattern, and the corresponding attention weight map is shown below. Figure 3 As shown, the weights of the two-dimensional Gaussian distribution can both highlight the central region and retain a certain effective value (such as 0.5) for the weights of the outer regions. This preserves the background region, allowing for background fusion with normal sample images and improving the data augmentation effect.
[0055] In some embodiments, the two-dimensional attention weight of the defect sample image is configured such that the weight of pixels within a target region (e.g., a rectangular region) with a preset length and width size centered on the center pixel of the defect sample image is a preset value, and the preset value is greater than the weight value of pixels outside the target region.
[0056] For normal sample images, in some embodiments, the two-dimensional attention weights of normal sample images are related to the distribution of normal pixels in the image, and show a trend of low weights for central pixels and high weights for outer pixels.
[0057] By configuring the weight of the central pixel in the normal sample image to be relatively lower than that of the outer pixels, the defective pixels in the defective sample image are avoided from being covered when fused with the defective sample image. This helps to highlight the information in the central region of the defective sample image, thereby preserving the defect information.
[0058] Similarly, the trend of lower weight for the central pixel and higher weight for the outer pixels is a macroscopic trend, and it does not require the weight to increase monotonically from the central pixel to the outer pixels.
[0059] In some embodiments, the two-dimensional attention weights of the defective sample image and the normal sample image are both not less than a preset effective value (e.g., 0.5) so as to preserve the background texture information in the defective sample image and the texture information in the normal sample image, so that new texture information is generated after fusion.
[0060] Step 130: Based on the two-dimensional attention weights of the defect sample image and the two-dimensional attention weights of the normal sample image, fuse the defect sample image and the normal sample image to obtain the wafer defect image, and use the label of the defect sample image as the label of the wafer defect image.
[0061] After obtaining the two-dimensional attention weights of the defect sample image and the normal sample image, a wafer defect image can be obtained by weighted summation. Specifically, based on the two-dimensional attention weights of the defect sample image and the normal sample image, the defect sample image and the normal sample image are fused to obtain the wafer defect image, including:
[0062] The wafer defect image is calculated using the following formula:
[0063] C = A·W + B·Q
[0064] Wherein, · denotes pixel-by-pixel multiplication, A is the defect sample image, W is the corresponding two-dimensional attention weight, B is the normal sample image, Q is the corresponding two-dimensional attention weight, and C is the wafer defect image. Q can be equal to 1-W, or a user-defined matrix that conforms to the requirements of any of the above embodiments.
[0065] Please refer to Figure 4 Figures (d), (e), and (f) show a defect-free image, a defective image, and a wafer defect image synthesized using the wafer defect image synthesis method based on this application, respectively. As can be seen, the final wafer defect image integrates the texture information of the defect-free image and the background texture information of the defective image, and it does indeed have defect features. The image information is consistent with the label.
[0066] Based on the aforementioned method for synthesizing wafer defect images, this application provides a method for training a wafer defect detection model. Please refer to [the relevant documentation]. Figure 5 The training method for the wafer defect detection model in some embodiments includes the following steps 210-230.
[0067] Step 210: Obtain a sample image set of the wafer. The sample image set includes multiple sample images and their labels. The sample images include normal sample images and defective sample images.
[0068] Sample images of wafers can be obtained by capturing images of wafers on the production line during daily production. After being tagged, the sample images are compiled into a sample image set.
[0069] In some embodiments, the labels of sample images in the sample image set are obtained in the following ways:
[0070] Each sample image in the sample image set is input into a pre-trained feature detection model to detect defect features, and the detection result of the defect features of each sample image is used as the label of the sample image.
[0071] Among them, the pre-trained feature detection model is a neural network model that is pre-trained on a large-scale dataset (such as ImageNet) and has good feature detection capabilities, enabling it to detect defect features in input images. By using the pre-trained feature detection model to obtain labels for sample images, the need for a large amount of manpower to manually assign labels to sample images is eliminated, reducing costs and improving efficiency.
[0072] Step 220: Obtain a wafer defect image and its label using the wafer defect image synthesis method of any embodiment of this application, and add the wafer defect image and its label to the sample image set.
[0073] Any normal sample image and defect sample image can be extracted from the sample image set and the wafer defect image synthesis method of any embodiment of this application can be executed to generate a wafer defect image and its label, which is then added to the sample image set as a new defect sample image to participate in the training of the wafer defect detection model.
[0074] Step 230: Train a neural network model using a sample image set to obtain a wafer defect detection model.
[0075] The sample image set can be input into the neural network model sequentially to obtain the corresponding feature detection output results. The convergence of the neural network model can be determined based on the feature detection output results. The convergence of the neural network model can also be determined based on whether the model's evaluation indicators meet the standards (e.g., the loss value reaches the preset condition or the detection accuracy reaches the preset standard). If it has not converged, the network parameters of the neural network model are updated. If it has converged, the update of the network parameters of the neural network model is stopped, and the neural network model with updated network parameters is saved as the wafer defect detection model.
[0076] Please refer to Figure 6 In some embodiments, step 230 includes steps 231 to 235.
[0077] Step 231: Configure the initial network parameters of the neural network model based on the network parameters of the pre-trained feature detection model, for example, use the network parameters of the feature detection model as the initial network parameters of the neural network model.
[0078] The feature detection model is trained to detect defect features in the input image; please refer to the above description for details. By configuring the initial network parameters of the neural network model based on the network parameters of the pre-trained feature detection model, the convergence speed of the model can be accelerated.
[0079] Step 232: Input the sample images from the sample image set into the neural network model to obtain the feature detection output results of the neural network model.
[0080] Step 233: Calculate the loss function based on the labels of the sample images and the corresponding feature detection output results to obtain the loss value; determine whether the neural network model has converged based on the loss value. If not, proceed to step 234; if yes, proceed to step 235.
[0081] Before training, the loss function can be pre-set. The loss function is constructed based on the labels of the sample images and the corresponding feature detection output results. Different loss functions can be set according to different task types, such as cross-entropy loss function, mean squared error loss function, etc.
[0082] To determine whether a neural network model has converged, the loss value can be compared with a preset loss value threshold. If the loss value is less than the preset loss value threshold, the neural network model is considered to have converged; otherwise, it is considered not to have converged. Alternatively, the current loss value can be compared with the loss value updated last time. If the absolute value of the difference between the two is less than the difference threshold, the neural network model is considered to have converged; otherwise, it is considered not to have converged.
[0083] Step 234: Update the network parameters of the neural network model based on the loss value. For example, use the backpropagation method to update the parameters.
[0084] Step 235: Stop updating the network parameters of the neural network model and save the neural network model with updated network parameters as the wafer defect detection model.
[0085] Based on the wafer defect detection model training method described above, this application also provides a wafer defect detection model training method, please refer to... Figure 7 The training method for the wafer defect detection model in some embodiments includes the following steps 310-320.
[0086] Step 310: Obtain the wafer image of the wafer to be tested.
[0087] Step 320: Input the wafer image into the wafer defect detection model trained by the training method of any embodiment of this application to obtain the defect detection result of the wafer under test. The defect detection result may include the type and location of the defect, etc.
[0088] In practical applications, one specific implementation includes the following steps in the entire process from sample image collection to wafer defect detection:
[0089] Step 1: Collect a large number of sample images of wafers on the production line. These sample images include normal sample images and defect sample images of different defect categories. These sample images form a sample image set, and the sample image set is cleaned and organized as necessary.
[0090] Step 2: According to the actual needs of the detection task, set the corresponding labels for the sample images; at the same time, select a suitable neural network model, such as a classification model, object detection model or semantic segmentation model, as the base model for training the wafer defect detection model, and set the initial parameters related to model training.
[0091] Step 3: Use the wafer defect image synthesis method of this application to perform offline or online data augmentation on the sample image set, synthesize wafer defect images and their labels, add them to the sample image set, and obtain the amplified sample image set and corresponding label information;
[0092] Step 4: Train the neural network model using the sample image set until it converges (i.e., the model's evaluation metrics meet the standards, such as Top-1 accuracy of over 98% for a classification model), save it as a wafer defect detection model, and deploy it to the actual application scenario on the production line after testing and confirming that it is error-free.
[0093] Step 5: Obtain the wafer image of the wafer to be tested and input it into the wafer defect detection model to obtain the defect detection results of the wafer to be tested.
[0094] This application also provides a computer-readable storage medium including a program that can be executed by a processor to implement a method for synthesizing wafer defect images, a method for training a wafer defect detection model, or a wafer defect detection method according to any of the embodiments herein.
[0095] The wafer defect image synthesis method, model training method, defect detection method, and computer-readable storage medium provided in this application, compared with the prior art, do not use a fixed fusion coefficient to fuse defect sample images and normal sample images. Instead, they set two-dimensional attention weights for defect sample images and normal sample images respectively to represent the attention to pixels in the images. The two-dimensional attention weight of the defect sample image is used to characterize the difference in attention between defective and non-defective pixels in the defect sample image, thereby distinguishing defective and non-defective pixels and facilitating the presentation of defect information. The two-dimensional attention weight of the normal sample image is used to characterize the difference in attention between normal pixels in the central and outer regions of the normal sample image, distinguishing normal pixels in the central and outer regions to avoid completely covering defective pixels in the defect sample image during fusion. Therefore, the wafer defect image synthesized by the method of this application can retain defect information. Furthermore, by using the labels of the defect sample images as the labels of the wafer defect images, the image information and labels are consistent, thus avoiding the introduction of noise into the training of the wafer defect detection model while achieving data augmentation.
[0096] In the above embodiments, implementation can be achieved, in whole or in part, by software, hardware, firmware, or any combination thereof. Furthermore, as those skilled in the art will understand, the principles herein can be reflected in a computer program product on a computer-readable storage medium pre-loaded with computer-readable program code. Any tangible, non-transitory computer-readable storage medium may be used, including magnetic storage devices (hard disks, floppy disks, etc.), optical storage devices (CDs, DVDs, Blu-ray discs, etc.), flash memory, and / or the like. These computer program instructions can be loaded onto a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to form a machine, such that instructions executing on the computer or other programmable data processing apparatus can generate means for performing a specified function. These computer program instructions can also be stored in a computer-readable storage medium that can instruct the computer or other programmable data processing apparatus to operate in a particular manner, such that instructions stored in the computer-readable storage medium can form an article of manufacture, including means for implementing the specified function. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to perform a series of operational steps on the computer or other programmable apparatus to produce a computer-implemented process, such that instructions executing on the computer or other programmable apparatus can provide steps for implementing the specified function.
[0097] This document describes various exemplary embodiments with reference to them. However, those skilled in the art will recognize that changes and modifications can be made to the exemplary embodiments without departing from the scope of this document. For example, various operational steps and components for performing operational steps can be implemented in different ways depending on the specific application or considering any number of cost functions associated with the operation of the system (e.g., one or more steps can be deleted, modified, or combined with other steps).
[0098] While the principles herein have been illustrated in various embodiments, numerous modifications to the structures, arrangements, proportions, elements, materials, and components, particularly suited to specific environments and operational requirements, may be used without departing from the principles and scope of this disclosure. These modifications and other alterations or alterations will be included within the scope of this document. Those skilled in the art will recognize that many changes can be made to the details of the above embodiments without departing from the fundamental principles of the invention.
Claims
1. A method for synthesizing wafer defect images, characterized in that, include: Obtain normal sample images and their labels, as well as defective sample images and their labels; The two-dimensional attention weights of the defective sample image and the normal sample image are obtained. The two-dimensional attention weights of the defective sample image are used to characterize the difference in attention between defective pixels and non-defective pixels in the defective sample image. The two-dimensional attention weights of the normal sample image are used to characterize the difference in attention between normal pixels in the central region and the outer region in the normal sample image. Based on the two-dimensional attention weights of the defective sample image and the two-dimensional attention weights of the normal sample image, the defective sample image and the normal sample image are fused to obtain a wafer defect image, and the label of the defective sample image is used as the label of the wafer defect image.
2. The synthesis method according to claim 1, characterized in that, The two-dimensional attention weights of the normal sample image are related to the distribution of normal pixels in the image, and show a trend of low weight for central pixels and high weight for outer pixels. The two-dimensional attention weights of the defective sample image are related to the distribution of defective pixels in the image, and show a trend of high weight for central pixels and low weight for outer pixels.
3. The synthesis method as described in claim 2, characterized in that, The two-dimensional attention weights of the defective sample image are configured as weights of a two-dimensional Gaussian distribution; Alternatively, the two-dimensional attention weight of the defective sample image is configured such that the weight of pixels within a target region with a preset length and width size centered on the center pixel of the defective sample image is a preset value, and the preset value is greater than the weight value of pixels outside the target region.
4. The synthesis method according to claim 1, characterized in that, The method of fusing the defect sample image and the normal sample image based on the two-dimensional attention weights of the defect sample image and the two-dimensional attention weights of the normal sample image to obtain a wafer defect image includes: The wafer defect image is calculated using the following formula: C = A·W + B·Q Wherein, A is the defect sample image, W is the corresponding two-dimensional attention weight, B is the normal sample image, Q is the corresponding two-dimensional attention weight, Q is equal to 1-W or a custom matrix, and C is the wafer defect image.
5. The synthesis method according to any one of claims 1 to 4, characterized in that, The two-dimensional attention weights of the defective sample image and the normal sample image are both not less than a preset effective value.
6. The synthesis method according to claim 1, characterized in that, The labels on the normal sample images are used to identify areas without defects and areas without defects, while the labels on the defective sample images are used to identify the type and location of defects.
7. A training method for a wafer defect detection model, characterized in that, include: Obtain a sample image set of the wafer, the sample image set including multiple sample images and their labels, the sample images including normal sample images and defect sample images; A wafer defect image and its label are obtained by the method for synthesizing wafer defect images as described in any one of claims 1 to 6, and the wafer defect image and its label are added to the sample image set; A neural network model is trained using the sample image set to obtain a wafer defect detection model.
8. The training method as described in claim 7, characterized in that, The labels of the sample images in the sample image set are obtained in the following way: Each sample image in the sample image set is input into a pre-trained feature detection model to detect defect features, and the detection result of the defect features of each sample image is used as the label of the sample image.
9. The training method as described in claim 7, characterized in that, The step of training a neural network model using the sample image set to obtain a wafer defect detection model includes: The network parameters of the neural network model are configured based on the network parameters of the pre-trained feature detection model, which is trained to detect defect features in the input image. The sample images in the sample image set are input into the neural network model respectively to obtain the feature detection output results of the neural network model; The loss function is calculated based on the labels of the sample images and the corresponding feature detection output results to obtain the loss value. The neural network model is then judged to see if it has converged. If not, the network parameters of the neural network model are updated according to the loss value. If so, the update of the network parameters of the neural network model is stopped, and the neural network model with updated network parameters is saved as a wafer defect detection model.
10. A method for detecting wafer defects, characterized in that, include: Acquire a wafer image of the wafer to be tested; The wafer image is input into the wafer defect detection model trained by the training method of the wafer defect detection model as described in any one of claims 7 to 9 to obtain the defect detection result of the wafer under test.
11. A computer-readable storage medium, characterized in that, The method includes a program that can be executed by a processor to implement a method for synthesizing wafer defect images as described in any one of claims 1 to 6, or a method for training a wafer defect detection model as described in any one of claims 7 to 9, or a wafer defect detection method as described in claim 10.