Photoresist defect detection method and system

The photoresist defect detection method combining optical microscopy and ViT model solves the problems of low efficiency and poor adaptability in existing technologies, achieving high-precision photoresist defect detection and ensuring the quality of semiconductor fabrication.

CN121805243APending Publication Date: 2026-04-07FUJIAN DESHANG ELECTRONIC MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing photoresist defect detection methods are inefficient and sensitive to noise and lighting changes, making it difficult to adapt to changes in the actual production environment and affecting the quality of photoresist patterns and semiconductor fabrication.

Method used

An optical microscope is used to perform image preprocessing, semantic segmentation, and block processing on the photoresist development images. The ViT model is used to extract photoresist defect features, and the defects are judged by feature distribution optimization and classifier to improve detection accuracy.

Benefits of technology

It improves the quality and precision of photoresist patterns, ensures the quality of semiconductor fabrication, reduces noise interference, and enhances the accuracy and adaptability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121805243A_ABST
    Figure CN121805243A_ABST
Patent Text Reader

Abstract

The invention discloses a photoresist defect detection method and system, and the method comprises the steps: coating a silicon wafer with photoresist, and exposing and developing the photoresist under ultraviolet light to form a pattern so as to obtain a developed image; and processing the developed image by using an optical microscope to obtain a detection result that whether the photoresist has defects or not. Therefore, the quality and the precision of the photoresist pattern can be improved, and the preparation quality of a semiconductor is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent inspection technology, and more specifically, to a method and system for defect detection of photoresist. Background Technology

[0002] Photoresist is a photosensitive material used in semiconductor manufacturing. It undergoes a chemical change under ultraviolet light to form the desired pattern. However, during the fabrication process, photoresist may develop defects such as bubbles, particles, scratches, and wrinkles. These defects can affect the quality and precision of the pattern and even lead to circuit malfunctions. Therefore, the detection and analysis of photoresist defects are crucial.

[0003] Existing methods for detecting photoresist defects mainly include manual inspection and automated inspection. Manual inspection requires professional personnel, is inefficient, and is subject to subjectivity. While automated inspection methods can improve efficiency and accuracy, they often require large amounts of labeled data and complex algorithm models, and are sensitive to noise and lighting changes, making it difficult to adapt to changes in the actual production environment.

[0004] Therefore, an optimized defect detection scheme for photoresist is desired. Summary of the Invention

[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method and system for detecting defects in photoresist, which involves coating photoresist onto a silicon wafer, exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and processing the developed image using an optical microscope to obtain a detection result indicating whether defects exist in the photoresist. This improves the quality and precision of the photoresist pattern, ensuring the quality of semiconductor fabrication.

[0006] In a first aspect, a method for detecting defects in photoresist is provided, comprising: coating photoresist onto a silicon wafer and exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and processing the developed image using an optical microscope to obtain a detection result indicating whether defects exist in the photoresist.

[0007] In the above-mentioned method for detecting defects in photoresist, the developed image is processed using an optical microscope to obtain a detection result indicating whether defects exist in the photoresist. This includes: acquiring the developed image observed by the optical microscope; performing image preprocessing on the developed image to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; performing image semantic segmentation on the preprocessed developed image to obtain a foreground pattern image; performing image block processing on the foreground pattern image and then using a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; arranging the multiple foreground pattern block context semantic feature vectors into a foreground pattern global feature matrix; optimizing the feature distribution of the foreground pattern global feature matrix to obtain an optimized foreground pattern global feature matrix; and passing the optimized foreground pattern global feature matrix through a classifier to obtain a classification result, wherein the classification result indicates whether defects exist in the photoresist.

[0008] In the above-mentioned defect detection method for photoresist, image preprocessing is performed on the developed image to obtain a preprocessed developed image, including: image denoising processing of the developed image to obtain a denoised developed image; image enhancement processing of the denoised developed image to obtain an enhanced developed image; and image binarization of the enhanced developed image to obtain the preprocessed developed image.

[0009] In the above-mentioned defect detection method for photoresist, after performing image block processing on the foreground pattern image, a ViT model containing an embedding layer is used to obtain multiple foreground pattern block context semantic feature vectors. This includes: performing image block processing on the foreground pattern image to obtain a sequence of image blocks; using the embedding layer of the ViT model to perform vector embedding on each image block in the sequence of image blocks to obtain a sequence of image block embedding vectors; and inputting the sequence of image block embedding vectors into the transformer of the ViT model to obtain the multiple foreground pattern block context semantic feature vectors.

[0010] In the above-described defect detection method for photoresist, inputting the sequence of image patch embedding vectors into the transformer of the ViT model to obtain the plurality of foreground pattern patch context semantic feature vectors includes: arranging the sequence of image patch embedding vectors in one dimension to obtain a global image patch vector; calculating the product between the global image patch vector and the transpose of each image patch embedding vector in the sequence of image patch embedding vectors to obtain a plurality of self-attention association matrices; standardizing each of the plurality of self-attention association matrices to obtain a plurality of standardized self-attention association matrices; applying a Softmax classification function to each of the plurality of standardized self-attention association matrices to obtain a plurality of probability values; and weighting each image patch embedding vector in the sequence of image patch embedding vectors using each of the plurality of probability values ​​as a weight to obtain the plurality of foreground pattern patch context semantic feature vectors.

[0011] In the above-mentioned defect detection method for photoresist, optimizing the feature distribution of the global feature matrix of the foreground pattern to obtain an optimized global feature matrix includes: optimizing the feature distribution of the global feature matrix of the foreground pattern using the following optimization formula to obtain the optimized global feature matrix of the foreground pattern; wherein, the optimization formula is: ,in, This represents the diagonal matrix obtained by linear transformation of the global feature matrix of the foreground pattern. Denotes the transpose of the diagonal matrix. The L2 norm of the global feature matrix of the foreground pattern is represented. Let represent the nuclear norm of the global feature matrix of the foreground pattern, and It is the scale of the global feature matrix of the foreground pattern. Represents the logarithmic function with base 2. The term represents matrix exponentiation, which involves calculating the value of a natural exponential function raised to the power of the eigenvalues ​​at each position in the matrix. This indicates dot product by position. This represents the global feature matrix of the optimized foreground pattern.

[0012] In the above-mentioned defect detection method for photoresist, the optimized foreground pattern global feature matrix is ​​passed through a classifier to obtain a classification result, which is used to indicate whether there is a defect in the photoresist. This includes: expanding the optimized foreground pattern global feature matrix into a classification feature vector according to row vectors or column vectors; using multiple fully connected layers of the classifier to fully connect and encode the classification feature vector to obtain an encoded classification feature vector; and passing the encoded classification feature vector through the Softmax classification function of the classifier to obtain the classification result.

[0013] Secondly, a defect detection system for photoresist is provided, comprising: an image acquisition module for acquiring the developed image observed by the optical microscope; a preprocessing module for performing image preprocessing on the developed image to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; an image semantic segmentation module for performing image semantic segmentation on the preprocessed developed image to obtain a foreground pattern image; an embedding encoding module for performing image block processing on the foreground pattern image and then using a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; a matrix arrangement module for arranging the multiple foreground pattern block context semantic feature vectors into a foreground pattern global feature matrix; an optimization module for performing feature distribution optimization on the foreground pattern global feature matrix to obtain an optimized foreground pattern global feature matrix; and a photoresist result generation module for passing the optimized foreground pattern global feature matrix through a classifier to obtain a classification result, wherein the classification result is used to indicate whether there are defects in the photoresist.

[0014] In the above-mentioned photoresist defect detection system, the preprocessing module includes: a denoising processing unit for performing image denoising processing on the developed image to obtain a denoised developed image; an image enhancement processing unit for performing image enhancement processing on the denoised developed image to obtain an enhanced developed image; and an image binarization unit for performing image binarization on the enhanced developed image to obtain the preprocessed developed image.

[0015] In the aforementioned photoresist defect detection system, the embedding encoding module includes: an image segmentation unit for performing image segmentation processing on the foreground pattern image to obtain a sequence of image blocks; an embedding unit for using the embedding layer of the ViT model to perform vector embedding on each image block in the sequence of image blocks to obtain a sequence of image block embedding vectors; and a conversion unit for inputting the sequence of image block embedding vectors into the converter of the ViT model to obtain the context semantic feature vectors of the plurality of foreground pattern blocks.

[0016] Compared with existing technologies, the photoresist defect detection method and system provided in this application involve coating photoresist onto a silicon wafer, exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and processing the developed image using an optical microscope to obtain a detection result indicating whether photoresist defects exist. This improves the quality and precision of the photoresist pattern, ensuring the quality of semiconductor fabrication. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of a photoresist defect detection method according to an embodiment of this application.

[0019] Figure 2 This is a flowchart of a photoresist defect detection method according to an embodiment of this application.

[0020] Figure 3 This is a flowchart of a sub-step in step 120 of the photoresist defect detection method according to an embodiment of this application.

[0021] Figure 4 This is a schematic diagram of the architecture of step 120 in the photoresist defect detection method according to an embodiment of this application.

[0022] Figure 5 This is a flowchart of a sub-step of step 122 in the photoresist defect detection method according to an embodiment of this application.

[0023] Figure 6 This is a flowchart of a sub-step of step 124 in the photoresist defect detection method according to an embodiment of this application.

[0024] Figure 7 This is a flowchart of a sub-step of step 1243 in the photoresist defect detection method according to an embodiment of this application.

[0025] Figure 8 This is a flowchart of a sub-step of step 127 in the photoresist defect detection method according to an embodiment of this application.

[0026] Figure 9 This is a block diagram of a photoresist defect detection system according to an embodiment of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0028] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application.

