A dual-branch wafer SEM defect image classification and segmentation method and system
Through the dual-branch network structure, the Swin-Transformer block and the feature fusion module are used to solve the problem of classifying and segmenting microscopic defects in wafer SEM images in semiconductor manufacturing, achieving refined defect analysis and improving the yield rate.
Patent Information
- Application Number
- CN202410524299.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-04-29
AI Technical Summary
Existing technologies are difficult to accurately classify and segment microscopic defects in wafer SEM images in semiconductor manufacturing, especially in the context of data scarcity and complex backgrounds, and the receptive field of convolutional neural networks is limited, making it difficult to effectively absorb global context information.
A dual-branch network structure is adopted, including a classification branch and a segmentation branch. The Swin-Transformer block and feature fusion module are used to extract local features through block division, layer normalization, multi-head self-attention mechanism and MLP layer, and through the encoder and The decoder performs layer-by-layer encoding and decoding, and combines the attention mechanism for feature fusion to achieve refined classification and segmentation of wafer SEM defect maps.
It improves the model's ability to extract defect features, achieves effective classification and accurate segmentation of micro-scale defect morphology, and can simultaneously obtain the classification and segmentation results of wafer micro-scale defects, improving the yield rate.
Smart Images

Figure CN118097320B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of integrated circuit manufacturing, and in particular relates to a dual-branch wafer SEM defect image classification and segmentation method and system. Background Art
[0002] The manufacture of integrated circuits (ICs) involves complex procedures, including thin film deposition, ion implantation, etching, and meticulous polishing. As the industry moves toward miniaturization, circuit elements shrink and designs become increasingly layered, subjecting each chip to an extensive series of processing steps. In this fine orchestration, even the slightest deviation can cause defects on the surface of the wafer. Accurately identifying these defects is not just a task, but can also help us accurately identify and promptly understand violations in equipment or procedures, thereby improving production yield and reliability. Currently, wafer defect detection mainly includes three aspects: defect distribution, defect morphology, and defect composition. Artificial intelligence (AI) has demonstrated the potential to improve efficiency in the first two aspects. Many studies have focused on analyzing defect distribution, and the presence of different shapes on the wafer usually indicates a problem with a specific machine. However, there is still a large gap in the study of defect micromorphology, which is precisely the aspect that engineers prioritize.
[0003] The field of wafer defect analysis in the semiconductor manufacturing industry faces significant challenges, in particular: (1) The uniqueness of defect images presents a complex scenario for automated analysis. The size difference between defects and background, coupled with complex background textures and a wide range of defect types, makes accurate classification and segmentation of defects in SEM images a daunting task. (2) The scarcity and confidentiality of datasets add to the difficulty of this task. The uneven incidence of various defect types leads to a highly skewed distribution of the data. Faced with these obstacles, there is an urgent need for a method that not only needs to extract and identify defect features with higher accuracy, but also needs to provide robust classification and segmentation results under limited data availability. In addition, to prevent overfitting, especially in the case of limited data, the network architecture must be lean and efficient, with minimal parameter occupancy and simplified operations to promote model generalization and minimize computational overhead.
[0004] With the rise of deep learning, wafer defect detection technology has developed in a smarter direction. Various deep learning models, including convolutional neural networks (CNNs), long short-term memories (LSTMs), and autoencoders, can effectively handle complex problems and be used for large-scale data sets. However, most of the existing wafer defect research focuses on analyzing the location distribution of defect image patterns and the binary classification of whether there are defects. These studies treat each defect as a point and study the degree of defect aggregation. However, in actual engineering applications, the most time-consuming and experience-intensive part of an engineer's work is the observation and analysis of defect morphology, so existing research has limitations in fully addressing the needs of wafer defect analysis. For a single part identified as defective in the wafer SEM image, how to further analyze the morphological characteristics of a single defect is crucial to determining the root cause of the defect formation.
[0005] With the development of GPU and the increase in processing speed, good results have been achieved in classification and segmentation tasks in the image field. However, these studies mainly focus on texture defects on surfaces such as steel and wood, which are very different from microscopic defects in semiconductor integrated circuits. In addition, the cornerstone of defect detection has always been model construction centered on convolutional neural networks (CNNs); however, a significant limitation of CNNs is their relatively limited receptive field, which poses a substantial obstacle to effectively absorbing global contextual information. For the field of integrated circuit manufacturing, how to achieve refined classification and segmentation of wafer SEM defect images is an urgent problem to be solved in this field. Summary of the invention
[0006] In response to the above problems, the present invention proposes a dual-branch wafer SEM defect image classification and segmentation method and system, which adopts a dual-branch network structure for defect classification and fine-grained segmentation of wafer SEM defect images to achieve a comprehensive analysis of wafer defects, which helps to analyze the root causes of defects in wafer SEM defect images and thus improve the yield.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] The present invention proposes a dual-branch wafer SEM defect image classification and segmentation method, comprising the following steps:
[0009] Step 1, obtaining a wafer SEM defect image as a training set, marking the wafer SEM defect type and defect pixel position;
[0010] Step 2, performing data enhancement processing on the wafer SEM defect image;
[0011] Step 3, using the training set after data enhancement processing to train the dual-branch wafer SEM defect image classification and segmentation model;
[0012] The dual-branch wafer SEM defect image classification and segmentation model includes a classification branch and a segmentation branch. The classification branch includes a plurality of convolution blocks and a Swin-Transformer block. The input wafer SEM defect image is subjected to a plurality of convolution blocks to extract local features, and then the Swin-Transformer block fuses the local features of the image to generate final features, and the final features are used for defect type classification; the segmentation branch includes an encoder composed of N layers of encoding blocks, a feature fusion module, and a decoder composed of N layers of decoding blocks. The feature fusion module is located between each layer of encoding blocks and decoding blocks, and the final features in the classification branch are fused into the encoder to participate in the calculation;
[0013] Step 4: Use the trained wafer SEM defect image classification and segmentation model to complete the defect type classification and defect pixel position segmentation of the wafer SEM defect image to be processed.
[0014] Furthermore, the Swin-Transformer block includes tile partitioning, layer normalization, a multi-head self-attention mechanism for windows, a multi-head self-attention mechanism for windows with displacement, and an MLP layer;
[0015] First, the local features of the wafer SEM defect image are divided into non-overlapping small tiles through tile partitioning. The small tiles are subjected to layer normalization and then input into the multi-head self-attention mechanism of the window. The small tiles after layer normalization are divided into windows, and self-attention operation is performed in the small tiles. The self-attention results are then residually connected with the small tiles to complete the first-level calculation. The first-level calculation results are subjected to layer normalization and MLP layer processing in turn, and the processing results are residually connected with the first-level calculation results to complete the second-level calculation. The second-level calculation results are subjected to layer normalization and multi-head self-attention mechanism processing with windows introduced with displacement in turn, and the processing results are residually connected with the second-level calculation results to complete the third-level calculation. The third-level calculation results are subjected to layer normalization and MLP layer processing in turn, and the processing results are residually connected with the third-level calculation results to complete the fourth-level calculation. The fourth-level calculation results are converted into data form to generate the final features of the wafer SEM defect image.
[0016] Furthermore, the encoder sequentially downsamples the input wafer SEM defect image to achieve layer-by-layer encoding, wherein the input of the first-layer encoding block is the wafer SEM defect image, the input of the i-th layer encoding block is the output of the i-1-th layer encoding block, 2≤i≤N-1; the input of the N-th layer encoding block is the result of splicing the output of the N-1-th layer encoding block and the output of the Swin-Transformer block in the classification branch.
[0017] Furthermore, the coding block adopts a residual connection block.
[0018] Furthermore, the i-th layer decoding block in the decoder corresponds to the i-th layer encoding block in the encoder, and the decoder upsamples the encoding results of the wafer SEM defect image in sequence to achieve layer-by-layer decoding, gradually restores the resolution of the image, and introduces the encoding features of the corresponding layer through the feature fusion module during the decoding process of each layer; wherein the input of the N-th layer decoding block is the feature of the encoding features of the N-th layer encoding block after being processed by the feature fusion module, the input of the N-1-th layer decoding block is the result of splicing the feature of the encoding features of the N-1-th layer encoding block after being processed by the feature fusion module and the output of the N-th layer decoding block, and the output of the first layer decoding block is processed by the activation function to obtain the probability of defects in each pixel in the wafer SEM defect image.
[0019] Furthermore, the feature fusion module includes multiple attention blocks, which first use 1×1 convolution to reduce the number of channels of the original input feature map to 1 to obtain an attention map of the position information in the feature map; multiply the attention coefficient in the attention map by the original input feature map element by element to generate a modulated feature map; add the original input feature map and the modulated feature map to obtain an output feature map.
[0020] Furthermore, the number of attention blocks in the feature fusion module increases with the depth of the encoded features.
[0021] Furthermore, the i-th layer encoding block is connected to the i-th layer decoding block through a combination of i series-connected attention blocks, and the attention blocks are used to calibrate the encoding features and then input them into the decoding blocks of the corresponding layers.
[0022] Furthermore, the step 4 further includes:
[0023] The classification and segmentation results of the SEM defect images of the wafer to be processed are used as labels, and the new wafer SEM defect images and their labels are stored in the database. New images saved in the database are manually checked regularly, and images with prediction errors are eliminated. The new images in the database are combined with the original training set as a new training set, and the wafer SEM defect image classification and segmentation model is trained and updated regularly.
[0024] The present invention also proposes a dual-branch wafer SEM defect image classification and segmentation system, which is used to implement the above-mentioned dual-branch wafer SEM defect image classification and segmentation method.
[0025] The beneficial effects of the present invention are:
[0026] (1) The present invention proposes a dual-branch wafer SEM defect image classification and segmentation model, which includes a classification branch and a segmentation branch, and can simultaneously obtain the classification and segmentation results of the wafer microscale defect morphology.
[0027] (2) The Swin-Transformer block and feature fusion module designed in the dual branches of the present invention improve the model's ability to extract features of defects. The feature fusion module enables the model decoder to continuously integrate shallow features and deep features at each stage, focusing on the defect area, and realizing effective classification and precise segmentation of micro-scale defect morphology. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 Schematic diagram of collecting wafer SEM defect images during semiconductor manufacturing;
[0029] Figure 2 It is a schematic diagram of the structure of the dual-branch wafer SEM defect image classification and segmentation model (referred to as dual-branch network) proposed by the present invention;
[0030] Figure 3 It is a schematic diagram of the STB structure;
[0031] Figure 4 It is a schematic diagram of the AM structure;
[0032] Figure 5 This is a semi-supervised application method illustrated in this embodiment. DETAILED DESCRIPTION
[0033] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention.
[0034] The accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.
[0036] The present invention proposes a dual-branch wafer SEM image defect classification and segmentation method, which specifically includes the following steps:
[0037] S1. Collect wafer SEM defect images and label them.
[0038] The collected wafer SEM defect images are resized and divided into data to obtain a training set and a test set; the labels include the wafer SEM defect type and the defect pixel location. Figure 1As shown, the wafer SEM defect image refers to a local SEM image containing a defective part extracted from the wafer SEM image. Each local SEM image contains a specific defect. This process can be achieved through existing technology and will not be repeated here.
[0039] S2. Perform data enhancement processing on the training set obtained in step S1.
[0040] The data enhancement processing methods include: image flipping, mirroring, rotation, brightness contrast adjustment, etc.
[0041] S3. Construct a dual-branch wafer SEM defect image classification and segmentation model (hereinafter referred to as dual-branch network).
[0042] like Figure 2 As shown, the dual-branch network consists of a classification branch part and a segmentation branch part. The wafer SEM defect image is input into the classification branch and the segmentation branch at the same time. In the classification branch, the defect type existing in the wafer SEM defect image is predicted, and in the segmentation branch, the position of the pixel point where the defect exists is predicted.
[0043] The classification branch includes several convolution blocks, a Swin-Transformer Block (STB) block with integrated Transformer function, a global average pooling layer and a fully connected layer. The convolution block in the classification branch is used to extract the local features of the input wafer SEM defect map. The local pattern can be effectively identified through the convolution block, and the spatial structure information is retained. The STB block further fuses the local features of the image, enhances the details and precision of the features, and generates the final features of the SEM defect map. The final features generated by the STB block reduce the spatial size of the feature map through the global average pooling layer, reduce the amount of calculation, and retain key information. Finally, the output features of the global average pooling layer are flattened by the fully connected layer to generate the probability results of the SEM defect map belonging to each defect type, and defect classification is realized. In this embodiment, the number of convolution blocks used in the classification branch is 3, and the defect types include holes, films, particles, image deformation and scratches.
[0044] like Figure 3As shown in the figure, the STB block includes tile partitioning, layer normalization, window multi-head self-attention mechanism (W-MSA), window multi-head self-attention mechanism with displacement (SW-MSA) and MLP layer. First, the local features of the image are divided into non-overlapping small tiles through tile partitioning, and the small tiles are input into W-MSA after layer normalization. The small tiles after layer normalization are divided into windows, and self-attention operation is performed in the local small tiles. Then, the self-attention result is residually connected with the small tiles to complete the first level of calculation. The first-level calculation results are sequentially subjected to layer normalization and MLP layer processing, and the results are residually connected with the first-level calculation to complete the second-level calculation; the second-level calculation results are sequentially subjected to layer normalization and SW-MSA processing, wherein SW-MSA introduces a displacement operation, which displaces the divided windows to promote information transmission and exchange, and reduces the deviation of position information, which helps to enhance the modeling ability of the model for the relationship between local and global features, and the SW-MSA processing results are residually connected with the second-level calculation to complete the third-level calculation; the third-level calculation results are sequentially subjected to layer normalization and MLP layer processing, and the results are residually connected with the third-level calculation to complete the fourth-level calculation; the fourth-level calculation is reshaped to generate the final features of the SEM defect map.
[0045] The segmentation branch includes an encoder, a feature fusion module, and a decoder, and the feature fusion module is located between the encoder and the decoder.
[0046] The encoder is composed of N layers of encoding blocks. The encoder sequentially downsamples the input wafer SEM defect image to achieve layer-by-layer encoding, wherein the input of the first layer encoding block is the wafer SEM defect image, the input of the i-th layer encoding block is the output of the i-1-th layer encoding block, 2≤i≤N-1; the input of the N-th layer encoding block is the output of the N-1-th layer encoding block and the output of the STB block in the classification branch. By introducing the output of the STB block in the classification branch into the last layer encoder, the global and local information of the wafer SEM defect image is effectively utilized. In this embodiment, the encoding block adopts the residual block structure in the ResNet network.
[0047] The decoder is composed of N layers of decoding blocks. The i-th layer decoding block in the decoder corresponds to the i-th layer residual block in the encoder. The decoder sequentially upsamples the encoding results of the wafer SEM defect map to achieve layer-by-layer decoding, gradually restore the resolution of the image, and introduces the encoding features of the corresponding layer through the feature fusion module during the decoding process of each layer, that is, each time the encoder doubles the image, it uses the feature channel of the same size as the encoder part to perform channel splicing operations, so that the features extracted by the entire network are more refined. The input of the N-th layer decoding block is the feature of the encoding feature of the N-th layer encoding block after processing by the feature fusion module, and the input of the N-1-th layer decoding block is the result of the output of the N-th layer decoding block and the feature splicing of the encoding feature of the N-1-th layer encoding block after processing by the feature fusion module. In this embodiment, the decoding block adopts a convolution block structure. In each layer of the convolution block, the input feature map is convolved and deconvolved to restore twice the resolution. After multiple operations, the image resolution is restored to the initial resolution, and the number of channels is finally compressed to 1. The output of the first layer decoding block is used through the sigmoid function to obtain the probability of a defect in each pixel in the wafer SEM defect image.
[0048] The feature fusion module contains multiple attention blocks. After the encoder generates the encoded feature map, it focuses on different parts of the generated encoded feature map. This attention mechanism allows the model to dynamically focus on and understand different parts of the encoded feature map, thereby better capturing the relationship between input and output.
[0049] like Figure 4 As shown, each AM first uses 1×1 convolution to reduce the number of channels of the input feature map to 1, obtains the attention map of the position information in the feature map, and obtains the attention coefficient (value is 0-1) through the Sigmoid function. The input feature map is modulated by performing element-by-element multiplication with the original input feature map using the attention coefficient in the attention map. This process suppresses irrelevant information and enhances relevant features by integrating spatial constraints in the feature space, that is, it enhances the information expression of the defect area and suppresses the information expression of the irrelevant background area to generate a modulated feature map. Since the attention coefficient is in the range of 0 to 1 during the modulation of the input feature map, this element-by-element multiplication operation will result in a reduction in the feature parameter value. The present invention adds an identity mapping branch to the attention module, adds the original input feature map to the modulated feature map, and can effectively alleviate this dilemma, ensuring that the addition of the attention module will not affect the accuracy of the network, and finally generates an AM output feature map.
[0050] In this embodiment, the number of AM blocks in the feature fusion module increases with the depth of the coding features. For example, the i-th layer coding block is connected to the i-th layer decoding block through a combination of i serially connected AM blocks. The AM block is used to calibrate the coding features and then input them into the decoding block of the corresponding layer.
[0051] S4: Train the dual-branch network constructed in step S3.
[0052] The training set images after data enhancement processing are input into the dual-branch network in batches, and the dual-branch network is trained by combining the defect types existing in the wafer SEM defect image predicted by the classification branch, the pixel locations and labels of the defects predicted by the segmentation branch. In this embodiment, the training loss includes classification loss and segmentation loss, wherein the classification loss adopts the cross entropy loss function, and the segmentation loss adopts the binary cross entropy loss function.
[0053] S5. Use the test set obtained in step S1 to test the two-branch network trained in step S4, and use the accuracy of image classification and the intersection over union (IoU), recall, and accuracy of image segmentation to evaluate the obtained model. If the evaluation result meets the requirements, retain the parameters of the trained two-branch network, otherwise return to step S4 to continue training.
[0054] S6. Using the finally obtained dual-branch network, input the wafer SEM defect image to be detected to achieve defect classification and segmentation of the wafer SEM defect image.
[0055] Table 1 Comparison with existing classification networks
[0056]
[0057] Table 2 Comparison with existing segmentation networks
[0058]
[0059] It can be seen that the dual-branch network proposed in the present invention is superior to the common existing network. This is because the present invention designs a Swin-Transformer block and a feature fusion module in the dual-branch network, which improves the model's feature extraction capability for defects, realizes effective classification and precise segmentation of micro-scale defect morphology, and can simultaneously obtain the classification and segmentation results of wafer micro-scale defect morphology.
[0060] In a specific implementation of the present invention, in order to optimize the applicability of the method in the IC industry environment, this embodiment uses a semi-supervised learning method to predict new unlabeled SEM defect images through a trained model, uses the prediction results as labels for the data, provides more labeled data, and improves the performance of the model through continuous expansion of the data set. Specifically, the following steps are included:
[0061] (1) A semi-supervised application system is constructed using the resulting dual-branch network. The semi-supervised application system includes two parts: offline modeling and online testing. Figure 5 shown.
[0062] (2) The new SEM defect images collected online (without the need for manual classification and segmentation annotation) are input into the model for online testing to obtain classification and segmentation results.
[0063] (3) Save the classification and segmentation results in a database (the model's prediction results are considered to be the true classification and segmentation labels of the image); in order to avoid the influence of noisy data, regularly manually check the new images saved in the database, remove the images with incorrect predictions, combine the new images in the database with the original data set as a new training set, and regularly train and update the model.
[0064] In this embodiment, a dual-branch wafer SEM defect image classification and segmentation system is also provided, which is used to implement the above embodiment. The terms "module", "unit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the system described in the following embodiments is preferably implemented in software, it is also possible to implement hardware, or a combination of software and hardware.
[0065] This embodiment provides a dual-branch wafer SEM defect image classification and segmentation system, including:
[0066] A data acquisition module, which is used to acquire a wafer SEM defect image as a training set, mark the wafer SEM defect type and defect pixel position; and, to acquire a wafer SEM defect image to be processed;
[0067] A data enhancement module is used to perform data enhancement processing on the wafer SEM defect images in the training set;
[0068] A dual-branch network training module is used to train a dual-branch wafer SEM defect image classification and segmentation model using a training set after data enhancement processing; the dual-branch wafer SEM defect image classification and segmentation model includes a classification branch and a segmentation branch, the classification branch includes a plurality of convolution blocks and a Swin-Transformer block, the input wafer SEM defect image is subjected to a plurality of convolution blocks to extract local features, and then the Swin-Transformer block fuses the local features of the image to generate a final feature, and the final feature is used for defect type classification; the segmentation branch includes an encoder composed of N layers of encoding blocks, a feature fusion module and a decoder composed of N layers of decoding blocks, the feature fusion module is located between each layer of encoding blocks and decoding blocks, and the final feature in the classification branch is fused into the encoder to participate in the calculation;
[0069] The classification-segmentation module is used to complete the defect type classification and defect pixel point position segmentation of the SEM defect image of the wafer to be processed by using the trained dual-branch wafer SEM defect image classification and segmentation model.
[0070] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment, and the implementation methods of the remaining modules will not be repeated here. The system embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0071] The embodiments of the system of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The system embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the corresponding computer program instructions in the non-volatile memory are read into the memory by the processor of any device with data processing capabilities and run.
[0072] Obviously, the above-described embodiments and drawings are only some examples of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that, although the work done in this development process may be complicated and lengthy, for those of ordinary skill in the art, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application. Without departing from the concept of the present application, several variations and improvements can also be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A dual-branch wafer SEM defect image classification and segmentation method, characterized in that: The following steps are involved: Step 1, obtain the wafer SEM defect image as a training set, and mark the wafer SEM defect type and defect pixel position; Step 2, performing data enhancement processing on the wafer SEM defect image; Step 3, using the training set after data enhancement processing to train the dual-branch wafer SEM defect image classification and segmentation model; The dual-branch wafer SEM defect image classification and segmentation model includes a classification branch and a segmentation branch. The classification branch includes a plurality of convolution blocks and a Swin-Transformer block. The input wafer SEM defect image is subjected to a plurality of convolution blocks to extract local features, and then the Swin-Transformer block fuses the local features of the image to generate final features, and the final features are used for defect type classification; the segmentation branch includes an encoder composed of N layers of encoding blocks, a feature fusion module, and a decoder composed of N layers of decoding blocks. The feature fusion module is located between each layer of encoding blocks and decoding blocks, and the final features in the classification branch are fused into the encoder to participate in the calculation; The Swin-Transformer block includes tile division, layer normalization, a multi-head self-attention mechanism of a window, a multi-head self-attention mechanism of a window with displacement, and an MLP layer; firstly, the local features of the wafer SEM defect image are divided into non-overlapping small tiles by tile division, the small tiles are subjected to layer normalization and then input into the multi-head self-attention mechanism of the window, the small tiles subjected to layer normalization are divided into windows, self-attention operations are performed in the small tiles, and then the self-attention results are residually connected with the small tiles to complete the first-level calculation; the first-level calculation results are sequentially subjected to layer normalization and MLP layer processing, the processing results are residually connected with the first-level calculation results to complete the second-level calculation; The second-level calculation results are sequentially subjected to layer normalization and multi-head self-attention mechanism processing with a window of displacement, and the processing results are residually connected with the second-level calculation results to complete the third-level calculation; the third-level calculation results are sequentially subjected to layer normalization and MLP layer processing, and the processing results are residually connected with the third-level calculation results to complete the fourth-level calculation; the fourth-level calculation results are converted into data form to generate the final features of the wafer SEM defect map; The feature fusion module comprises a plurality of attention blocks, wherein the attention block first uses a 1×1 convolution to reduce the number of channels of the original input feature map to 1, and obtains an attention map of the position information in the feature map; the attention coefficient in the attention map is element-wise multiplied with the original input feature map to generate a modulated feature map; the original input feature map is added to the modulated feature map to obtain an output feature map; Step 4: Use the trained wafer SEM defect image classification and segmentation model to complete the defect type classification and defect pixel position segmentation of the wafer SEM defect image to be processed.
2. The dual-branch wafer SEM defect image classification and segmentation method according to claim 1, characterized in that: The encoder sequentially downsamples the input wafer SEM defect image to achieve layer-by-layer encoding, wherein the input of the first-layer encoding block is the wafer SEM defect image, the input of the i-th layer encoding block is the output of the i-1-th layer encoding block, 2≤i≤N-1; the input of the N-th layer encoding block is the result of splicing the output of the N-1-th layer encoding block and the output of the Swin-Transformer block in the classification branch.
3. The double-branch wafer SEM defect image classification and segmentation method according to claim 1 or 2, characterized in that: The coding block adopts a residual connection block.
4. The dual-branch wafer SEM defect image classification and segmentation method according to claim 1, characterized in that: The i-th layer decoding block in the decoder corresponds to the i-th layer encoding block in the encoder. The decoder sequentially upsamples the encoding results of the wafer SEM defect image to achieve layer-by-layer decoding, gradually restores the image resolution, and introduces the encoding features of the corresponding layer through the feature fusion module during the decoding process of each layer; The input of the Nth layer decoding block is the feature of the coding feature of the Nth layer coding block after being processed by the feature fusion module. The input of the N-1th layer decoding block is the result of the concatenation of the feature of the coding feature of the N-1th layer coding block after being processed by the feature fusion module and the output of the Nth layer decoding block. The output of the first layer decoding block is processed by the activation function to obtain the probability of defects in each pixel in the wafer SEM defect image.
5. The dual-branch wafer SEM defect image classification and segmentation method according to claim 1, characterized in that: The number of attention blocks in the feature fusion module increases with the depth of the encoded features.
6. The dual-branch wafer SEM defect image classification and segmentation method according to claim 5, characterized in that: The i-th layer encoding block is connected to the i-th layer decoding block through a combination of i series-connected attention blocks, and the attention blocks are used to calibrate the encoding features and then input them into the decoding blocks of the corresponding layers.
7. The dual-branch wafer SEM defect image classification and segmentation method according to claim 1, characterized in that: The step 4 further includes: The classification and segmentation results of the SEM defect images of the wafer to be processed are used as labels, and the new wafer SEM defect images and their labels are stored in the database. New images saved in the database are manually checked regularly, and images with prediction errors are eliminated. The new images in the database are combined with the original training set as a new training set, and the wafer SEM defect image classification and segmentation model is trained and updated regularly.
8. A dual-branch wafer SEM defect image classification and segmentation system, characterized in that: include: A data acquisition module is used to acquire wafer SEM defect images as training sets, and mark the wafer SEM defect types and defect pixel locations; and, for obtaining a SEM defect map of a wafer to be processed; A data enhancement module is used to perform data enhancement processing on the wafer SEM defect images in the training set; A dual-branch network training module is used to train a dual-branch wafer SEM defect image classification and segmentation model using a training set after data enhancement processing; the dual-branch wafer SEM defect image classification and segmentation model includes a classification branch and a segmentation branch, the classification branch includes a plurality of convolution blocks and a Swin-Transformer block, the input wafer SEM defect image is subjected to a plurality of convolution blocks to extract local features, and then the Swin-Transformer block fuses the local features of the image to generate a final feature, and the final feature is used for defect type classification; the segmentation branch includes an encoder composed of N layers of encoding blocks, a feature fusion module and a decoder composed of N layers of decoding blocks, the feature fusion module is located between each layer of encoding blocks and decoding blocks, and the final feature in the classification branch is fused into the encoder to participate in the calculation; The Swin-Transformer block includes tile division, layer normalization, a multi-head self-attention mechanism of a window, a multi-head self-attention mechanism of a window with displacement, and an MLP layer; firstly, the local features of the wafer SEM defect image are divided into non-overlapping small tiles by tile division, the small tiles are subjected to layer normalization and then input into the multi-head self-attention mechanism of the window, the small tiles subjected to layer normalization are divided into windows, self-attention operations are performed in the small tiles, and then the self-attention results are residually connected with the small tiles to complete the first-level calculation; the first-level calculation results are sequentially subjected to layer normalization and MLP layer processing, the processing results are residually connected with the first-level calculation results to complete the second-level calculation; The second-level calculation results are sequentially subjected to layer normalization and multi-head self-attention mechanism processing with a window of displacement, and the processing results are residually connected with the second-level calculation results to complete the third-level calculation; the third-level calculation results are sequentially subjected to layer normalization and MLP layer processing, and the processing results are residually connected with the third-level calculation results to complete the fourth-level calculation; the fourth-level calculation results are converted into data form to generate the final features of the wafer SEM defect map; The feature fusion module comprises a plurality of attention blocks, wherein the attention block first uses a 1×1 convolution to reduce the number of channels of the original input feature map to 1, and obtains an attention map of the position information in the feature map; the attention coefficient in the attention map is element-wise multiplied with the original input feature map to generate a modulated feature map; the original input feature map is added to the modulated feature map to obtain an output feature map; The classification-segmentation module is used to complete the defect type classification and defect pixel point position segmentation of the SEM defect image of the wafer to be processed by using the trained dual-branch wafer SEM defect image classification and segmentation model.
