Semiconductor chip pattern wafer defect detection method and device and storage medium
By constructing the wafer defect generation network WDefect-GAN and the improved YOLOv8 model WD-YOLO, the problem of insufficient defect sample data in semiconductor chip pattern wafer inspection is solved, and more efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202410939894.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-25
AI Technical Summary
Deep learning models are used in semiconductor chip pattern wafer defect detection due to the scarcity of defect sample data and difficulty in obtaining it, resulting in insufficient detection accuracy. Especially when processing complex patterns, the positioning is not accurate enough, which affects the detection effect.
Construct the wafer defect generation network WDefect-GAN, combine the WD-Pix2Pix and WD-CycleGAN models, generate mixed defect images through data enhancement and feature learning, and combine the improved YOLOv8 model to build the patterned wafer surface defect detection network WD-YOLO to improve Detection efficiency and accuracy.
It greatly improves the training efficiency and generalization ability of the deep learning model, can effectively extract features of small defect areas in images, and improves the efficiency and accuracy of semiconductor chip pattern wafer defect detection.
Smart Images

Figure CN118840342A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wafer detection technology, and in particular to a method, device and storage medium for detecting defects in a semiconductor chip pattern wafer. Background Art
[0002] The integrated circuit industry is the focus of global competition and is vital to national economic prosperity and security and stability, so it occupies an important strategic position. As sub-10nm integrated circuit chips are gradually used in consumer electronics, Internet hardware, and electronic medical equipment, the impact of wafer defects introduced by semiconductor manufacturing equipment on the yield and price of integrated circuits is becoming increasingly obvious. This makes the manufacturing process control links such as rapid identification, positioning and classification of typical defects face increasing challenges. Therefore, efficient defect detection is crucial to ensure the quality of semiconductor wafer products.
[0003] Automated optical inspection (AOI) systems have attracted increasing attention in recent years due to their high cost-effectiveness and unified control standards. In AOI systems, the detection algorithms used are mainly divided into two categories: one is based on traditional digital image processing methods, and the other is emerging technologies based on deep learning. Automated optical inspection of advanced packaging wafers provides a non-contact detection technology that can identify affected wafers and remove defective samples in a timely manner, thereby reducing processing costs and improving production efficiency. Prior to this, wafer surface defect detection usually required manual inspection by human eyes or the use of traditional die-to-die, die-to-golden and other technologies, which can achieve rapid positioning and segmentation of defective areas. However, when faced with complex patterns, existing methods have certain limitations in distinguishing defects from patterned backgrounds. For overly large dies, using only one template may result in inaccurate positioning and affect the detection effect. With the rise of industrial intelligence, machine learning (ML) or deep learning (DL) is used to process wafer surface images taken by machine vision systems to infer whether the sample has a real wafer surface defect map.
[0004] Although there are many excellent deep learning algorithms, these algorithms usually require a lot of data support to achieve optimal performance. In actual production, due to the scarcity and uneven types of defect samples, neural networks are prone to overfitting when trained on limited data sets. In addition, the current mainstream defect detection methods are mostly supervised learning, which requires a lot of time and manpower to annotate the data set, especially in patterned wafer surface defect detection, the number of real wafer surface defect images is far less than the number of real wafer surface defect-free images. Summary of the invention
[0005] The purpose of the present invention is to solve the problem that it is difficult to obtain sample data for defect detection in deep learning models and the existing technology has insufficient accuracy in processing wafer images with complex patterns. The present invention provides a method, device and storage medium for defect detection of semiconductor chip pattern wafers. The method mainly includes the following steps: S1, obtaining a wafer surface image set; S2, pre-processing the wafer surface image set, and then dividing it into a defect sample data set and a normal sample data set; S3, establish a wafer defect generation network, and use the defect sample data set and the normal sample data set for training, and generate a mixed wafer image after the training is completed; S4, using the hybrid wafer image to augment the defect sample data set, and divide the data set after preprocessing; S5. Build a wafer surface defect detection network and use the data set for training; S6. Input the surface image of the wafer to be tested into the trained wafer surface defect detection network to obtain the wafer surface defect detection result.
[0006] Furthermore, step S2 is specifically as follows: S21, dividing the sample images in the wafer surface image set into two types, specifically: a sample image having defects on the wafer surface within the field of view is a real wafer surface defect image, otherwise it is a real wafer surface non-defect image; S22, performing image block processing on the two types of sample images respectively, constructing a normal sample data set from the processed real wafer surface defect-free images, and constructing an initial set of defective samples from the processed real wafer surface defect images; S23. Perform data enhancement on the initial set of defect samples based on geometric transformation to obtain a defect sample data set.
[0007] Furthermore, the wafer defect generation network consists of two parts: the WD-Pix2Pix model and the WD-CycleGAN model; The WD-Pix2Pix model consists of a generator and a discriminator. After the model training is completed, the normal sample image in the normal sample data set is used as the basis to draw a defect mask image based on expert experience knowledge, which is input into the trained WD-Pix2Pix model to output a wafer surface defect map with directional constraints. The WD-CycleGAN model contains two generators, namely G1 and G2, and two discriminators, namely D1 and D2. G1 and D1 correspond to the X domain respectively, processing the defect-free image of the real wafer surface, and G2 and D2 correspond to the Y domain to process the defect image of the real wafer surface. After the model training is completed, the normal wafer sample data set is input into the trained WD-CycleGAN model to output the defect image of the wafer surface without orientation constraints. The wafer surface defect image with orientation constraint and the wafer surface defect image without orientation constraint are taken as a mixed wafer defect image.
[0008] Furthermore, the training of the wafer defect generation network is to train the WD-Pix2Pix model and the WD-CycleGAN model successively; The training process of the WD-Pix2Pix model is as follows: S31, marking the real defect area of the real wafer surface defect image in the defect sample data set, obtaining a defect mask image with a feature prior, and matching the two accordingly; S32, inputting the real wafer surface defect image and the matched defect mask image into the generator of the WD-Pix2Pix model to obtain a defect generation image; S33, extracting pixels of the real defect area of the defect mask image to obtain a cropped defect mask image, and extracting pixels in the area at the same image position in the real wafer surface defect image and the defect generation image to obtain a cropped real wafer surface defect image and a defect generation image; S34, pairing the cropped defect mask image with the real wafer surface defect image as a positive sample, pairing the cropped defect mask image with the defect generation image as a negative sample, inputting the two into the WD-Pix2Pix model discriminator, and setting the total loss function of the WD-Pix2Pix model for adversarial training: fixing the generator parameters, optimizing the discriminator parameters, and then fixing the discriminator parameters and optimizing the generator parameters; S35, back propagation of loss function, updating model parameters, repeating adversarial training, and completing the preset number of training rounds to end the training, and output the final WD-Pix2Pix model; The training process of the WD-CycleGAN model is: S36, expanding the defect sample data set using the orientation-constrained wafer surface defect map; S37, inputting the normal sample data set into the X domain of the WD-CycleGAN model, inputting the expanded defect sample data set into the Y domain of the WD-CycleGAN model, setting the mixed loss function of the WD-CycleGAN model, and training the WD-CycleGAN model; S38, repeat the iterative training until the preset number of training rounds is reached, and output the final WD-CycleGAN model after the training is completed.
[0009] Furthermore, the total loss function of the WD-Pix2Pix model is composed of the adversarial loss and L 1 The loss consists of two parts, which are mathematically expressed as follows:
[0010] in, is the total loss function of the WD-Pix2Pix model, G represents the generator, D represents the discriminator; arg is the value function; To combat the loss function; For L 1 Loss function, is its loss weight; The total loss function of the WD-CycleGAN model consists of cross-domain adversarial loss, cycle consistency loss, and identity loss. The mathematical expression is as follows:
[0011] in, is the total loss function of the WD-CycleGAN model; is the adversarial loss function from domain X to domain Y, f G1 is the mapping function of generator G1, f D2 is the mapping function corresponding to the discriminator D2; is the adversarial loss function from domain Y to domain X, f G2 is the mapping function of generator G2, f D1 is the mapping function corresponding to the discriminator D1; is the cycle consistency loss function of the generator, is the Identity loss function, , are the corresponding weights of the two.
[0012] Furthermore, step S4 is specifically as follows: S41, augmenting the defect sample dataset using the hybrid wafer image; S42, performing nonlinear low-pass filtering on each pixel of the sample image in the augmented defect sample data set; S43, marking defects on sample images in the augmented defect sample data set after filtering, and then dividing the data set.
[0013] Furthermore, the patterned wafer surface defect detection network consists of three parts: a backbone network, a neck network, and a detection head. The backbone network extracts different scale features from the real wafer surface defect map; the neck network fuses the different scale features extracted by the backbone network; the detection head is responsible for generating defect location, category, and confidence information; Structurally, the patterned wafer surface defect detection network is improved based on the original network structure of the YOLOv8 model. The specific improvements include: Backbone network: Use the lightweight FasterNet network to replace the convolutional network in the backbone network of the original YOLOv8 model; Neck network: The CBS structure in the neck network of the original YOLOv8 model is replaced with a DBS structure, and the original C2f structure is upgraded to a DA-C2f structure. Specifically, the DA-C2f structure adds a feature processing branch containing only a DBS structure to the C2f structure, and also adds a feature processing branch containing only a DBS structure to the BottleNeck layer structure. Finally, an ECA attention module is added before the output of the C2f structure. Detection head: An auxiliary detection head is added to the detection head of the original YOLOv8 model.
[0014] Furthermore, the training of the patterned wafer surface defect detection network is based on a hybrid loss function, which includes rectangular box loss, confidence loss and classification loss. The calculation formula is as follows:
[0015] in, is the WD-YOLO hybrid loss function; represents the rectangular box loss; is the confidence loss; is the classification loss; , , is the corresponding weight of each loss function.
[0016] A storage medium stores instructions and data for implementing a semiconductor chip pattern wafer defect detection method.
[0017] A computer device comprises: a processor and the storage medium; the processor loads and executes instructions and data in the storage medium to implement a semiconductor chip pattern wafer defect detection method.
[0018] The beneficial effects brought about by the technical solution provided by the present invention are as follows: the present invention constructs a wafer defect generation network WDefect-GAN, and adopts a method combining WD-Pix2Pix and WD-CycleGAN to realize the hybrid generation of semantic feature learning of a small sample data set and wafer surface defect data, thereby generating defect data with unchanged categories but various forms, solving the problem of insufficient sample data for defect detection, and greatly improving the training efficiency and generalization ability of the deep learning model; by constructing a patterned wafer surface defect detection network WD-YOLO, which is specifically aimed at the detection of patterned wafer surface defects, the problem that the background of the patterned wafer of a semiconductor chip is complex and the features of the small defect area of the image cannot be effectively extracted is solved, and the efficiency and accuracy of defect detection are greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 is a flow chart of a semiconductor chip pattern wafer defect detection method according to an embodiment of the present invention; Figure 2 Schematic diagram of the training input of WDefect-GAN and the generation of a real wafer surface defect map in an embodiment of the present invention; Figure 3 Schematic diagram of the discriminator network structure of the WD-Pix2Pix model in an embodiment of the present invention; Figure 4 Schematic diagram of the generator and discriminator network structures of the WD-CycleGAN model in an embodiment of the present invention; Figure 5 Schematic diagram of the composition and operation of each component of WD-YOLO in an embodiment of the present invention; Figure 6 is a schematic diagram of the network structure of WD-YOLO in an embodiment of the present invention; Figure 7 is a schematic diagram of the DA-C2f structure in an embodiment of the present invention; Figure 8 is a schematic diagram of labeling some sample images of a training set in an embodiment of the present invention; Fig. 9 is a schematic diagram of defect detection results of some samples of a test set in an embodiment of the present invention; Fig.10 is a schematic diagram of the model performance evaluation results in an embodiment of the present invention; Fig.11 is a schematic diagram of caching and segmenting of an industrial continuous image stream in an embodiment of the present invention; Fig.12 It is a schematic diagram of the operation of the hardware device in the embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0021] Embodiments of the present invention provide a method, device and storage medium for detecting defects in a semiconductor chip pattern wafer.
[0022] Please refer to Figure 1 , Figure 1 1 is a flow chart of a semiconductor chip pattern wafer defect detection method according to an embodiment of the present invention, which specifically includes the following steps: The first step is to obtain a set of wafer surface images.
[0023] In this embodiment, the wafer surface image set uses AOI equipment to acquire high-quality patterned wafer surface images with little noise interference online.
[0024] The second step is to process the wafer surface image set and divide it into defect sample data set and normal sample data set, specifically: Step 1: Divide the images in the wafer surface image set into two types, specifically: if there are defects on the wafer surface within the image field of view, it is a real wafer surface defect image, otherwise it is a real wafer surface non-defect image.
[0025] Step 2: perform image segmentation processing on the two types of images respectively, and construct a normal sample data set from the processed real wafer surface defect-free image, and construct an initial set of defective samples from the processed real wafer surface defect image.
[0026] Specifically, the classified images are cropped using a 256px×256px sliding window and image segmentation is performed.
[0027] Step three, perform data enhancement on the initial set of defect samples based on geometric transformation to obtain a defect sample data set.
[0028] Perform geometric transformation on the real wafer surface defect image, including but not limited to scaling, displacement, rotation, contrast transformation, etc. These methods can change the position information, color, size, etc. of the features in the image, and to a certain extent can increase the diversity of the real wafer surface defect image.
[0029] The third step is to establish a wafer defect generation network (WDefect-GAN) and input the data set to obtain a mixed real wafer surface defect map.
[0030] WDefect-GAN is the core of the wafer surface defect map generation method. Please refer to Figure 2 , Figure 2 Schematic diagram of the training input of WDefect-GAN and the generation of a wafer surface defect map in an embodiment of the present invention.
[0031] WDefect-GAN mainly consists of two parts: WD-Pix2Pix model and WD-CycleGAN model.
[0032] The WD-Pix2Pix model consists of a generator and a discriminator. After the model training is completed, the normal sample image in the normal sample data set is used as the basis to draw a defect mask image based on expert experience knowledge, which is input into the trained WD-Pix2Pix model to output a directional constrained wafer surface defect map.
[0033] Defect mask image based on expert experience knowledge ( ) is drawn by wafer defect detection experts in this field based on normal sample images in the normal sample data set. In actual operation, it is drawn by the labelme tool. The defective parts have different shapes and exist in different spatial positions. The defect mask image set based on expert experience knowledge represents the compensation information that human experts want the model to learn. By introducing expert experience knowledge, a large number of "previously unseen" defects are created as enhanced data. The proposed wafer surface defect detection model can learn more diverse features, which can be improved in generalization ability and recognition of unseen anomalies. Therefore, the defect mask image based on expert experience knowledge is used as the guidance vector of the subsequent image generation model to synthesize a specific type of wafer surface defect map.
[0034] The WD-CycleGAN model contains two generators, namely G1 and G2, and two discriminators, namely D1 and D2. G1 and D1 correspond to the X domain respectively, processing the real wafer surface defect-free image, and G2 and D2 correspond to the Y domain to process the real wafer surface defect image. Generator G1 can map the features of the X domain image to the real image in the Y domain, and generator G2 can reversely map the features of the Y domain image to the real image in the X domain. The discriminator uses the real image in the real domain to identify the true and false images generated by the generator, and motivates the generator to continuously generate images that are closer to the real, thereby realizing the mutual mapping of features between different types of wafer surface images. After the model training is completed, the defect sample data set expanded by the directional constrained wafer surface defect image is first input into the trained WD-CycleGAN model, and the converted real wafer surface defect-free image is output. Secondly, the normal wafer sample data set is input into the trained WD-CycleGAN model, and the wafer surface defect image without directional constraints is output.
[0035] The wafer surface defect map with orientation constraints and the wafer surface defect map without orientation constraints are combined as mixed defect images to achieve the simulation of image defect categories that remain unchanged but have different shapes, thereby achieving the purpose of data set enhancement.
[0036] The WD-Pix2Pix model is an improved Pix2Pix model. The discriminator based on Pix2Pix is redesigned and the loss function is improved. The improvement ideas are as follows: (1) Improvement of the discriminator: A strategy is proposed to use only local defects of the image as the discriminator input. After changing the discriminator input, the discriminator network structure is redesigned according to the input size, such as Figure 3 As shown in Figure 1, a more appropriate convolution kernel is introduced to extract defect features. The discriminator network structure of the WD-Pix2Pix model is shown in Figure 1. Figure 4As shown in Figure 1, it consists of 6 convolution kernels and some activation functions. The input paired real wafer surface defect image first undergoes 5 convolution operations with a convolution kernel size of 2×2, a step size of 2, and a padding width of 1, and then undergoes a convolution operation with a convolution kernel size of 2×2, a step size of 1, and a padding width of 0. Finally, the output result is converted into a probability value of 0~1 through the Sigmoid activation function.
[0037] (2) Improvements on generative adversarial loss: In the Pix2Pix model, the generative adversarial loss is calculated by averaging the losses of all patch regions. A patch region may contain both defect features and background features. On the wafer surface, since the defect region is smaller than the background region, the loss of the defect region accounts for a lower proportion of the total loss, which makes it difficult for the generator to effectively learn the distribution characteristics of the defects. To solve this problem, the present invention uses the discrimination results of the defect region in the image as the input of the adversarial loss, so that the generative adversarial loss of the image is directly composed of the defect loss. In the process of continuously optimizing the loss, the generated defects will gradually approach the distribution of the real defects.
[0038] Since there are often multiple defects in a real wafer surface defect image, and the number of defects in different images may also be different, the difference in the number of defects between images may cause the loss of different images to vary greatly, making it difficult for the network to fit. In order to avoid this problem, a weighted average strategy is used to calculate the defect loss in the image. The total loss function of the WD-Pix2Pix model is: By generating adversarial loss and L 1 The loss consists of two parts, which are mathematically expressed as follows:
[0039] is the total loss function of the WD-Pix2Pix model, G represents the generator, and D represents the discriminator; To combat the loss function; is the generator L 1 Loss function, Indicates its weight.
[0040] Among them, the generation adversarial loss function is related to L 1 The calculation formulas of the loss function are expressed as follows:
[0041] Among them, s represents the number of defects in the image, that is, the number of mask areas in the mask image; represents the i-th mask region in the mask image, Indicates the corresponding defect area in the real wafer surface defect map; Indicates the corresponding defect area in the generated image; express The mathematical expectation of express The mathematical expectation of represents an image with a masked region; Represents a true, real wafer surface defect map; express The mathematical expectation of .
[0042] In the WDefect-GAN model, the WD-Pix2Pix model and the WD-CycleGAN model are trained successively. First, the WD-Pix2Pix model is trained. The specific training process is as follows: Step 1: Annotate the real defect area of the real wafer surface defect image to obtain a defect mask image with feature priors ( ), and match the two accordingly.
[0043] Step 2: Input the real wafer surface defect image and its matching defect mask image into the generator to obtain a defect generation image.
[0044] Step three, extract the pixels of the real defect area of the defect mask image to obtain a cropped defect mask image, and extract the pixels in the area at the same image position in the real wafer surface defect map and the defect generation image to obtain a cropped real wafer surface defect map and a defect generation image.
[0045] Step 4: Pair the cropped defect mask image with the real wafer surface defect image as a positive sample, and pair the cropped defect mask image with the defect generation image as a negative sample. Input the two into the WD-Pix2Pix model discriminator and set the total loss function of the WD-Pix2Pix model for adversarial training: fix the generator parameters, optimize the discriminator parameters, then fix the discriminator parameters, and optimize the generator parameters.
[0046] Step 5: Backpropagate the loss function, update the model parameters, repeat the adversarial training, and complete the training after the preset number of training rounds, and output the final WD-Pix2Pix model.
[0047] By optimizing the discriminator, it can accurately determine whether the input image is real; optimizing the generator parameters can convert the mask image into a realistic wafer surface defect map to deceive the discriminator. Through repeated adversarial training of the generator and the discriminator, the preset number of training rounds in this embodiment is 500 rounds. After the training is completed, the defective mask image can be converted into a wafer surface defect map through the generator in the final WD-Pix2Pix model.
[0048] The WD-CycleGAN model is an improvement on the CycleGAN model. The improvements include adding spatial and channel mixed attention mechanisms and improving the loss function: Structurally, such as Figure 4 As shown in the figure, adding spatial and channel mixed attention mechanism modules can enhance the feature extraction and conversion capabilities of the model, thereby improving the efficiency and accuracy of task processing, and has a significant effect when processing image conversion tasks with complex textures and structures.
[0049] The loss function is improved to accelerate model convergence, and Identity loss is introduced to ensure that the data generated by the generator network retains the characteristics of the source image as much as possible, thereby further improving the network effect of the WD-CycleGAN model.
[0050] The CAM (channel attention mechanism) process can be expressed as:
[0051] In the formula, is the Sigmoid activation function; MLP is a multi-layer perceptron fully connected neural network; AvgPool and MaxPool are average pooling and maximum pooling respectively; f is the feature map; f’ is the weighted feature generated by the CAM channel attention mechanism; C is the channel dimension.
[0052] The SAM (Spatial Attention Mechanism) process can be expressed as:
[0053] Where: Concat means concatenating two feature matrices; f″ is the weighted weight generated by the SAM spatial attention mechanism; H and W are the two-dimensional spatial dimensions.
[0054] Total loss of WD-CycleGAN model The expression is:
[0055] in, is the total loss function of the WD-CycleGAN model; is the adversarial loss from domain X to domain Y, f G1 is the mapping function of generator G1, f D2 is the mapping function corresponding to the discriminator D2; is the adversarial loss from domain Y to domain X, f G2 is the mapping function of generator G2, fD1 is the mapping function corresponding to the discriminator D1; is the cycle consistency loss function of the generator, is the Identity loss function, , are the corresponding weights of the two.
[0056] The calculation formulas of each loss function are as follows:
[0057] Where E is the expected function.
[0058] Step six, input the defect mask image of expert experience knowledge into the trained WD-Pix2Pix model, output the orientation-constrained wafer surface defect map, and expand the defect sample data set.
[0059] The original CycleGAN requires a large amount of data and computing resources during the training process. Due to the complexity of the model and the size of the data set, the training model requires a large number of image samples and a long training time. However, due to limited resources, it is difficult to train a high-quality CycleGAN model. Therefore, the present invention amplifies the defect sample data set by the WD-Pix2Pix model before the training process of the WD-CycleGAN model.
[0060] Step 7: Input the normal sample data set into the X domain of the WD-CycleGAN model, input the expanded defect sample data set into the Y domain of the WD-CycleGAN model, set the mixed loss function of the WD-CycleGAN model, train the WD-CycleGAN model, and output the final WD-CycleGAN model after training.
[0061] 265 sample images in the normal sample dataset are used as real images in the X domain, and 182 sample images in the expanded defect sample dataset are used as real images in the Y domain and input into WD-CycleGAN for training.
[0062] Step 8: Repeat the iterative training until the preset number of training rounds is reached. In this embodiment, a total of 200 rounds of training are performed. After the training is completed, the final WD-CycleGAN model is output.
[0063] In order to further evaluate the performance of the improved model, two indicators, structural similarity (SSIM) and FID, are used to evaluate the quality of the generated data. SSIM can accurately measure whether two images are similar. The value range of SSIM is 0~1. The larger the value, the higher the quality of the generated image. Its formula is based on the brightness between samples x and y. , Contrast and structural similarity To measure, the calculation formula is
[0064] In the formula, μ x , μ y Represent the mean of samples x and y respectively; σ x , σ y Represent the variance of samples x and y respectively; σ xy represents the covariance of samples x and y; C 1 =(K 1 L) 2 , C 2 =(K 2 L) 2 , C 3 =C 2 / 2, L is the value range of pixels. Usually, K 1 = 0.01, K 2 =0.03.
[0065] The calculation formula of structural similarity (SSIM) is:
[0066] FID is used to calculate the distance between the feature vectors of the real image and the generated image. The smaller the FID value, the closer the generated image is to the real image. The calculation formula of FID is:
[0067] Where, is the variance of the image features and the generated image features; Tr is the trace of the square matrix.
[0068] The SSIM value of the image generated by the improved WD-Pix2Pix algorithm is 0.574, and the FID value is 137.30. The SSIM value of the image generated by the improved WD-CycleGAN algorithm is 0.634, and the FID value is 114.26. This proves the feasibility of the model.
[0069] The fourth step is to use the hybrid wafer images to augment the defect sample data set and the normal sample data set, and divide the data set after preprocessing, specifically: Step 1: Use the hybrid wafer image to augment the defect sample data set, specifically: add the orientation-constrained wafer surface defect map and the orientation-unconstrained wafer surface defect map to the defect image data set.
[0070] Step 2: Perform nonlinear low-pass filtering on each pixel of the sample image in the augmented defect sample data set.
[0071] When filtering, the mean filter keeps the pixel value unchanged. P (i,j) When the difference from the mean falls outside one standard deviation, the new value of the pixel is set to the mean, calculated as follows:
[0072] In the formula, P (i,j) represents the pixel value, i and j represent the position of the pixel in the real wafer surface defect map; H×W is the size of the pixel, where H is the height of the pixel and W is the width of the pixel; μ is the average grayscale value of pixels in a neighborhood around the pixel. is the standard deviation of the pixel grayscale in the neighborhood, and the calculation formulas are:
[0073]
[0074] In the embodiment of the present invention, a 9×9 filter kernel is used to perform nonlinear low-pass filtering on the wafer image.
[0075] Step three, the sample images in the augmented defect sample data set after filtering are labeled with defects, and then the data set is divided.
[0076] The fifth step is to build a wafer surface defect detection network and use the data set for training.
[0077] The patterned wafer surface defect detection network (WD-YOLO) belongs to a single-stage target detection model, such as Figure 5As shown in the figure, it mainly consists of three parts: the backbone network (Backbone), the neck network (Neck) and the detection head (Head). The backbone network extracts features from the image; the neck network fuses the different scale features extracted by the backbone network through the feature pyramid structure to obtain richer semantic information and improve the detection performance of the model; the detection head is responsible for generating target location, category and confidence information. The detection head consists of four output layers of different scales, each of which is responsible for detecting target objects of different sizes to improve the model's detection ability for targets of different scales.
[0078] WD-YOLO is improved from the YOLOv8 model. Compared with YOLOv8, WD-YOLO has made four major improvements. The improved network structure is referenced Figure 6 : (1) The lightweight FasterNet network is used to replace the convolutional network in the backbone network of the original YOLOv8 model. While ensuring the detection accuracy, the redundant parameters of the backbone network are reduced and the model complexity is reduced.
[0079] The backbone network consists of an embedding layer, a merging layer, a FasterNet block, and a spatial pyramid pooling Fast (SPPF). It has a simple structure and low computational complexity.
[0080] The FasterNet block contains a partial convolution PConv (Partial Convolution) and two ordinary convolutions Conv in sequence, and only uses batch normalization (BN) and ReLU activation functions after the intermediate convolution block, achieving lower latency and faster reasoning while ensuring feature diversity.
[0081] Partial convolution uses ordinary convolution only on some input channels to extract spatial features, and keeps the remaining channels unchanged, ensuring that the input and output have the same number of channels, effectively reducing the computational complexity of the model while retaining spatial information. The difference between the two will be more obvious when compared numerically: Assumptions h is the height of the feature map, w is the width of the feature map, k is the convolution kernel size, c is the number of channels, c p is the number of channels operated in PConv, r For PConv c p and c The ratio of When , the GFLOPs of PConv is , which is only 1 / 16 of the normal convolution. The memory access amount of PConv is , which is only 1 / 4 of the normal convolution. It can be seen that compared with the normal convolution, PConv effectively reduces GFLOPs and memory access.
[0082] Compared with the unified ordinary convolution, the combined structure of PConv and Conv emphasizes the center position information more. The fusion of PConv and Conv can not only effectively reduce the computational complexity, but also improve the output quality.
[0083] (2) Replace the CBS (C for ordinary convolution Conv, B for 2D batch normalization BathNorm2D, S for SiLU activation function) structure in the neck network of the original YOLOv8 model with the DBS (D for deformable convolution DCNv3, B for BathNorm2D, S for SiLU activation function) structure. Simply put, the deformable convolution DCNv3 is used to replace the ordinary convolution, so that the module has the effective receptive field required by downstream tasks, and has the ability to adaptively aggregate the input and task spatial domains. This will effectively improve the detection accuracy of the model.
[0084] (3) In order to compensate for the decrease in detection accuracy of the model caused by the lightweight improvement of the feature extraction network, the C2f (CSPDarknet53 to 2-Stage FPN) structure in the neck network of the original YOLOv8 model is optimized. Please refer to Figure 7 : In addition to replacing the CBS structure with the DBS structure mentioned above, the DA-C2f structure adds a feature processing branch containing only one DBS structure on the C2f structure, which contains two branches in total: one branch input is convolved through a split operation and N BottleNeck layer paths, and each input is processed once (including split operations and BottleNeck layer convolutions) to produce an output result, and the other branch input is processed through the DBS structure to produce an output result. After the input is processed by the two branches respectively, the output results are concatenated (Concat), and then passed through a DBS module and an ECA attention module to obtain the DA-C2f output result. Among them, the BottleNeck layer structure also adds a feature processing branch containing only one DBS structure. The input passes through two branches, one branch contains two DBS structures, and the other branch contains only one DBS structure. Then the processing results of the two paths are added (ADD) to obtain the output of the BottleNeck layer. This construction method enables the exchange and fusion of information between feature maps at different stages, increases the expressiveness and receptive field of the model, and improves the nonlinear expression ability of the model, thereby improving the detection accuracy of the model.
[0085] (4) Add auxiliary detection heads to improve the detection capability of small-scale defect features. For YOLOv8, its original structure is three detection heads, which represent the detection capabilities of the detection heads for small-scale, medium-scale, and large-scale from top to bottom. However, for small-scale defect objects on the wafer surface, there are few features, unclear semantic features, and easy to be submerged by features due to continuous convolution. The auxiliary detection heads added corresponding to the underlying features, i.e., low-level, high-resolution feature maps, effectively alleviate the negative impact of scale variance and improve the detection capability of small-scale defect features.
[0086] The specific training process is as follows: Step 1: Annotate the sample images in the training set with real defects. The annotation types include: Dirty, Scratches, Breakage, Multi-welding. The annotations of some sample images are as follows: Figure 8 shown.
[0087] Step 2: Input the sample data in the training set into WD-YOLO to obtain the defect detection results, including: defect location, category and confidence information.
[0088] Step three, calculate the hybrid loss function based on the defect detection results of the sample images in the training set and their true defect annotations, and optimize the network parameters based on the loss function.
[0089] The training of the WD-YOLO network is based on the mixed loss function. The parameters of the model are optimized in iterative training. The mixed loss function calculation formula is as follows:
[0090] in, is the mixed loss function of WD-YOLO; represents the rectangular box loss; is the confidence loss; is the classification loss; , , are the corresponding weights of each loss function, and the weights are set to a=0.75, b=0.05, and c=0.3.
[0091] The quality of the WD-YOLO network detection results can be measured by three indicators: rectangular box, confidence and classification probability. The rectangular box represents the size of the object and its exact location; the confidence indicates the confidence of the predicted rectangle, ranging from 0 to 1. The higher the value, the greater the possibility of finding the object in the rectangle; the classification probability indicates the category of the object. Therefore, in order to enable the network to achieve better detection results, the above three indicators, namely the rectangular box, confidence and classification probability, need to be gradually optimized. Therefore, the network's loss function needs to measure the degree of deviation between the predicted result and the expected label for all three aspects. Therefore, the mixed loss function of the model contains three parts of loss.
[0092] Confidence loss and classification loss are measured using the binary cross entropy loss function (BCEWithLogitsLoss).
[0093] The rectangular box loss is using CIoU loss The loss function is used to measure CIoU. loss It is in IoU loss On the basis of CIoU, the distance between the predicted target box and the true label box, the overlap ratio, the aspect ratio of the box, and the penalty term are additionally considered to optimize the regression accuracy and speed of the rectangular box, which can make the regression of the predicted rectangular box more stable. loss The loss is shown as follows:
[0094] In the formula, IoU is the intersection-over-union ratio, which is defined as the ratio of the intersection to the union between the predicted box and the actual label box. The calculation formula is: , where A represents the predicted box, B represents the actual label box; c is the diagonal distance of the minimum enclosing rectangle containing the actual label box and the predicted box; and Are loss parameters, the formula is defined as:
[0095]
[0096] in, w gt Indicates the width of the actual label box. h gt Indicates the actual height of the label box; w Indicates the width of the prediction box. h Indicates the height of the predicted box.
[0097] Step 4: Repeat the iterative training until the preset number of training rounds is reached, and output the final trained wafer surface defect detection network.
[0098] In the wafer surface image defect detection experiment based on WD-YOLO in the embodiment of the present invention, the experimental platform is CPU: Intel(R) Core(TM) i5-12490F CPU@3.00GHz, GPU: NVIDIA GeForce RTX 3060, 12g video memory; RAM is DDR5 32GB; operating system window10; CUDA 11.3 acceleration is used. The main hyperparameters of WD-YOLO are listed in Table 1, and most of the hyperparameters are consistent with Yolov8. Batch size is set to 8 and epoch is 300. The optimizer uses SGD, and the learning rate (lr) is 0.01. The model is trained using cosine annealing, and warmup-momentum (wm) and warmup-epoch (we) are set to 0.937 and 3 respectively. The input image size is 768px×768px.
[0099] Table 1 WD-YOLO hyperparameter settings
[0100] In order to accurately evaluate the performance of the model, the present invention sets a test set, inputs the test set into the finally trained WD-YOLO, and obtains the defect detection results as follows: Fig. 9 As shown. The evaluation indicators adopted by the present invention are the most commonly used evaluation indicators for target detection tasks: precision, recall and mean average precision (mAP). Precision indicates the proportion of correctly predicted samples among all sample data predicted as positive samples; recall indicates the proportion of positive samples retrieved by the model among all positive samples; average precision AP (Average Precision) is the integral of the curve with Recall as the horizontal coordinate and Precision as the vertical coordinate on (0, 1). It is a fusion indicator of the two and reflects the performance of the model. The larger the integral value, the better the model performance. Mean average precision mAP (mean Average Precision) is the average of the average precision of each category. As shown Fig.10 As shown, the evaluation results are: precision is 90.32%; recall is 63.75%; average accuracy (mAP@0.5) is 77.97%, where mAP@0.5 represents the average precision when the IoU threshold is 0.5, which verifies the feasibility of the present invention.
[0101] The seventh step is to obtain the surface image of the wafer to be tested, and input the surface image of the wafer to be tested into the trained WD-YOLO wafer defect detection network model to obtain the wafer surface defect detection result.
[0102] The present invention also provides an embodiment. Due to the requirements of patterned wafer visual inspection on accuracy and width, the resolution and shape size of the collected images are not suitable for direct input into the above-mentioned target detection algorithm for calculation, and the continuous image stream of industrial real-time detection places high requirements on the analysis speed of the algorithm. On the basis of the WD-YOLO wafer defect detection network model, the image pre-processing cache strategy and post-processing real-time display and actual positioning of the defect area are added to realize end-to-end detection in an industrial environment.
[0103] The end-to-end inspection process of the patterned wafer surface inspection system based on WD-YOLO is as follows: after obtaining the original collected image through the industrial line scan camera, the image segmentation cache, WD-YOLO defect detection, image merging and defect area positioning, and result visualization display are completed in sequence to achieve a fully closed end-to-end inspection process with original image input and actual defect location and category information output.
[0104] (1) Image caching and segmentation The resolution of the original image is I x , I y , divide the image into pieces of size I sx , I sy The sub-images with a mutual overlap rate of r are sequentially cached to the processing unit storage area and input into the WD-YOLO model in sequence. The specific process is as follows: Fig.11 shown.
[0105] (2) End-to-end defect prediction Due to the input requirements of convolutional neural network calculation, sub-images with the same length and width are input into the defect detection model to avoid directly inputting the original acquired image, which will cause deformation of defect features and loss of information on minor defects. The output of the WD-YOLO model is the detection result vector of the jth sub-image of the i-th image. , which contains coordinate information and category information. According to the following formula, the defect location information based on the sub-images is merged to obtain the pixel location information of the final defect area D x , D y .
[0106]
[0107] (3) Location of defective area Since the prediction information output by the WD-YOLO model is only the image pixel position, it cannot represent the actual position of the defective area in the wafer. At the same time, the camera field of view is smaller than the wafer diameter, and the edge position needs to be extracted to obtain the actual lateral position information on the wafer. Therefore, after extracting the wafer die edge, combined with the segmented image cache information and the encoder or position switch trigger signal, the defective area can be accurately positioned on the actual wafer.
[0108] See also Fig.12 , Fig.12 40 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: a computer device 401, a processor 402 and a storage medium 403.
[0109] A computer device 401: The computer device 401 implements the semiconductor chip pattern wafer defect detection method.
[0110] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the semiconductor chip pattern wafer defect detection method.
[0111] Storage medium 403: The storage medium 403 stores instructions and data; the storage medium 403 is used to implement the semiconductor chip pattern wafer defect detection method.
[0112] The key technical points of the present invention are: Traditional data enhancement techniques generally perform geometric transformations on images, which can change the position of target features and improve the richness of samples to a certain extent, but there is also a risk of losing target features. The method of generating defect images based on WDefect-GAN to expand the data set can solve the shortcomings of traditional methods, generate a large number of defect images that are close to reality, and solve the problem of time-consuming and labor-intensive defect sample data collection under traditional methods.
[0113] Using WDefect-GAN to generate patterned wafer surface defect samples to expand the data set can solve the problem of easy loss of target features in traditional data enhancement methods, and can provide more realistic defect sample data sets for defect detection, thereby improving the detection effect. The key technical points are to build a suitable network structure, construct an appropriate loss function, and select the best network initialization parameters to achieve the best defect sample generation effect. The semantic feature learning of small sample data sets and the intelligent generation of wafer surface defect data are realized, and the generated data defect categories remain unchanged but the shapes are different, thereby achieving the purpose of data set enhancement.
[0114] The complexity of the patterned wafer manufacturing environment leads to the diversity of surface defects of wafers. In practical applications, manual visual inspection has problems such as low efficiency and high false detection rate. A patterned wafer surface defect detection network WD-YOLO based on the improved YOLOv8 is proposed. The network mainly consists of four modules. First, FasterNet is used to improve the utilization of features and reduce the number of model parameters; second, the DBS method is used for downsampling operations to effectively eliminate redundant information in the feature map; then, the DA-C2f module is introduced to obtain richer defect information, and a lightweight attention mechanism is used to highlight the defect area; finally, a small target detection head is added to the detection part to improve the detection ability of small-scale defects. The key technical points are to build a suitable patterned wafer surface defect detection network model, construct an appropriate loss function, and select the best network initialization parameters to achieve the best defect detection effect.
[0115] The beneficial effects of the present invention are as follows: the present invention constructs a wafer defect generation network WDefect-GAN, adopts a method combining WD-Pix2Pix and WD-CycleGAN, realizes the hybrid generation of semantic feature learning of small sample data sets and wafer surface defect data, generates defect data with unchanged categories but different forms, solves the problem of insufficient sample data for defect detection, and greatly improves the training efficiency and generalization ability of deep learning models; by constructing a patterned wafer surface defect detection network WD-YOLO, it is specifically aimed at the detection of patterned wafer surface defects, solves the problem that the background of semiconductor chip patterned wafers is complex and the features of small defect areas in the image cannot be effectively extracted, and greatly improves the efficiency and accuracy of defect detection.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting defects in semiconductor chip pattern wafers, It is characterized in that The specific steps include: S1, obtaining a wafer surface image set; S2, pre-processing the wafer surface image set, and then dividing it into a defect sample data set and a normal sample data set; S3, establish a wafer defect generation network, and use the defect sample data set and the normal sample data set for training, and generate a mixed wafer image after the training is completed; S4, using the hybrid wafer image to augment the defect sample data set, and divide the data set after preprocessing; S5. Build a wafer surface defect detection network and use the data set for training; S6. Input the surface image of the wafer to be tested into the trained wafer surface defect detection network to obtain the wafer surface defect detection result.
2. A semiconductor chip pattern wafer defect detection method as claimed in claim 1, It is characterized in that Step S2 is specifically as follows: S21, dividing the sample images in the wafer surface image set into two types, specifically: a sample image having defects on the wafer surface within the field of view is a real wafer surface defect image, otherwise it is a real wafer surface non-defect image; S22, performing image block processing on the two types of sample images respectively, constructing a normal sample data set from the processed real wafer surface defect-free images, and constructing an initial set of defective samples from the processed real wafer surface defect images; S23. Perform data enhancement on the initial set of defect samples based on geometric transformation to obtain a defect sample data set.
3. A semiconductor chip pattern wafer defect detection method as claimed in claim 1, It is characterized in that The wafer defect generation network consists of two parts: the WD-Pix2Pix model and the WD-CycleGAN model; The WD-Pix2Pix model consists of a generator and a discriminator. After the model training is completed, the normal sample image in the normal sample data set is used as the basis to draw a defect mask image based on expert experience knowledge, which is input into the trained WD-Pix2Pix model to output a wafer surface defect map with directional constraints. The WD-CycleGAN model contains two generators, namely G1 and G2, and two discriminators, namely D1 and D2. G1 and D1 correspond to the X domain respectively, processing the defect-free image of the real wafer surface, and G2 and D2 correspond to the Y domain to process the defect image of the real wafer surface. After the model training is completed, the normal wafer sample data set is input into the trained WD-CycleGAN model to output the defect image of the wafer surface without orientation constraints. The wafer surface defect image with orientation constraint and the wafer surface defect image without orientation constraint are taken as a mixed wafer defect image.
4. A semiconductor chip pattern wafer defect detection method as claimed in claim 3, It is characterized in that The training process of the wafer defect generation network is specifically as follows: the WD-Pix2Pix model and the WD-CycleGAN model are trained successively; The training process of the WD-Pix2Pix model is specifically as follows: S31, marking the real defect area of the real wafer surface defect image in the defect sample data set, obtaining a defect mask image with feature prior, and matching the two accordingly; S32, inputting the real wafer surface defect image and the matched defect mask image into the generator of the WD-Pix2Pix model to obtain a defect generation image; S33, extracting pixels of the real defect area of the defect mask image to obtain a cropped defect mask image, and extracting pixels in the area at the same image position in the real wafer surface defect image and the defect generation image to obtain a cropped real wafer surface defect image and a defect generation image; S34, pairing the cropped defect mask image with the real wafer surface defect image as a positive sample, pairing the cropped defect mask image with the defect generation image as a negative sample, inputting the two into the WD-Pix2Pix model discriminator, and setting the total loss function of the WD-Pix2Pix model for adversarial training: fixing the generator parameters, optimizing the discriminator parameters, and then fixing the discriminator parameters and optimizing the generator parameters; S35, back propagation of loss function, updating model parameters, repeating adversarial training, and completing the preset number of training rounds to end the training, and output the final WD-Pix2Pix model; The training process of the WD-CycleGAN model is: S36, expanding the defect sample data set using the orientation-constrained wafer surface defect map; S37, inputting the normal sample data set into the X domain of the WD-CycleGAN model, inputting the expanded defect sample data set into the Y domain of the WD-CycleGAN model, setting the mixed loss function of the WD-CycleGAN model, and training the WD-CycleGAN model; S38, repeat the iterative training until the preset number of training rounds is reached, and output the final WD-CycleGAN model after the training is completed.
5. A semiconductor chip pattern wafer defect detection method as claimed in claim 4, It is characterized in that The total loss function of the WD-Pix2Pix model is composed of the adversarial loss and L 1 The loss consists of two parts, which are mathematically expressed as follows: in, is the total loss function of the WD-Pix2Pix model, G represents the generator, D represents the discriminator; arg is the value function; To combat the loss function; For L 1 Loss function, is its loss weight; The total loss function of the WD-CycleGAN model consists of cross-domain adversarial loss, cycle consistency loss, and identity loss. The mathematical expression is as follows: in, is the total loss function of the WD-CycleGAN model; is the adversarial loss function from domain X to domain Y, f G1 is the mapping function of generator G1, f D2 is the mapping function corresponding to the discriminator D2; is the adversarial loss function from domain Y to domain X, f G2 is the mapping function of generator G2, f D1 is the mapping function corresponding to the discriminator D1; is the cycle consistency loss function of the generator, is the Identity loss function, , are the corresponding weights of the two.
6. A semiconductor chip pattern wafer defect detection method as claimed in claim 1, It is characterized in that Step S4 is specifically as follows: S41, augmenting the defect sample dataset using the hybrid wafer image; S42, performing nonlinear low-pass filtering on each pixel of the sample image of the augmented defect sample data set; S43, marking defects on sample images in the augmented defect sample data set after filtering, and then dividing the data set.
7. A semiconductor chip pattern wafer defect detection method as claimed in claim 1, It is characterized in that The patterned wafer surface defect detection network consists of three parts: a backbone network, a neck network and a detection head. The backbone network extracts different scale features from the real wafer surface defect map; The neck network fuses the different scale features extracted by the backbone network; The detection head is responsible for generating defect location, category and confidence information; Structurally, the patterned wafer surface defect detection network is improved based on the original network structure of the YOLOv8 model. The specific improvements include: Backbone network: Use the lightweight FasterNet network to replace the convolutional network in the backbone network of the original YOLOv8 model; Neck network: The CBS structure in the neck network of the original YOLOv8 model is replaced with a DBS structure, and the original C2f structure is upgraded to a DA-C2f structure. Specifically, the DA-C2f structure adds a feature processing branch containing only a DBS structure to the C2f structure, and also adds a feature processing branch containing only a DBS structure to the BottleNeck layer structure. Finally, an ECA attention module is added before the output of the C2f structure. Detection head: An auxiliary detection head is added to the detection head of the original YOLOv8 model.
8. A semiconductor chip pattern wafer defect detection method as claimed in claim 7, It is characterized in that The training of the patterned wafer surface defect detection network is based on a hybrid loss function, which includes a rectangular box loss, a confidence loss, and a classification loss. The calculation formula is as follows: in, is the WD-YOLO hybrid loss function; represents the rectangular box loss; is the confidence loss; is the classification loss; , , is the corresponding weight of each loss function.
9. A storage medium, Features: The storage medium stores instructions and data for implementing a semiconductor chip pattern wafer defect detection method as described in any one of claims 1 to 8.
10. A computer device, Features: include: A processor and a storage medium; the processor loads and executes instructions and data in the storage medium to implement a semiconductor chip pattern wafer defect detection method as described in any one of claims 1 to 8.
Citation Information
Cited By
Rotating electromagnetic field structure surface corrosion defect three-dimensional reconstruction method
CN119478298A
Micro-nano structure defect identification method, apparatus and device, and storage medium
CN119832236A
Cross-variety target detection method and device, equipment and storage medium
CN119904730A
A cross-species target detection method, device, equipment and storage medium
CN119904730B
Semiconductor wafer surface chip detection method and system
CN120214069A