[0029] In the embodiments described in this application, it should be noted that, unless otherwise stated and limited, the term "connection" should be interpreted broadly. For example, it can be an electrical connection, or a connection between two internal components. It can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above term according to the specific circumstances.

[0030] It should be noted that the terms "first," "second," and "third" used in the embodiments of this application are merely used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," and "third" can be interchanged in a specific order or sequence where permitted. It should be understood that the objects distinguished by "first," "second," and "third" can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in an order other than those illustrated or described herein.

[0031] As mentioned above, defects such as bubbles, particles, scratches, and wrinkles may occur in the photoresist during the fabrication process. These defects can affect the quality and accuracy of the pattern and even lead to circuit failure. Therefore, the detection and analysis of photoresist defects are crucial. Existing photoresist defect detection methods mainly include manual and automated inspection. Manual inspection requires professional personnel, is inefficient, and is subject to subjectivity. While automated inspection methods can improve efficiency and accuracy, they often require large amounts of labeled data and complex algorithm models, and are sensitive to noise and lighting changes, making them difficult to adapt to changes in the actual production environment. Therefore, an optimized photoresist defect detection scheme is desired.

[0032] Specifically, the technical solution of this application proposes a method for detecting defects in photoresist, which includes: coating photoresist onto a silicon wafer and exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and processing the developed image using an optical microscope to obtain a detection result of whether there are defects in the photoresist.

[0033] Accordingly, considering the actual process of processing the developed image using an optical microscope for photoresist defect detection, it is necessary to analyze the developed image to extract the pattern quality feature information of the photoresist. However, since the developed image contains a large amount of information, and the defect features of the photoresist are small-scale implicit features, they are difficult to detect and capture using traditional methods. Furthermore, noise interference exists in the developed image, which blurs the implicit features of the photoresist, affecting the accuracy of photoresist defect detection. Therefore, the challenge lies in how to extract the distribution information of the implicit quality features of the photoresist in the developed image to detect photoresist defects in a timely and accurate manner, thereby improving the quality and accuracy of the photoresist pattern and ensuring the quality of semiconductor fabrication.

[0034] In recent years, deep learning and neural networks have been widely applied in fields such as computer vision, natural language processing, and text signal processing. The development of deep learning and neural networks has provided new ideas and solutions for mining the implicit feature distribution information about photoresist quality in developed images.

