Wafer sem image defect segmentation method based on improved unet model
By using an improved UNet model for defect segmentation in wafer SEM images, the problem of time-consuming wafer defect morphology analysis was solved, achieving efficient defect segmentation and yield improvement.
Patent Information
- Application Number
- CN202310281398.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-03-17
AI Technical Summary
In existing technologies, wafer defect morphology analysis is time-consuming and relies on manual analysis. The defect types are complex, making it difficult to efficiently perform root cause analysis to improve production yield.
An improved UNet model, including an encoder, intermediate attention module, and decoder, is adopted. ResNet is used to extract features, and residual attention mask blocks are combined to perform defect segmentation of wafer SEM images. The model performance is optimized through data augmentation and preprocessing.
It achieves efficient and automatic segmentation of wafer defect morphology, shortens root cause analysis time, and improves the efficiency of production yield adjustment.
Smart Images

Figure CN116342522B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of wafer inspection and image processing technology, specifically to a defect segmentation method for wafer SEM images based on an improved UNet model. Background Technology
[0002] Wafer defect detection is a key issue in yield prediction. During chip manufacturing, each chip undergoes hundreds of processing steps before delivery. Any abnormality in the process can lead to defects on the wafer surface. Accurately identifying wafer surface defects helps engineers discover abnormal equipment or operations during manufacturing, allowing for timely adjustments to improve production yield.
[0003] Wafer defect inspection typically involves detection and analysis from three aspects: defect distribution, defect morphology, and defect composition. The relationship between defect distribution and defect morphology is as follows: Figure 1 As shown. Figure 1 In this model, circles represent a complete wafer, rectangles represent chips, and each point represents a defect. Taking individual photos of defects yields SEM images, allowing observation of their morphology. Currently, analysis of defect morphology is relatively limited. Yield engineers, after determining the approximate range of process steps leading to defects based on defect distribution, further narrow down the range through observation and analysis of defect morphology, ultimately identifying the specific process step corresponding to the defect's cause and optimizing it to improve yield. Therefore, SEM images are of significant importance for defect root cause analysis and yield improvement.
[0004] The analysis of defect morphology is highly dependent on engineers. There are many types of wafer defects in SEM images and their causes are complex. The analysis of defect morphology requires yield engineers and process integration engineers to discuss the actual situation together, which is a very time-consuming process. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention aims to provide a wafer SEM image defect segmentation method based on an improved UNet model.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A defect segmentation method for wafer SEM images based on an improved UNet model includes the following steps:
[0008] S1. Collect wafer SEM image data, divide the collected wafer SEM image dataset into training and test sets;
[0009] S2. Perform data augmentation and preprocessing on the training set obtained in step S1;
[0010] S3. Construct an improved UNet model to obtain the RA-UNet model; the RA-UNet model includes an encoder, an intermediate attention module, and a decoder;
[0011] The encoder is used to extract features from defective SEM images using ResNet. When the number of feature mapping channels of the input and output are the same, the input and output are directly connected using identity mapping. When the number of channels is different, direct addition cannot be achieved. In this case, convolutional residual blocks are used to connect the input and output.
[0012] In the intermediate attention module, a 1×1 convolution is first used to reduce the number of feature channels of the attention branch to 1. Then, information is extracted using convolution to obtain a mask map of the position information in the feature map. Finally, the attention coefficient in the mask map is applied to the feature map, that is, multiplied with the original feature map to eliminate unimportant information and obtain new features after constraint enhancement, which enhances the information expression of the defect region and suppresses the information expression of the irrelevant background region.
[0013] In the decoder, image restoration is performed using upsampling. Every time the image is restored by a factor of 1, it is concatenated with the feature channels of the same size in the encoder, which makes the features extracted by the entire network more refined. The new feature map after feature concatenation is subjected to VGG convolution, and then deconvolution is performed to restore the resolution by a factor of 1. After multiple operations, the image resolution is restored to the initial resolution. Finally, the number of channels is compressed to 1 to obtain the probability that each pixel is a defect. Defect and non-defect prediction is performed for each pixel, i.e., defect segmentation is performed.
[0014] S4. Train the RA-UNet model constructed in step S3 using the training set processed in step S2;
[0015] S5. Test the RA-UNet model trained in step S4 using the test set obtained in step S1, and evaluate the RA-UNet model using image segmentation evaluation metrics.
[0016] S6. Using the final obtained RA-UNet model, input the wafer SEM image to be detected to achieve wafer SEM image defect segmentation.
[0017] Furthermore, in step S1, the data enhancement includes randomly rotating and flipping the image, as well as adjusting its brightness, luminance, and contrast; the preprocessing includes processing the image using a median filter.
[0018] Further, in step S4, the loss is calculated using the cross-entropy loss function.
[0019] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0020] The present invention also provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the above-described method.
[0021] The beneficial effects of this invention are as follows: This invention proposes an improved UNet model, where the encoder feature extraction part uses ResNet to fully extract features, and the intermediate module incorporates an attention mechanism, proposing a residual attention mask block to handle complex defect shape layouts. Using this invention, excellent defect segmentation can be achieved from wafer defect morphology SEM images, shortening the root cause analysis time and facilitating timely process adjustments to ultimately improve yield. Attached Figure Description
[0022] Figure 1 This is a schematic diagram illustrating the relationship between defect distribution and defect morphology.
[0023] Figure 2 This is an example image showing the effect of data enhancement on an image in an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the improved UNet model in an embodiment of the present invention;
[0025] Figure 4 This is an example diagram illustrating the effect of defect segmentation using the method in an embodiment of the present invention. Detailed Implementation
[0026] The present invention will be further described below with reference to the accompanying drawings. It should be noted that this embodiment is based on the present technical solution and provides detailed implementation methods and specific operation processes, but the protection scope of the present invention is not limited to this embodiment.
[0027] This embodiment provides a defect segmentation method for wafer SEM images based on an improved UNet model. The improved UNet model mainly consists of three parts: an encoder, an intermediate attention module, and a decoder. First, the image undergoes data augmentation and preprocessing. Then, it passes through the encoder and intermediate attention module. In the decoder, features obtained from the encoder and decoder are fused via skip connections, finally yielding the output segmented image. The encoder feature extraction part uses ResNet to fully extract features, and the intermediate module incorporates an attention mechanism, proposing a residual attention mask block to handle complex defect shape layouts. Specifically, the method includes the following steps:
[0028] S1. Collect wafer SEM image data, divide the collected wafer SEM image dataset into training and test sets;
[0029] S2. Perform data augmentation and preprocessing on the training set obtained in step S1. In this embodiment, the data augmentation includes random rotation, random flipping, and adjustment of brightness, luminance, and contrast of the image; the preprocessing includes processing the image using a median filter. Example effects of data augmentation are shown below. Figure 2 As shown.
[0030] S3. Construct the improved UNet model to obtain the RA-UNet model. For example... Figure 3 As shown, the RA-UNet model includes an encoder, an intermediate attention module, and a decoder;
[0031] The encoder is used to extract features from defective SEM images using ResNet. The encoder has two types of residual blocks, both of which have short-circuit connections. When the number of feature mapping channels of the input and output are the same, the input and output are directly connected by identity mapping. When the number of channels is different (when the number of channels is doubled), direct addition cannot be achieved. In this case, convolutional residual blocks are used to connect the input and output.
[0032] In the intermediate attention module, a 1×1 convolution is first used to reduce the number of feature channels of the attention branch to 1. Then, information is extracted using convolution to obtain a mask map of the positional information in the feature map. Finally, the attention coefficients in the mask map are applied to the feature map, that is, multiplied with the original feature map to eliminate unimportant information and obtain new features after constraint enhancement, which enhances the information expression of defective regions and suppresses the information expression of irrelevant background regions.
[0033] In the decoder, image restoration is performed using upsampling. Every time the image is restored by a factor of 1, it is concatenated with the feature channels of the same size in the encoder, which makes the features extracted by the entire network more refined. The new feature map after feature concatenation is subjected to VGG convolution, and deconvolution is continued to restore the resolution by a factor of 1. After multiple operations, the image resolution is restored to the initial resolution. Finally, the number of channels is compressed to 1 to obtain the probability that each pixel is a defect. Defect and non-defect prediction is performed for each pixel, that is, defect segmentation is performed.
[0034] S4. Train the RA-UNet model constructed in step S3 using the training set processed in step S2, and calculate the loss using the cross-entropy loss function.
[0035] S5. Test the RA-UNet model trained in step S4 using the test set obtained in step S1, and evaluate the RA-UNet model using image segmentation evaluation metrics. The segmentation performance of the obtained model is as follows: Figure 4 As shown, Figure 4 The first row is the input wafer SEM image, and the second row is the obtained defect segmentation result.
[0036] S6. Using the final obtained RA-UNet model, input the wafer SEM image to be detected to achieve wafer SEM image defect segmentation.
[0037] For those skilled in the art, various corresponding changes and modifications can be made based on the above technical solutions and concepts, and all such changes and modifications should be included within the protection scope of the claims of this invention.
Claims
1. A wafer SEM image defect segmentation method based on an improved UNet model, characterized in that, Specifically comprising the following steps: S1, collecting wafer SEM image data, performing data division on the collected wafer SEM image data set to obtain a training set and a test set; S2, performing data enhancement and preprocessing on the training set obtained in step S1; S3, constructing an improved UNet model to obtain an RA-UNet model; the RA-UNet model comprises an encoder, an intermediate attention module and a decoder; The encoder is used to extract features of the defect SEM image by using ResNet, and when the feature mapping channel numbers of the input and the output are consistent, the input and the output are directly connected by using identity mapping; when the channel numbers are inconsistent, direct addition cannot be realized, and at this time, the input and the output are connected by using a convolution residual block; In the intermediate attention module, first, a 1×1 convolution is used to reduce the feature channel number of the attention branch to 1, then a convolution is used to extract information to obtain a Mask map of the position information in the feature map, and finally the attention coefficients in the Mask map are applied to the feature map, that is, multiplied by the original feature map, to eliminate unimportant information, obtain new features after constraint enhancement, enhance the information expression of the defect area, and suppress the information expression of the irrelevant background area; In the decoder, image restoration is performed by upsampling, and after the image is restored by one time, channel splicing operation is performed with the feature channel of the same size in the encoder, so that the features extracted by the entire network are more fine; After the new feature map after feature splicing is subjected to VGG convolution operation, the resolution is restored by one time by further deconvolution; after multiple operations, the image resolution is restored to the initial resolution, and finally the channel number is compressed to 1 to obtain the probability of each pixel being a defect, and each pixel is predicted as a defect or a non-defect, that is, defect segmentation is performed; S4, training the RA-UNet model constructed in step S3 by using the training set processed in step S2; S5, testing the RA-UNet model obtained in step S4 by using the test set obtained in step S1, and evaluating the RA-UNet model by using an image segmentation evaluation index; S6, inputting the wafer SEM image to be detected into the finally obtained RA-UNet model to realize wafer SEM image defect segmentation.
2. The method of claim 1, wherein, In step S1, the data enhancement comprises random rotation, random flipping and adjustment of brightness, luminance and contrast of the image; and the preprocessing comprises processing the image by using a median filter.
3. The method of claim 1, wherein, In step S4, a cross-entropy loss function is used to calculate the loss.
4. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-3.
5. A computer device, comprising: The device comprises a processor and a memory, and the memory is used to store a computer program; when the processor executes the computer program, the method of any one of claims 1-3 is implemented.