[0035] Specifically, in the technical solution of this application, firstly, a developed image observed by an optical microscope is acquired. It should be understood that noise interference may exist in the developed image, blurring the implicit features of the photoresist and affecting the accuracy of photoresist defect detection. Therefore, to improve the accuracy of photoresist defect detection, it is necessary to reduce noise and background interference and highlight the foreground target. Based on this, in the technical solution of this application, the developed image is preprocessed to obtain a preprocessed developed image. The preprocessing includes image denoising, image enhancement, and image binarization. Specifically, image denoising eliminates noise points in the image, avoiding the impact of noise on subsequent image processing and analysis; image enhancement enhances the contrast and brightness of the image, making the foreground target more prominent; image binarization converts the image into a black and white binary image, making the foreground target more obvious, which is beneficial for subsequent image segmentation and feature extraction.

[0036] Then, considering that the pre-processed developed image contains a foreground pattern area and a background photoresist area, and that photoresist defects, such as bubbles, particles, scratches, and wrinkles, can affect the pattern quality and accuracy in the foreground pattern area, and even lead to circuit failure, the defect features of the photoresist have a significant impact on pattern quality and semiconductor fabrication quality. Furthermore, the implicit defect features are mostly located in the foreground portion of the developed image. Therefore, in the actual photoresist defect detection process, focusing more on the implicit feature information of the foreground pattern area while ignoring interference features unrelated to pattern quality can obviously improve the accuracy of photoresist defect detection. Based on this, in the technical solution of this application, the pre-processed developed image is further subjected to image semantic segmentation to obtain a foreground pattern image, so as to facilitate more accurate mining of the implicit features of the foreground pattern of the photoresist, thereby improving the accuracy of photoresist defect detection.

[0037] Furthermore, convolutional neural network (CNN) models, which excel in extracting latent features from images, are used for feature mining of the foreground pattern image. However, due to the inherent limitations of convolutional operations, pure CNN methods struggle to learn explicit global and long-range semantic information interactions. Moreover, considering that the quality features of the pattern in the foreground pattern image, such as grayscale, shape, and texture, are small-scale subtle features, they are difficult to capture and extract. Therefore, to improve the expressive power of the subtle, latent features of pattern quality in the foreground pattern image, thereby improving the accuracy of photoresist defect detection, the technical solution of this application divides the foreground pattern image into blocks and encodes them using a ViT model with an embedding layer to extract the distribution information of latent contextual semantic features related to pattern quality in the foreground pattern image, thus obtaining multiple foreground pattern block contextual semantic feature vectors. It should be understood that after image block processing of the foreground pattern image, the small-scale latent features of pattern quality in each image block are no longer small-scale feature information, which is beneficial for subsequent extraction of pattern quality features. Specifically, here, the embedding layer linearly projects each image patch into a one-dimensional embedding vector using a learnable embedding matrix. The embedding process involves first arranging the pixel values ​​of all pixel positions in each image patch into a one-dimensional vector, and then using a fully connected layer to encode this one-dimensional vector to achieve embedding. Furthermore, the ViT model, like the Transformer, can directly process each image patch through a self-attention mechanism to extract implicit contextual semantic association features related to the pattern quality based on the overall foreground pattern image in each image patch, i.e., the implicit feature distribution information of the photoresist defects.

[0038] Next, after obtaining the implicit contextual semantic association feature information about the pattern quality based on the overall foreground pattern image in each image block, the contextual semantic feature vectors of the multiple foreground pattern blocks are further arranged into a global feature matrix for the foreground pattern. This integrates the implicit contextual semantic association feature information about the pattern quality in each image block, i.e., the global quality feature information of the foreground pattern. Then, the global feature matrix of the foreground pattern is used as a classification feature matrix for classification processing by a classifier to determine whether there are defects in the photoresist, thereby obtaining a classification result indicating whether there are defects in the photoresist. In response to the presence of photoresist defects, the location and type of the defects are marked, and a defect warning is issued.

[0039] In other words, in the technical solution of this application, the classifier's labels include "photoresist defect exists" (first label) and "photoresist defect does not exist" (second label). The classifier determines which label the classification feature matrix belongs to using a soft-maximum function. It is worth noting that the first label p1 and the second label p2 here do not contain artificially defined concepts. In fact, during the training process, the computer model does not have the concept of "whether the photoresist is defective." It simply has two classification labels and outputs the probability of the feature under these two labels, i.e., the sum of p1 and p2 is one. Therefore, the classification result of whether the photoresist is defective is actually transformed into a binary probability distribution that conforms to natural laws through the classification labels. Essentially, it uses the physical meaning of the natural probability distribution of the labels, rather than the linguistic meaning of "whether the photoresist is defective." It should be understood that in the technical solution of this application, the classifier's classification labels are detection and evaluation labels for whether the photoresist is defective. Therefore, after obtaining the classification results, defects in the photoresist can be detected based on the classification results, thereby improving the quality and accuracy of the photoresist pattern and ensuring the quality of semiconductor fabrication.

[0040] Specifically, in the technical solution of this application, for the foreground pattern global feature matrix obtained by arranging the context semantic feature vectors of the multiple foreground pattern blocks, since each foreground pattern block context semantic feature vector expresses the context-related image semantic features of a single image block of the foreground pattern image, considering the differences in image source semantics between different image blocks of the foreground pattern image, although the ViT model performs semantic feature association encoding, the obtained multiple foreground pattern block context semantic feature vectors still have significant semantic differences. Thus, when the multiple foreground pattern block context semantic feature vectors are directly arranged in two dimensions to obtain the foreground pattern global feature matrix, the local distribution of the foreground pattern global feature matrix, for example, the row vectors with the foreground pattern block context semantic feature vectors as units, will also have insufficient correlation, affecting the accuracy of the classification result obtained by the classifier from the foreground pattern global feature matrix.

[0041] Based on this, in the technical solution of this application, it is preferable to perform feature affinity space affine learning on the global feature matrix of the foreground pattern for optimization, as shown below: ,in, It is the diagonal matrix obtained by linear transformation of the global feature matrix of the foreground pattern. The second norm of a matrix is ​​denoted as 2. The largest eigenvalue, Let represent the nuclear norm of a matrix, which is the sum of the matrix's eigenvalues, and It is the matrix's scale, i.e., width multiplied by height. It is the optimized diagonal matrix.

[0042] Here, the feature affinity spatial affine learning performs affine transfer based on spatial transformation by expressing detailed structured information in a low-dimensional intrinsic subspace of the high-resolution information representation within the feature distribution space of the global feature matrix of the foreground pattern. This is achieved by performing detailed structured information representation in a low-dimensional intrinsic subspace of the high-resolution information representation within the global matrix feature distribution. This enables super-resolution activation of the feature distribution at each local level (i.e., per-feature fragment) of the global matrix feature distribution based on the affinity density simulation between context-related image semantic features. Then, by using the inverse transformation corresponding to the linear transformation to obtain the global feature matrix of the foreground pattern from the optimized diagonal matrix, the correlation between the local feature distributions of the optimized global feature matrix of the foreground pattern can be improved, thereby enhancing the accuracy of the classification results obtained by the classifier from the global feature matrix of the foreground pattern. This allows for timely and accurate detection of defects in the photoresist, thereby improving the quality and precision of the photoresist pattern and ensuring the quality of semiconductor fabrication.

[0043] Figure 1This is a schematic diagram illustrating a scenario of a photoresist defect detection method according to an embodiment of this application. Figure 1 As shown, in this application scenario, firstly, the image is obtained from the optical microscope (e.g., as shown in the image). Figure 1 The developed image observed by N (as shown in the figure) (e.g., as shown in the figure) Figure 1 (as shown in D); then, the acquired developed image is input to a server deployed with a photoresist defect detection algorithm (e.g., such as...). Figure 1 In the illustrated S), the server is capable of processing the developed image based on a photoresist defect detection algorithm to generate a classification result indicating whether there are defects in the photoresist.

[0044] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0045] In one embodiment of this application, Figure 2 This is a flowchart of a photoresist defect detection method according to an embodiment of this application. Figure 2 As shown, the photoresist defect detection method according to an embodiment of this application includes: 110, coating photoresist onto a silicon wafer and exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and 120, processing the developed image using an optical microscope to obtain a detection result of whether there are defects in the photoresist.

[0046] As mentioned above, defects such as bubbles, particles, scratches, and wrinkles may occur in the photoresist during the fabrication process. These defects can affect the quality and accuracy of the pattern and even lead to circuit failure. Therefore, the detection and analysis of photoresist defects are crucial. Existing photoresist defect detection methods mainly include manual and automated inspection. Manual inspection requires professional personnel, is inefficient, and is subject to subjectivity. While automated inspection methods can improve efficiency and accuracy, they often require large amounts of labeled data and complex algorithm models, and are sensitive to noise and lighting changes, making them difficult to adapt to changes in the actual production environment. Therefore, an optimized photoresist defect detection scheme is desired.

[0047] Specifically, the technical solution of this application proposes a method for detecting defects in photoresist, which includes: coating photoresist onto a silicon wafer and exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and processing the developed image using an optical microscope to obtain a detection result of whether there are defects in the photoresist.

[0048] Figure 3 This is a flowchart of a sub-step in step 120 of the photoresist defect detection method according to an embodiment of this application. Figure 3As shown, processing the developed image using an optical microscope to obtain a detection result indicating whether there are defects in the photoresist includes: 121, acquiring the developed image observed by the optical microscope; 122, performing image preprocessing on the developed image to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; 123, performing image semantic segmentation on the preprocessed developed image to obtain a foreground pattern image; 124, performing image block processing on the foreground pattern image and then using a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; 125, arranging the multiple foreground pattern block context semantic feature vectors into a foreground pattern global feature matrix; 126, optimizing the feature distribution of the foreground pattern global feature matrix to obtain an optimized foreground pattern global feature matrix; and 127, passing the optimized foreground pattern global feature matrix through a classifier to obtain a classification result, wherein the classification result is used to indicate whether there are defects in the photoresist.

[0049] Figure 4 This is a schematic diagram of the architecture of step 120 in the photoresist defect detection method according to an embodiment of this application. Figure 4 As shown, in this network architecture, firstly, the developed image observed by the optical microscope is acquired; then, the developed image is preprocessed to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; next, the preprocessed developed image is semantically segmented to obtain a foreground pattern image; then, the foreground pattern image is processed by image block segmentation and passed through a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; next, the multiple foreground pattern block context semantic feature vectors are arranged into a foreground pattern global feature matrix; then, the feature distribution of the foreground pattern global feature matrix is ​​optimized to obtain an optimized foreground pattern global feature matrix; and finally, the optimized foreground pattern global feature matrix is ​​passed through a classifier to obtain a classification result, the classification result being used to indicate whether there are defects in the photoresist.

[0050] Specifically, in step 121, the developed image observed by the optical microscope is acquired. Correspondingly, considering that in the actual process of processing the developed image using an optical microscope for photoresist defect detection, it is necessary to analyze the developed image to extract the pattern quality feature information of the photoresist. However, since the developed image contains a large amount of information, and the defect features of the photoresist are small-scale implicit features, they are difficult to detect and capture using traditional methods. Furthermore, noise interference exists in the developed image, which blurs the implicit features of the photoresist, affecting the accuracy of photoresist defect detection. Therefore, the challenge in this process lies in how to mine the distribution information of the implicit quality features of the photoresist in the developed image, so as to detect photoresist defects in a timely and accurate manner, thereby improving the quality and accuracy of the photoresist pattern and ensuring the quality of semiconductor fabrication.

[0051] In recent years, deep learning and neural networks have been widely applied in fields such as computer vision, natural language processing, and text signal processing. The development of deep learning and neural networks has provided new ideas and solutions for mining the implicit feature distribution information about photoresist quality in developed images.

[0052] Specifically, in the technical solution of this application, firstly, a developing image observed by an optical microscope is acquired.

[0053] Specifically, in step 122, the developed image is preprocessed to obtain a preprocessed developed image. The preprocessing includes image denoising, image enhancement, and image binarization. It should be understood that noise interference in the developed image can blur the implicit features of the photoresist, affecting the accuracy of photoresist defect detection.

[0054] Therefore, to improve the accuracy of photoresist defect detection, it is necessary to reduce noise and background interference and highlight the foreground target. Based on this, the technical solution of this application performs image preprocessing on the developed image to obtain a preprocessed developed image. The preprocessing includes image denoising, image enhancement, and image binarization. Specifically, image denoising eliminates noise points in the image, avoiding the impact of noise on subsequent image processing and analysis; image enhancement enhances the contrast and brightness of the image, making the foreground target more prominent; image binarization converts the image into a black and white binary image, making the foreground target more obvious, which is beneficial for subsequent image segmentation and feature extraction.

[0055] Figure 5 The flowchart below shows a sub-step of step 122 in the photoresist defect detection method according to an embodiment of this application. Figure 5 As shown, image preprocessing is performed on the developed image to obtain a preprocessed developed image, including: 1221, performing image denoising processing on the developed image to obtain a denoised developed image; 1222, performing image enhancement processing on the denoised developed image to obtain an enhanced developed image; and 1223, performing image binarization on the enhanced developed image to obtain the preprocessed developed image.

[0056] Specifically, in step 123, the preprocessed developed image is subjected to image semantic segmentation to obtain a foreground pattern image. Then, considering that the preprocessed developed image contains a foreground pattern region and a background photoresist region, and that defects in the photoresist, such as bubbles, particles, scratches, and wrinkles, can affect the pattern quality and accuracy in the foreground pattern region, and even lead to circuit failure, it is important to understand that the defective features of the photoresist have a significant impact on pattern quality and semiconductor fabrication quality, and that most of the implicit defect features reside in the foreground portion of the developed image.

[0057] Therefore, in the actual process of photoresist defect detection, focusing more on the implicit feature information of the foreground pattern region while ignoring interfering features unrelated to pattern quality can obviously improve the accuracy of photoresist defect detection. Based on this, in the technical solution of this application, the preprocessed developed image is further subjected to image semantic segmentation to obtain a foreground pattern image, so as to facilitate more accurate mining of the implicit features of the foreground pattern of the photoresist, thereby improving the accuracy of photoresist defect detection.

[0058] Specifically, in step 124, after image segmentation of the foreground pattern image, a ViT model with an embedding layer is used to obtain multiple foreground pattern block context semantic feature vectors. Further, a convolutional neural network model, which excels in extracting latent features from images, is used for feature mining of the foreground pattern image. However, due to the inherent limitations of convolutional operations, pure CNN methods struggle to learn explicit global and long-range semantic information interactions. Furthermore, it is considered that the quality features of the pattern in the foreground pattern image, such as grayscale, shape, and texture, are small-scale, subtle features that are difficult to capture and extract.

[0059] Therefore, in order to improve the ability to express subtle, small-scale features related to pattern quality in the foreground pattern image, thereby improving the accuracy of photoresist defect detection, the technical solution of this application involves dividing the foreground pattern image into blocks and encoding them using a ViT model with an embedding layer to extract the distribution information of implicit contextual semantic features related to pattern quality in the foreground pattern image, thus obtaining multiple foreground pattern block contextual semantic feature vectors. It should be understood that after image block processing of the foreground pattern image, the small-scale implicit features related to pattern quality in each image block are no longer small-scale feature information, which is beneficial for subsequent extraction of pattern quality features.

[0060] Specifically, here, the embedding layer linearly projects each image patch into a one-dimensional embedding vector using a learnable embedding matrix. The embedding process involves first arranging the pixel values ​​of all pixel positions in each image patch into a one-dimensional vector, and then using a fully connected layer to encode this one-dimensional vector to achieve embedding. Furthermore, the ViT model, like the Transformer, can directly process each image patch through a self-attention mechanism to extract implicit contextual semantic association features related to the pattern quality based on the overall foreground pattern image in each image patch, i.e., the implicit feature distribution information of the photoresist defects.

[0061] Figure 6 The flowchart below shows the sub-steps of step 124 in the photoresist defect detection method according to an embodiment of this application. Figure 6 As shown, after image segmentation processing of the foreground pattern image, a ViT model containing an embedding layer is used to obtain multiple foreground pattern block context semantic feature vectors, including: 1241, performing image segmentation processing on the foreground pattern image to obtain a sequence of image blocks; 1242, using the embedding layer of the ViT model to perform vector embedding on each image block in the sequence of image blocks to obtain a sequence of image block embedding vectors; and 1243, inputting the sequence of image block embedding vectors into the transformer of the ViT model to obtain the multiple foreground pattern block context semantic feature vectors.

[0062] It's understandable that since Google proposed the Transformer architecture in 2017, it has quickly sparked a wave of interest, particularly in the field of NLP. By using a self-attention mechanism to replace the traditional recurrent neural network structure used for processing sequential data, it not only achieves parallel training and improves training efficiency but also achieves excellent results in applications. In NLP, the input to the transformer is a sequence, while in the field of computer vision, the challenge lies in transforming a 2D image into a 1D sequence. The most intuitive idea is to input the pixels of the image into the transformer, but this approach suffers from excessive complexity.

[0063] The ViT model improves upon the input to reduce complexity. It first segments the image into image patches, then projects each patch into a fixed-length vector which is fed into a Transformer. The subsequent encoder operations are identical to those in the original Transformer. However, because it classifies images, a special label is added to the input sequence; the output corresponding to this label is the final class prediction. ViT has demonstrated excellent performance on many visual tasks, but compared to CNNs (Convolutional Neural Networks), the lack of inductive bias makes ViT heavily reliant on model regularization and data augmentation when applied to small datasets.

[0064] Figure 7 This is a flowchart of a sub-step in step 1243 of the photoresist defect detection method according to an embodiment of this application, as follows: Figure 7 As shown, inputting the sequence of image patch embedding vectors into the transformer of the ViT model to obtain the plurality of foreground pattern patch context semantic feature vectors includes: 12431, arranging the sequence of image patch embedding vectors in one dimension to obtain a global image patch vector; 12432, calculating the product between the global image patch vector and the transpose of each image patch embedding vector in the sequence of image patch embedding vectors to obtain a plurality of self-attention association matrices; 12433, standardizing each of the plurality of self-attention association matrices to obtain a plurality of standardized self-attention association matrices; 12434, applying a Softmax classification function to each of the plurality of standardized self-attention association matrices to obtain a plurality of probability values; and 12435, weighting each image patch embedding vector in the sequence of image patch embedding vectors using each of the plurality of probability values ​​as a weight to obtain the plurality of foreground pattern patch context semantic feature vectors.

[0065] Context encoders aim to uncover hidden patterns between contexts in a word sequence. Optionally, encoders include CNNs (Convolutional Neural Networks), Recursive Neural Networks (Recursive Neural Networks), and language models. CNN-based methods are effective at extracting local features, but they are less effective at handling long-term dependencies in sentences. Therefore, encoders based on Bi-LSTM (Long Short-Term Memory) are widely used. Recursive Neural Networks treat sentences as tree structures rather than sequences, theoretically offering stronger representation capabilities. However, they suffer from weaknesses such as difficulty in sample labeling, gradient vanishing at deeper layers, and difficulty in parallel computation, thus limiting their practical application. Transformers are a widely used network architecture that combines the characteristics of CNNs and RNNs. They are effective at extracting global features and have advantages in parallel computation compared to RNNs (Recurrent Neural Networks).

[0066] Specifically, in step 125, the context semantic feature vectors of the multiple foreground pattern blocks are arranged into a foreground pattern global feature matrix. Next, after obtaining the implicit context semantic association feature information regarding the pattern quality based on the overall foreground pattern image in each image block, the context semantic feature vectors of the multiple foreground pattern blocks are further arranged into a foreground pattern global feature matrix to integrate the implicit context semantic association feature information regarding pattern quality in each image block, i.e., the global quality feature information of the foreground pattern.

[0067] Specifically, in step 126, the feature distribution of the foreground pattern global feature matrix is ​​optimized to obtain an optimized foreground pattern global feature matrix. In particular, in the technical solution of this application, for the foreground pattern global feature matrix obtained by arranging the context semantic feature vectors of the multiple foreground pattern blocks, since each foreground pattern block context semantic feature vector expresses the context-related image semantic features of a single image block of the foreground pattern image, considering the differences in image source semantics between different image blocks of the foreground pattern image, although the ViT model performs associative encoding of semantic features, the resulting multiple foreground pattern block context semantic feature vectors still exhibit significant semantic differences. Thus, when the multiple foreground pattern block context semantic feature vectors are directly arranged in two dimensions to obtain the foreground pattern global feature matrix, the local distribution of the foreground pattern global feature matrix, for example, the row vectors with the foreground pattern block context semantic feature vectors as units, will also suffer from insufficient correlation, affecting the accuracy of the classification results obtained by the classifier from the foreground pattern global feature matrix.

[0068] Based on this, in the technical solution of this application, it is preferable to perform feature affinity space affine learning on the global feature matrix of the foreground pattern to optimize it, expressed as follows: the feature distribution of the global feature matrix of the foreground pattern is optimized using the following optimization formula to obtain the optimized global feature matrix of the foreground pattern; wherein, the optimization formula is: ,in, This represents the diagonal matrix obtained by linear transformation of the global feature matrix of the foreground pattern. Denotes the transpose of the diagonal matrix. The L2 norm of the global feature matrix of the foreground pattern is represented. Let represent the nuclear norm of the global feature matrix of the foreground pattern, and It is the scale of the global feature matrix of the foreground pattern. Represents the logarithmic function with base 2. The term represents matrix exponentiation, which involves calculating the value of a natural exponential function raised to the power of the eigenvalues ​​at each position in the matrix. This indicates dot product by position. This represents the global feature matrix of the optimized foreground pattern.

[0069] Here, the feature affinity spatial affine learning performs affine transfer based on spatial transformation by expressing detailed structured information in a low-dimensional intrinsic subspace of the high-resolution information representation within the feature distribution space of the global feature matrix of the foreground pattern. This is achieved by performing detailed structured information representation in a low-dimensional intrinsic subspace of the high-resolution information representation within the global matrix feature distribution. This enables super-resolution activation of the feature distribution at each local level (i.e., per-feature fragment) of the global matrix feature distribution based on the affinity density simulation between context-related image semantic features. Then, by using the inverse transformation corresponding to the linear transformation to obtain the global feature matrix of the foreground pattern from the optimized diagonal matrix, the correlation between the local feature distributions of the optimized global feature matrix of the foreground pattern can be improved, thereby enhancing the accuracy of the classification results obtained by the classifier from the global feature matrix of the foreground pattern. This allows for timely and accurate detection of defects in the photoresist, thereby improving the quality and precision of the photoresist pattern and ensuring the quality of semiconductor fabrication.

[0070] Specifically, in step 127, the optimized foreground pattern global feature matrix is ​​processed by a classifier to obtain a classification result, which indicates whether there are defects in the photoresist. Then, the foreground pattern global feature matrix is ​​used as a classification feature matrix and processed by a classifier to determine whether there are defects in the photoresist, thereby obtaining a classification result indicating whether there are defects in the photoresist. In response to the presence of photoresist defects, the location and type of the defects are marked, and a defect warning is issued.

[0071] In other words, in the technical solution of this application, the classifier's labels include "photoresist defect exists" (first label) and "photoresist defect does not exist" (second label). The classifier determines which label the classification feature matrix belongs to using a soft-maximum function. It is worth noting that the first label p1 and the second label p2 here do not contain any artificially defined concepts. In fact, during the training process, the computer model does not have the concept of "whether the photoresist is defective"; it simply has two classification labels and outputs the probability of the feature under these two labels, i.e., the sum of p1 and p2 is one.

[0072] Therefore, the classification result of whether photoresist has defects is actually transformed into a binary probability distribution that conforms to natural laws through classification labels. Essentially, it uses the physical meaning of the natural probability distribution of the labels, rather than the linguistic meaning of "whether photoresist has defects." It should be understood that in the technical solution of this application, the classification labels of the classifier are detection and evaluation labels for whether photoresist has defects. Therefore, after obtaining the classification results, defects in the photoresist can be detected based on these results, thereby improving the quality and accuracy of the photoresist pattern and ensuring the quality of semiconductor fabrication.

[0073] Figure 8 The flowchart below shows a sub-step of step 127 in the photoresist defect detection method according to an embodiment of this application. Figure 8 As shown, the optimized foreground pattern global feature matrix is ​​passed through a classifier to obtain a classification result, which is used to indicate whether there are defects in the photoresist. The process includes: 1271, expanding the optimized foreground pattern global feature matrix into a classification feature vector according to row vectors or column vectors; 1272, using multiple fully connected layers of the classifier to fully connect and encode the classification feature vector to obtain an encoded classification feature vector; and 1273, passing the encoded classification feature vector through the classifier's Softmax classification function to obtain the classification result.

[0074] In summary, a method for detecting defects in photoresist based on embodiments of this application is described, which involves coating photoresist onto a silicon wafer, exposing and developing it under ultraviolet light to form a pattern to obtain a developed image; and processing the developed image using an optical microscope to obtain a detection result indicating whether defects exist in the photoresist. This improves the quality and precision of the photoresist pattern, ensuring the quality of semiconductor fabrication.

[0075] In one embodiment of this application, Figure 9 This is a block diagram of a photoresist defect detection system according to an embodiment of this application. Figure 9 As shown, a photoresist defect detection system 200 according to an embodiment of this application includes: an image acquisition module 210 for acquiring the developed image observed by the optical microscope; a preprocessing module 220 for performing image preprocessing on the developed image to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; an image semantic segmentation module 230 for performing image semantic segmentation on the preprocessed developed image to obtain a foreground pattern image; an embedding encoding module 240 for performing image block processing on the foreground pattern image and then using a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; a matrix arrangement module 250 for arranging the multiple foreground pattern block context semantic feature vectors into a foreground pattern global feature matrix; an optimization module 260 for performing feature distribution optimization on the foreground pattern global feature matrix to obtain an optimized foreground pattern global feature matrix; and a photoresist result generation module 270 for passing the optimized foreground pattern global feature matrix through a classifier to obtain a classification result, wherein the classification result is used to indicate whether there are defects in the photoresist.

[0076] In a specific example, in the above-mentioned photoresist defect detection system, the preprocessing module includes: a denoising processing unit for performing image denoising processing on the developed image to obtain a denoised developed image; an image enhancement processing unit for performing image enhancement processing on the denoised developed image to obtain an enhanced developed image; and an image binarization unit for performing image binarization on the enhanced developed image to obtain the preprocessed developed image.

[0077] In a specific example, in the above-mentioned photoresist defect detection system, the embedding encoding module includes: an image segmentation unit for performing image segmentation processing on the foreground pattern image to obtain a sequence of image blocks; an embedding unit for using the embedding layer of the ViT model to perform vector embedding on each image block in the sequence of image blocks to obtain a sequence of image block embedding vectors; and a conversion unit for inputting the sequence of image block embedding vectors into the converter of the ViT model to obtain the context semantic feature vectors of the plurality of foreground pattern blocks.

[0078] In a specific example, in the above-mentioned photoresist defect detection system, the conversion unit includes: a one-dimensional arrangement subunit, used to arrange the sequence of image patch embedding vectors in one dimension to obtain a global image patch vector; a self-attention subunit, used to calculate the product between the global image patch vector and the transpose vector of each image patch embedding vector in the sequence of image patch embedding vectors to obtain multiple self-attention association matrices; a normalization subunit, used to normalize each of the multiple self-attention association matrices to obtain multiple normalized self-attention association matrices; an activation subunit, used to pass each of the multiple normalized self-attention association matrices through a Softmax classification function to obtain multiple probability values; and a weighting subunit, used to weight each image patch embedding vector in the sequence of image patch embedding vectors with each probability value as a weight to obtain multiple foreground pattern patch context semantic feature vectors.

[0079] In a specific example, in the above-mentioned photoresist defect detection system, the optimization module is used to: optimize the feature distribution of the global feature matrix of the foreground pattern using the following optimization formula to obtain the optimized global feature matrix of the foreground pattern; wherein, the optimization formula is: ,in, This represents the diagonal matrix obtained by linear transformation of the global feature matrix of the foreground pattern. Denotes the transpose of the diagonal matrix. The L2 norm of the global feature matrix of the foreground pattern is represented. Let represent the nuclear norm of the global feature matrix of the foreground pattern, and It is the scale of the global feature matrix of the foreground pattern. Represents the logarithmic function with base 2. The term represents matrix exponentiation, which involves calculating the value of a natural exponential function raised to the power of the eigenvalues ​​at each position in the matrix. This indicates dot product by position. This represents the global feature matrix of the optimized foreground pattern.

[0080] In a specific example, in the above-mentioned photoresist defect detection system, the photoresist result generation module includes: a matrix expansion unit, used to expand the optimized foreground pattern global feature matrix into a classification feature vector according to row vectors or column vectors; a fully connected encoding unit, used to perform fully connected encoding on the classification feature vector using multiple fully connected layers of the classifier to obtain an encoded classification feature vector; and a classification unit, used to pass the encoded classification feature vector through the Softmax classification function of the classifier to obtain the classification result.

[0081] Here, those skilled in the art will understand that the specific functions and operations of each unit and module in the above-described photoresist defect detection system have been referenced above. Figures 1 to 8 The method for detecting defects in photoresist has been described in detail, and therefore, its repeated description will be omitted.

[0082] This application also provides a computer program product including instructions that, when executed, cause a device to perform operations corresponding to the methods described above.

[0083] In one embodiment of this application, a computer-readable storage medium is also provided, which stores a computer program that performs the methods described above.

[0084] It should be understood that embodiments of this application may be provided as methods, systems, or computer program products. Therefore, they may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, they may take the form of computer program products implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] This application describes methods, systems, and computer program products using flowcharts and / or block diagrams. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowcharts and / or block diagrams. Figure 1 One or more processes and / or frames Figure 1 A device that provides the functions specified in one or more boxes.

[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or frames Figure 1 The function specified in one or more boxes.

[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or frames Figure 1 The steps of the function specified in one or more boxes.

[0088] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0089] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0090] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0091] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0092] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0093] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for detecting defects in photoresist, characterized in that, include: Photoresist is coated onto a silicon wafer and exposed and developed under ultraviolet light to form a pattern to obtain a developed image; The method involves processing the developed image using an optical microscope to obtain a detection result indicating whether defects exist in the photoresist. This processing includes: acquiring the developed image observed by the optical microscope; performing image preprocessing on the developed image to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; performing image semantic segmentation on the preprocessed developed image to obtain a foreground pattern image; performing image block processing on the foreground pattern image and then using a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; arranging the multiple foreground pattern block context semantic feature vectors into a foreground pattern global feature matrix; optimizing the feature distribution of the foreground pattern global feature matrix to obtain an optimized foreground pattern global feature matrix; and passing the optimized foreground pattern global feature matrix through a classifier to obtain a classification result, the classification result indicating whether defects exist in the photoresist.

2. The defect detection method for photoresist according to claim 1, characterized in that, The image preprocessing of the developed image to obtain a preprocessed developed image includes: performing image denoising processing on the developed image to obtain a denoised developed image; performing image enhancement processing on the denoised developed image to obtain an enhanced developed image; and performing image binarization on the enhanced developed image to obtain the preprocessed developed image.

3. The method for detecting defects in photoresist according to claim 2, characterized in that, After performing image block processing on the foreground pattern image, a ViT model containing an embedding layer is used to obtain multiple foreground pattern block context semantic feature vectors. This includes: performing image block processing on the foreground pattern image to obtain a sequence of image blocks; using the embedding layer of the ViT model to perform vector embedding on each image block in the sequence of image blocks to obtain a sequence of image block embedding vectors; and inputting the sequence of image block embedding vectors into the transformer of the ViT model to obtain the multiple foreground pattern block context semantic feature vectors.

4. The defect detection method for photoresist according to claim 3, characterized in that, The process of inputting the sequence of image patch embedding vectors into the transformer of the ViT model to obtain the plurality of foreground patch context semantic feature vectors includes: arranging the sequence of image patch embedding vectors in one dimension to obtain a global image patch vector; calculating the product between the global image patch vector and the transpose of each image patch embedding vector in the sequence of image patch embedding vectors to obtain a plurality of self-attention association matrices; standardizing each of the plurality of self-attention association matrices to obtain a plurality of standardized self-attention association matrices; passing each of the plurality of standardized self-attention association matrices through a Softmax classification function to obtain a plurality of probability values; and weighting each image patch embedding vector in the sequence of image patch embedding vectors using each of the plurality of probability values ​​as a weight to obtain the plurality of foreground patch context semantic feature vectors.

5. The defect detection method for photoresist according to claim 4, characterized in that, Optimizing the feature distribution of the global feature matrix of the foreground pattern to obtain an optimized global feature matrix includes: optimizing the feature distribution of the global feature matrix of the foreground pattern using the following optimization formula to obtain the optimized global feature matrix of the foreground pattern; wherein the optimization formula is: ,in, This represents the diagonal matrix obtained by linear transformation of the global feature matrix of the foreground pattern. Denotes the transpose of the diagonal matrix. The L2 norm of the global feature matrix of the foreground pattern is represented. Let represent the nuclear norm of the global feature matrix of the foreground pattern, and It is the scale of the global feature matrix of the foreground pattern. Represents the logarithmic function with base 2. The term represents the exponentiation operation on a matrix, which involves calculating the value of a natural exponential function raised to the power of the eigenvalues ​​at each position in the matrix. This indicates dot product by position. This represents the global feature matrix of the optimized foreground pattern.

6. The method for detecting defects in photoresist according to claim 5, characterized in that, The optimized foreground pattern global feature matrix is ​​passed through a classifier to obtain a classification result, which is used to indicate whether there are defects in the photoresist. The classification result includes: expanding the optimized foreground pattern global feature matrix into a classification feature vector according to row vectors or column vectors; using multiple fully connected layers of the classifier to fully connect and encode the classification feature vector to obtain an encoded classification feature vector; and passing the encoded classification feature vector through the classifier's Softmax classification function to obtain the classification result.

7. A defect detection system for photoresist, characterized in that, include: An image acquisition module is used to acquire the developed image observed by the optical microscope; The system includes a preprocessing module for preprocessing the developed image to obtain a preprocessed developed image, wherein the preprocessing includes image denoising, image enhancement, and image binarization; an image semantic segmentation module for performing image semantic segmentation on the preprocessed developed image to obtain a foreground pattern image; an embedding encoding module for performing image block processing on the foreground pattern image and then using a ViT model containing an embedding layer to obtain multiple foreground pattern block context semantic feature vectors; a matrix arrangement module for arranging the multiple foreground pattern block context semantic feature vectors into a foreground pattern global feature matrix; an optimization module for optimizing the feature distribution of the foreground pattern global feature matrix to obtain an optimized foreground pattern global feature matrix; and a photoresist result generation module for passing the optimized foreground pattern global feature matrix through a classifier to obtain a classification result, wherein the classification result indicates whether there are defects in the photoresist.

8. The photoresist defect detection system according to claim 7, characterized in that, The preprocessing module includes: a denoising unit for denoising the developed image to obtain a denoised developed image; an image enhancement unit for enhancing the denoised developed image to obtain an enhanced developed image; and an image binarization unit for binarizing the enhanced developed image to obtain the preprocessed developed image.

9. The photoresist defect detection system according to claim 8, characterized in that, The embedding encoding module includes: an image segmentation unit for performing image segmentation processing on the foreground pattern image to obtain a sequence of image blocks; an embedding unit for using the embedding layer of the ViT model to perform vector embedding on each image block in the sequence of image blocks to obtain a sequence of image block embedding vectors; and a conversion unit for inputting the sequence of image block embedding vectors into the converter of the ViT model to obtain the context semantic feature vectors of the plurality of foreground pattern blocks.