Defect image clustering method, defect detection system, and medium
By using defect image clustering methods and deep learning networks to extract features and perform cluster analysis on defect images in semiconductor and general semiconductor manufacturing, the problems of low resolution, low accuracy and time-consuming manual annotation in existing optical inspection technologies are solved, and efficient defect identification and process optimization are achieved.
Patent Information
- Application Number
- CN202511409237.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing optical inspection technologies suffer from low resolution, low accuracy, and poor reliability in semiconductor and general semiconductor manufacturing. Furthermore, manual data annotation is time-consuming and makes it difficult to effectively identify and classify defects.
A defect image clustering method is adopted. A pre-trained defect image clustering model is used to perform cluster analysis on the defect region images to be detected. The median absolute deviation normalization and multi-layer deep learning network are combined to extract and fuse features to generate clustering results.
It improves the accuracy and reliability of defect identification, reduces the time required for manual data annotation, effectively identifies complex defects and locates the root cause of process abnormalities, and guides the optimization of manufacturing processes.
Smart Images

Figure CN121353708B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of semiconductor / general semiconductor manufacturing technology, and in particular to a defect image clustering method, a defect detection system and a medium. Background Technology
[0002] Integrated circuit chips are the core of modern electronic devices. They are made from high-purity silicon wafers and are produced through steps such as crystal pulling, slicing, grinding, and polishing. Thin film deposition, photolithography, development and baking, etching, ion implantation, and chemical mechanical polishing are then repeated on the wafers to build integrated circuit units with multiple grains. Each grain on the wafer is then cut and packaged into a chip structure with specific circuit functions.
[0003] To ensure the high performance, high reliability, and high yield of integrated circuit chips, rigorous defect detection is required during the semiconductor manufacturing process to identify various defects and flaws on each die. This requirement also exists in the broader semiconductor manufacturing field, including display panels (such as LCD and OLED), advanced packaging, microelectromechanical systems (MEMS), and photovoltaic cells. The foundation of broader semiconductor manufacturing is similar to that of semiconductor manufacturing, relying on patterned micro- and nano-fabrication processes on various substrates (such as silicon wafers, glass substrates, and flexible substrates). Therefore, surface defect detection has become a crucial step in ensuring product quality and performance in both semiconductor manufacturing and broader semiconductor manufacturing.
[0004] Currently, the most commonly used defect detection technology is automated optical inspection technology. This technology uses a precision platform to drive a high-resolution camera to scan and capture images of each area of the sample surface. Image processing algorithms are then used to compare, analyze, and identify defects and anomalies that are inconsistent with normal areas, such as particles and scratches, thereby achieving rapid non-destructive testing.
[0005] However, automated optical inspection technology has technical drawbacks such as low resolution and low detection accuracy. It cannot distinguish the categories of complex defects, which affects the qualitative assessment of defect problems and makes it impossible to accurately locate the root cause of process abnormalities in order to adjust process parameters and optimize product quality and performance.
[0006] Furthermore, when using optical inspection technology for defect detection, it is necessary to classify the identified defects. Existing defect classification technologies mainly rely on classification models trained by deep learning networks. However, training a classification model requires manual data annotation of a large number of sample surface images, and data from different network layers needs to be annotated, which is time-consuming. In addition, manual data annotation is highly subjective, and the accuracy of the data annotation will affect the detection accuracy of the classification model, thus resulting in poor reliability of the classification model. Summary of the Invention
[0007] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a defect image clustering method, a defect detection system and medium to solve the technical problems of low resolution, low detection accuracy, poor reliability and time-consuming manual data annotation in existing optical detection technologies.
[0008] To achieve the above and other related objectives, a first aspect of this application provides a defect image clustering method, the defect image clustering method comprising: acquiring one or more images of defect regions to be detected in a sample to be detected and surface feature data of each image of defect regions to be detected; performing median absolute deviation normalization on the surface feature data of each image of defect regions to be detected to obtain normalized surface feature data of each image of defect regions to be detected; inputting each image of defect regions to be detected and the corresponding normalized surface feature data into a pre-trained defect image clustering model, performing clustering analysis on each image of defect regions to be detected, and generating clustering results for each image of defect regions to be detected.
[0009] In some embodiments of the first aspect of this application, cluster analysis is performed on each defect region image to be detected according to the number of preset cluster categories.
[0010] In some embodiments of the first aspect of this application, the clustering result includes the probability of the cluster category to which the image of the defective region to be detected belongs.
[0011] In some embodiments of the first aspect of this application, the method for performing median absolute deviation normalization on the surface feature data of the image of the defect region to be detected includes: Wherein, F represents the surface feature data; F normal The normalized surface feature data; median(F) is the median of the surface feature data; IQF(F) is the interquartile range of the surface feature data.
[0012] In some embodiments of the first aspect of this application, the defect image clustering model includes: a dimensionality reduction module, used to perform dimensionality reduction compression on each input image of a defect region to be detected, and to extract texture features from each image of a defect region to be detected, generating texture feature data for each image of a defect region to be detected; a depth feature extraction module, connected to the dimensionality reduction module, used to further extract deep semantic features from the texture feature data of each image of a defect region to be detected, generating semantic feature data for each image of a defect region to be detected; a feature fusion module, connected to the depth feature extraction module, used to fuse the normalized surface feature data and semantic feature data of each image of a defect region to be detected, generating fused feature data for each image of a defect region to be detected; and a clustering module, connected to the feature fusion module, used to classify each image of a defect region to be detected into a target clustering category according to the fused feature data of each image of a defect region to be detected, so as to generate clustering results for each image of a defect region to be detected.
[0013] In some embodiments of the first aspect of this application, the method of feature fusion for normalized surface feature data and semantic feature data of each image of a defective region to be detected includes: expanding the normalized surface feature data of each image of a defective region to have the same dimension as the corresponding semantic feature data.
[0014] In some embodiments of the first aspect of this application, the training method of the defect image clustering model includes: acquiring multiple defect image training samples; wherein each defect image training sample includes: a historical defect region image and historical surface feature data of the historical defect region image; performing image enhancement on each historical defect region image to generate multiple enhanced views of each historical defect region image, and performing median absolute deviation normalization on each historical surface feature data to obtain historical normalized surface feature data of each historical defect region image; performing a first-stage preliminary training on the dimensionality reduction module based on each enhanced view to obtain a preliminary converged dimensionality reduction module; and performing a second-stage joint training on the preliminary converged dimensionality reduction module, the deep feature extraction module, the feature fusion module, and the clustering module based on each enhanced view and the historical normalized surface feature data of each historical defect region image to obtain a finally converged defect image clustering model.
[0015] In some embodiments of the first aspect of this application, the dimensionality reduction module is obtained based on training of an image autoencoder network. The initial training in the first stage includes: using the encoder of the image autoencoder network to perform dimensionality reduction compression on each input augmented view, and during the dimensionality reduction compression process, learning and extracting the texture features of each augmented view to generate historical texture feature data for each augmented view; using the decoder of the image autoencoder network to perform upsampling operations on each historical texture feature data to generate multiple reconstructed images with the same dimension as the augmented view; using a predefined autoencoder network loss function to calculate the reconstruction error between each augmented view and the corresponding reconstructed image, and using an optimizer to update the model parameters of the image autoencoder network until a preliminarily converged image autoencoder network is obtained as the dimensionality reduction module.
[0016] In some embodiments of the first aspect of this application, the second-stage joint training method includes: through a first training branch, performing dimensionality reduction and compression on each enhanced view based on a preliminarily converged image autoencoder network to generate historical texture feature data for each enhanced view, and optimizing the dimensionality reduction module accordingly; through a second training branch, learning and extracting deep semantic features from each historical texture feature data based on a residual network to generate historical semantic feature data for each enhanced view, and training the deep feature extraction module accordingly, and further optimizing the dimensionality reduction module; through a third training branch, expanding each historical normalized surface feature data to the same dimension as the historical semantic feature data based on a fully connected layer, and performing feature fusion with each historical semantic feature data to generate historical fused feature data for each enhanced view; and through a third training branch, nonlinearly mapping each historical fused feature data to a clustering space based on a clustering projection network, and performing clustering assignment on each enhanced view to generate a clustered view for each enhanced view, thereby training the clustering module accordingly, and further optimizing other modules.
[0017] In some embodiments of the first aspect of this application, the method of obtaining the deep feature extraction module based on residual network training includes: learning and extracting deep semantic features of each historical texture feature data based on the residual network to generate historical semantic feature data for each enhanced view; mapping each high-dimensional historical semantic feature data to a low-dimensional projection space based on an instance projection network to generate a projection instance for each enhanced view; calculating the instance error between each projection instance using a predefined instance loss function, and updating the model parameters of the residual network using an optimizer until a preliminary converged residual network is obtained as the deep feature extraction module, while simultaneously optimizing the model parameters of the image autoencoder network.
[0018] In some embodiments of the first aspect of this application, the method of obtaining the clustering module based on training a clustering projection network includes: learning the clustering features of each historical fusion feature data based on the clustering projection network, generating clustering views of each enhanced view, so as to classify each enhanced view into the target clustering category; using a predefined clustering loss function, calculating the clustering error of each enhanced view, and using an optimizer to update the model parameters of the clustering projection network until a preliminary converged clustering projection network is obtained as the clustering module, while optimizing the model parameters of the remaining networks.
[0019] In some embodiments of the first aspect of this application, the method of obtaining surface feature data of the image of the defect region to be detected includes: sequentially performing filtering, brightness adjustment, contrast adjustment, and grayscale processing on the image of the defect region to be detected to generate a grayscale image; performing image segmentation on the grayscale image to generate a binary mask image, and performing feature extraction on the binary mask image to generate surface feature data of the image of the defect region to be detected; wherein, the surface feature data includes one or more of the following: defect location, defect area, defect length, defect brightness, defect roughness, spot similarity, and defect contrast of the defect region in the image of the defect region to be detected.
[0020] To achieve the above and other related objectives, a second aspect of this application provides a defect detection system, the defect detection system comprising: a memory storing computer instructions thereon; and a processor connected to the memory and configured to execute the computer instructions stored in the memory to implement the defect image clustering method described in any of the above embodiments.
[0021] In some embodiments of the second aspect of this application, the defect detection system further includes: a defect detection device; wherein the defect detection device includes: a motion stage for carrying a sample to be tested and sequentially moving multiple areas to be tested of the sample to be tested to the imaging area of a microscopic imaging module; and a microscopic imaging module for sequentially acquiring images of the defect areas to be tested in the multiple areas to be tested, so as to obtain surface feature data of each defect area image.
[0022] To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the defect image clustering method described in any of the above embodiments.
[0023] As described above, this application provides a defect image clustering method, a defect detection system, and a medium. A defect image clustering model is obtained through two-stage training. Based on this model, clustering analysis is performed on each defect image according to one or more defect region images of the sample to be detected and the surface feature data of each defect region image, predicting the clustering results of each defect region image. Therefore, this application has the following beneficial effects: it can effectively identify the defect type of each defect region image, especially showing significant effectiveness in identifying complex defects; the clustering accuracy is high, which helps in the qualitative analysis of defect problems and the localization of the root causes of process anomalies, thereby guiding continuous improvement of semiconductor or general semiconductor manufacturing processes; and the clustering results can be used to train subsequent defect image classification models, thereby effectively reducing the time spent on data annotation and saving labor costs; it solves the technical problems of low resolution, low detection accuracy, poor reliability, and time-consuming manual data annotation in existing optical detection technologies. Attached Figure Description
[0024] Figure 1 The diagram shown is a flowchart illustrating a defect image clustering method in one embodiment of this application.
[0025] Figure 2 The diagram shown is a structural schematic of a defect image clustering model in one embodiment of this application.
[0026] Figure 3 The diagram shown is a flowchart illustrating a defect image clustering model training method in one embodiment of this application.
[0027] Figure 4 The diagram shown is a schematic diagram of the initial training of the dimensionality reduction module in the first stage in one embodiment of this application.
[0028] Figure 5 This diagram illustrates the second-stage joint training of a defect image clustering model in one embodiment of this application.
[0029] Figure 6 The diagram shown is a schematic representation of the residual network in one embodiment of this application.
[0030] Figure 7 The diagram shown is a schematic representation of the structure of an example projection network in one embodiment of this application.
[0031] Figure 8 The diagram shown is a schematic representation of the structure of a clustering projection network in one embodiment of this application.
[0032] Figure 9 The diagram shown is a structural schematic of a defect detection device according to an embodiment of this application. Detailed Implementation
[0033] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0034] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with essentially the same function and purpose. For example, the first enhanced view and the second enhanced view are merely enhanced views to distinguish different historical defect area images, and their order is not limited. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that terms such as "first" and "second" do not necessarily imply that they are different.
[0035] To address the defect detection technology problems in the semiconductor and general semiconductor manufacturing fields mentioned above, this application provides a defect image clustering method, a defect detection system, and a medium, aiming to solve the technical problems of low resolution, low detection accuracy, poor reliability, and time-consuming manual data annotation in existing optical detection technologies.
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application are further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0037] like Figure 1 The diagram illustrates a flowchart of a defect image clustering method according to an embodiment of this application. The defect image clustering method in this embodiment mainly includes the following steps.
[0038] Step S110: Acquire images of one or more defective regions to be detected in the sample to be tested, as well as surface feature data of each defective region image.
[0039] The images of each defect region to be detected and the corresponding surface feature data can be obtained by automated optical inspection technology. A high-resolution camera driven by a precision platform scans and captures images of each region on the sample surface point by point. Image processing algorithms are used to compare, analyze and identify one or more defect regions in each sample surface image, thereby obtaining the corresponding defect region image. Then, feature extraction is performed on each defect region image to obtain the corresponding surface feature data.
[0040] In one embodiment, the method for obtaining the surface feature data of the image of the defect region to be detected includes: sequentially performing filtering, brightness adjustment, contrast adjustment, and grayscale processing on the image of the defect region to be detected to generate a grayscale image; performing image segmentation on the grayscale image to generate a binary mask image; and performing feature extraction on the binary mask image to generate the surface feature data of the image of the defect region to be detected.
[0041] Among them, by filtering the image of the defect area to be detected, including using Gaussian filtering algorithm or median filtering algorithm, image noise can be effectively removed and the image smoothed. By adjusting the image brightness and contrast, the defect area can be made more obvious. And by performing grayscale processing on the image, converting the color image into a grayscale image, image processing can be simplified.
[0042] Image segmentation methods include thresholding and edge detection. By setting a grayscale threshold, the image of the defect region to be detected is divided into foreground and background to achieve thresholding. Operators such as Canny and Sobel are used to detect defect edges, which helps to quickly and accurately extract surface features from the image of the defect region to be detected and obtain the surface feature data.
[0043] Specifically, the surface feature data includes one or more of the following: defect location, defect area, defect length, defect brightness, defect roughness, spot similarity, and defect contrast in the defect region image to be detected.
[0044] Step S120: Perform median absolute deviation normalization on the surface feature data of each defect region image to obtain normalized surface feature data of each defect region image.
[0045] It should be understood that the absolute deviation of the median is a robust statistic for measuring the dispersion of data. Because it is insensitive to outliers, it often reflects the true volatility of data more accurately than the standard deviation when the data contains outliers or is not normally distributed. The calculation formula is:
[0046]
[0047] Wherein, F represents the surface feature data; F normal The normalized surface feature data; median(F) is the median of the surface feature data; IQF(F) is the interquartile range of the surface feature data, which is the difference between the value at the 75th percentile (Q3) and the value at the 25th percentile (Q1) of the sorted dataset.
[0048] Step S130: Input the images of each defect region to be detected and the corresponding normalized surface feature data into the pre-trained defect image clustering model, perform clustering analysis on each defect region image to be detected, and generate the clustering results of each defect region image to be detected.
[0049] Among them, such as Figure 2 As shown, the defect image clustering model includes: a dimensionality reduction module, a deep feature extraction module, a feature fusion module, and an aggregation module.
[0050] Specifically, the dimensionality reduction module is used to reduce and compress the input images of each defect region to be detected, and to extract texture features from each image of each defect region to be detected, thereby generating texture feature data for each image of a defect region to be detected.
[0051] Preferably, the dimensionality reduction module can be obtained based on training an image autoencoder network. It should be understood that an image autoencoder network compresses the input image of the defect region to be detected into a lower-dimensional, higher-information-density latent feature representation through an encoder. This allows for the focused learning of the most important data features and distributions in the image of the defect region, while ignoring irrelevant noise or details. This removes Gaussian noise, salt-and-pepper noise, etc., from the image and reconstructs a high-resolution image, restoring key detail information, which is helpful for subsequent image clustering and classification tasks.
[0052] The deep feature extraction module, connected to the dimensionality reduction module, is used to further extract deep semantic features from the texture feature data of each defect region image to be detected, generating semantic feature data for each defect region image to be detected.
[0053] Preferably, the deep feature extraction module can be obtained based on training a residual network. It should be understood that residual networks, by stacking multiple residual blocks and using skip connections to directly pass the input to the output, can progressively extract complex features from low-level details to high-level semantics, and perform excellently in image feature extraction.
[0054] The texture features extracted by the image autoencoder network of the dimensionality reduction module and the semantic features extracted by the residual network of the depth feature extraction module complement each other, making the obtained semantic feature data more comprehensive, richer, and more effective, which helps to improve the subsequent clustering effect of the image of the defect region to be detected.
[0055] The feature fusion module, connected to the deep feature extraction module, is used to perform feature fusion on the normalized surface feature data and semantic feature data of each image of the defect region to be detected, and generate fused feature data for each image of the defect region to be detected.
[0056] Preferably, the method for feature fusion of normalized surface feature data and semantic feature data of each defect region image to be detected includes: expanding the normalized surface feature data of each defect region image to have the same dimension as the corresponding semantic feature data; and fusing the normalized surface feature data and semantic feature data after dimension expansion based on a fully connected layer.
[0057] It should be noted that the normalized surface feature data is obtained by normalizing the surface feature data. This surface feature data directly describes the physical nature of the defect region in the image of the corresponding defect area to be detected; for example, the defect area can directly distinguish between large stains and tiny pinholes. The semantic feature data is obtained through deep learning and can capture extremely complex and abstract data patterns, features, distributions, and textures in the image of the defect area to be detected. Therefore, the fused feature data obtained by feature fusion allows subsequent clustering algorithms to simultaneously receive both concrete physical information and abstract semantic information, thus making the judgment basis of the clustering algorithm more comprehensive and improving the accuracy and robustness of the model clustering. At the same time, the surface feature data can also provide interpretable dimensions for the final clustering results; for example, the clustering results may show that the defect length of a certain cluster category is generally very large, while the defect roughness is very low.
[0058] The clustering module, connected to the feature fusion module, is used to classify each image of a defective region to be detected into a target clustering category based on the fusion feature data of each image of a defective region to be detected, so as to generate the clustering result of each image of a defective region to be detected.
[0059] Preferably, the clustering module can be trained based on a clustering projection network. It should be understood that a clustering projection network is an effective strategy for clustering high-dimensional data, revealing its inherent structure by projecting the data into a low-dimensional space. This application employs deep learning models such as image autoencoder networks and residual networks to perform nonlinear dimensionality reduction and feature learning on the images of the defective regions to be detected, and then uses a clustering projection network for clustering, forming a deep clustering method. This makes the clustering results of the obtained images of each defective region to be detected easier to understand and trust.
[0060] When using this clustering projection network to perform clustering analysis on images of defective regions to be detected, the number of cluster categories can be preset, and the clustering analysis is performed on each image of defective regions to be detected according to the preset number of cluster categories. That is, a specified number of cluster categories are preset to classify each image of defective regions to be detected into a matching target cluster category. It should be noted that the number of cluster categories can be set by the user as needed, and this application does not limit it.
[0061] In a preferred embodiment, nine clustering categories can be set and numbered 1-9 respectively. Based on the fusion feature data of each image of a defective region to be detected, after learning the clustering features of each image, each image can be assigned to a corresponding target clustering category, thereby obtaining the clustering results for each image. Specifically, the clustering results include the probability of the image belonging to a clustering category, i.e., the number of the target clustering category.
[0062] In one embodiment, the images of each defect region to be detected and the corresponding normalized surface feature data are input into the pre-trained defect image clustering model. After the clustering results of each defect region image to be detected are output, each defect region image to be detected can be saved according to different cluster categories. This allows for the selection of defect region images to be detected from each cluster category as input to the wafer defect image classification model. Furthermore, the defect type of each defect region image to be detected is labeled to obtain the defect detection result of the sample to be detected.
[0063] In one embodiment, such as Figure 3 As shown, the training method of the defect image clustering model mainly includes the following steps.
[0064] Step S121: Obtain multiple defect image training samples.
[0065] Each defect image training sample includes: a historical defect area image and historical surface feature data of that historical defect area image.
[0066] It should be noted that the training samples for each defect image can be constructed from a large number of historical defect region images obtained using automatic optical detection technology and corresponding historical surface feature data. The method for obtaining the historical surface feature data is the same as the method for obtaining the surface feature data of the defect region image to be detected, including: sequentially performing filtering, brightness adjustment, contrast adjustment, and grayscale processing on the historical defect region image to generate a corresponding grayscale image; performing image segmentation on the grayscale image to generate a corresponding binary mask image; and performing feature extraction on the binary mask image to generate the historical surface feature data of the historical defect region image.
[0067] In this embodiment, the training samples of each defect image do not need to be labeled with data and can be directly input into the model for training, saving labor costs and reducing the time spent on model training.
[0068] Step S122: Perform image enhancement on each historical defect area image to generate multiple enhanced views for each historical defect area image, and perform median absolute deviation normalization on each historical surface feature data to obtain historical normalized surface feature data for each historical defect area image.
[0069] The image enhancement methods include: performing angle rotation, flipping, or cropping and scaling operations on each historical defect area image to obtain multiple enhanced views of each historical defect area image. The method of performing median absolute deviation normalization operation includes: performing median absolute deviation normalization operation on each historical surface feature data using formula (1) to obtain the corresponding historical normalized surface feature data.
[0070] In one specific embodiment, after image enhancement is performed on the historical defect region image of each defect image training sample, two corresponding enhanced views are generated. For example, the historical defect region image X of the i-th defect image training sample... i After image enhancement, two corresponding enhanced views are generated, namely the first enhanced view. and the second enhanced view Among them, the first enhanced view and the second enhanced view The dimensions are all the same as the corresponding historical defect area image X. i same.
[0071] Step S123: Based on each enhanced view, perform the first stage of preliminary training on the dimensionality reduction module to obtain a preliminary converged dimensionality reduction module.
[0072] In one embodiment, the dimensionality reduction module is obtained based on training an image autoencoder network, such as... Figure 4 As shown, the specific method for performing the first stage of preliminary training on the dimensionality reduction module includes the following steps.
[0073] ① An encoder based on the image autoencoder network performs dimensionality reduction and compression on each input augmented view. During the dimensionality reduction and compression process, it learns and extracts the texture features of each augmented view to generate historical texture feature data for each augmented view.
[0074] In one specific embodiment, such as Figure 4 As shown, the encoder includes multiple two-dimensional convolutional layers, each followed by a ReLU activation function to compress the input enhanced view into a low-dimensional feature representation. The size of the feature map is progressively reduced through sliding convolutional kernels and pooling to extract the historical texture feature data, while simultaneously increasing the number of channels. Preferably, each two-dimensional convolutional layer uses a 3×3 convolutional kernel with a stride of 2.
[0075] In this embodiment, the encoder achieves hierarchical feature extraction through layer-by-layer convolution operations. Each two-dimensional convolutional layer performs operations based on the feature map output by the previous two-dimensional convolutional layer, making the extracted features gradually abstract. This enables the gradual extraction of abstract representations from low-level features (such as edges and textures) to high-level semantic features from the original enhanced view, ensuring the accuracy of the extracted historical texture feature data.
[0076] ②Based on the decoder of the image autoencoder network, upsampling is performed on each historical texture feature data to generate multiple reconstructed images with the same dimension as the enhanced view.
[0077] like Figure 4 As shown, the decoder includes multiple two-dimensional transposed convolutional layers, each followed by an activation function, such as a ReLU activation function or a Sigmoid activation function, to learn to fill and expand the historical texture feature data, enlarge small feature maps, restore the spatial details of the image data, and thus obtain a reconstructed image. The reconstructed image has the same dimension as the enhanced view.
[0078] ③ Using a predefined autoencoder network loss function, the reconstruction error between each enhanced view and the corresponding reconstructed image is calculated, and the optimizer is used to update the model parameters of the image autoencoder network until a preliminary converged image autoencoder network is obtained as a dimensionality reduction module.
[0079] Preferably, the loss function of the autoencoder network is the mean squared error loss function, and the calculation formula is as follows:
[0080]
[0081] in, An enhanced view of the historical defect region images for the training samples of the i-th defect image; For this enhanced view The reconstructed image output by the image autoencoder network after input; N is the number of training samples of defective images; L AutoEncode The loss value of the image autoencoder network is represented by the average error between each enhanced view and the corresponding reconstructed image, which indicates its reconstruction error.
[0082] Furthermore, based on the calculated reconstruction error between each enhanced view and the corresponding reconstructed image, the gradient of the autoencoder network loss function (i.e., mean squared error loss function) with respect to the image autoencoder network is calculated via backpropagation. The model parameters of the image autoencoder network are then updated using an optimizer until a preliminarily converged image autoencoder network is obtained as a dimensionality reduction module.
[0083] Preferably, the optimizer is the Adam (Adaptive Moment Estimation optimizer) method, and the learning rate can be set to 0.0003; simultaneously, the number of training iterations of the image autoencoder network during the initial training phase can be set to 50. It should be noted that the learning rate, number of training iterations, and other training parameters can be set by the user as needed, and this application does not specifically limit them.
[0084] In this embodiment, on the one hand, training the image autoencoder network with multiple enhanced views of the historical defect region image ensures that multiple enhanced views of the same historical defect region image belong to the same cluster category, thus ensuring the clustering accuracy of the defect image clustering model. On the other hand, by first independently training the image autoencoder network of the dimensionality reduction module, the input enhanced view can be compressed into a low-dimensional feature representation, which can effectively remove noise, learn the intrinsic structure of the enhanced view, provide a foundation for subsequent deep feature learning and extraction, improve the comprehensiveness, richness, and accuracy of feature data, and further improve the clustering performance of the defect image clustering model.
[0085] Step S124: Based on the historical normalized surface feature data of each enhanced view and each historical defect area image, perform a second-stage joint training on the initially converged dimensionality reduction module, the deep feature extraction module, the feature fusion module, and the clustering module to obtain the finally converged defect image clustering model.
[0086] Specifically, the second-stage joint training relies on the initially converged image sub-encoding network obtained from the first-stage preliminary training and includes a first training branch, a second training branch, and a third training branch. This results in faster training speed and better model clustering performance. Specifically, the first training branch continuously optimizes the dimensionality reduction module by inputting each enhanced view into the initially converged image autoencoding network; the second training branch trains the deep feature extraction module by inputting the high-dimensional features output from the encoder of the image autoencoding network into the residual network, and further optimizes the dimensionality reduction module; the third training branch trains the feature fusion module and the clustering module by implementing feature fusion and inputting the fused features into the clustering projection network, and can further optimize the dimensionality reduction module and the deep feature extraction module.
[0087] In one embodiment, such as Figure 5 As shown, the specific methods for the second phase of joint training include the following steps.
[0088] ① Through the first training branch, based on the initially converged image autoencoder network, dimensionality reduction and compression are performed on each enhanced view to generate historical texture feature data for each enhanced view, and the dimensionality reduction module is optimized accordingly.
[0089] The method for optimizing the dimensionality reduction module is the same as the method for obtaining the dimensionality reduction module based on image autoencoder network training provided in the above embodiments, such as... Figure 5 As shown, for the sake of simplicity, I will not go into details here.
[0090] For example, consider the historical defect region image X, which is a training sample based on the i-th defect image. i First enhanced view obtained and the second enhanced view Input the encoder and output the first enhanced view. Historical texture feature data and the second enhanced view Historical texture feature data The decoder then outputs the first enhanced view. Reconstructed image and the second enhanced view Reconstructed image The first enhanced view is compared using the mean squared error loss function. With the corresponding reconstructed image Reconstruction error and second enhanced view With the corresponding reconstructed image To minimize the reconstruction error, the image autoencoder network is optimized.
[0091] It should be noted that the first enhanced view Historical texture feature data and the second enhanced view Historical texture feature data Same size, first enhanced view Reconstructed image and the second enhanced view Reconstructed image Same size.
[0092] ② Through the second training branch, based on the residual network, learn and extract the deep semantic features of each historical texture feature data, generate the historical semantic feature data of each enhanced view, and train the deep feature extraction module accordingly, and continue to optimize the dimensionality reduction module.
[0093] In one embodiment, such as Figure 5As shown, the method for obtaining the deep feature extraction module based on residual network training includes: learning and extracting deep semantic features of each historical texture feature data based on the residual network to generate historical semantic feature data for each enhanced view; mapping each high-dimensional historical semantic feature data to a low-dimensional projection space based on an instance projection network to generate a projection instance for each enhanced view; calculating the instance error between each projection instance using a predefined instance loss function, and updating the model parameters of the residual network using an optimizer until a preliminary converged residual network is obtained as the deep feature extraction module, while simultaneously optimizing the model parameters of the image autoencoder network.
[0094] In one specific embodiment, such as Figure 6 As shown, the residual network includes two two-dimensional convolutional layers, each connected to a ReLU activation function. Preferably, each two-dimensional convolutional layer uses a 3×3 convolutional kernel. The residual network uses skip connections to directly add the input to the output of the main path, reducing the computational cost by decreasing the number of channels in the intermediate layers while maintaining the network's expressive power, and further extracting the deep semantic features of each enhanced view.
[0095] In this embodiment, by inputting the historical texture feature data of each enhanced view into the residual network, the corresponding historical semantic feature data can be obtained. For example, the first enhanced view... Historical texture feature data and the second enhanced view Historical texture feature data After inputting the residual network, the first enhanced view is output accordingly. Historical semantic feature data and the second enhanced view Historical semantic feature data
[0096] The instance projection network maps the high-dimensional features output by the residual network to a low-dimensional projection space, typically used for contrastive learning tasks. In one specific embodiment, such as... Figure 7 As shown, the instance projection network includes: a fully connected layer, a ReLU activation function, another fully connected layer, and a normalization layer connected in sequence. The fully connected layer performs linear transformations, while the normalization layer accelerates training and improves model stability by standardizing the input data.
[0097] In this embodiment, the instance projection network generates corresponding projection instances of each enhanced view based on the input historical semantic feature data. For example, the first enhanced view... Historical semantic feature data and the second enhanced view Historical semantic feature data After inputting the instance projection network, the first enhanced view is output accordingly. Projection examples and the second enhanced view Projection examples
[0098] In one embodiment, the instance loss function is a contrastive learning loss function, calculated as follows:
[0099]
[0100] in, The first augmented view of the i-th defect image training sample. Projection instance and second enhanced view Projection example; Z j Let be a projection instance of an enhanced view of a training sample of the j-th defect image; sim is a similarity calculation function, such as the cosine similarity calculation function; τ is a temperature hyperparameter used to control the sharpness of data distribution; N is the number of training samples of the defect image, and 2N is the number of all enhanced views. It should be noted that if each historical defect area image is enhanced to generate a enhanced view, the 2N parameter in formula (3) should be adjusted to aN accordingly; L Instance To address the instance error between projection instances, feature representations between different projection instances are learned by narrowing the similarity between projection instances of different augmented views of the same defective image training sample, while simultaneously widening the similarity between projection instances of different defective image training samples.
[0101] Furthermore, based on the instance error between each projected instance obtained through calculation, the gradient of the instance loss function (i.e., the contrastive learning loss function) with respect to the image autoencoder network, the residual network, and the instance projection network is calculated through backpropagation. The optimizer is then used to update the model parameters of each network until a converged residual network is obtained as the deep feature extraction module, while the dimensionality reduction module is optimized.
[0102] ③ Through the third training branch, based on the fully connected layer, each historical normalized surface feature data is expanded to the same dimension as the historical semantic feature data, and feature fusion is performed with each historical semantic feature data to generate historical fused feature data for each enhanced view.
[0103] The feature fusion module employs a fully connected layer. It should be understood that a fully connected layer is a fundamental and important network layer in deep learning models, where each neuron is fully connected to all neurons in the previous layer. Through its global connectivity, the fully connected layer can fuse scattered, local features from normalized historical surface feature data and historical semantic feature data extracted by the residual network, performing weighted combination and nonlinear transformation to form a global, highly abstract feature representation. This achieves global feature fusion and high abstraction, helping the defect image clustering model understand the "whole."
[0104] Therefore, the fused feature data obtained by the feature fusion module can express more comprehensive, richer and more complex features in the defect area image, so as to map the probability to each cluster category in the subsequent image clustering task, making the judgment basis of the clustering algorithm more comprehensive and improving the clustering accuracy and robustness of the defect image clustering model.
[0105] Preferably, the fully connected layer can be connected to a ReLU activation function or a Sigmoid activation function to enhance the expressive power of the defective image clustering model through nonlinear transformation, enabling it to learn more complex data patterns, features, and distributions.
[0106] In this embodiment, by inputting the historical normalized surface feature data and the historical semantic feature data of each enhanced view into the fully connected layer, the historical fused feature data of each enhanced view can be obtained. For example, the historical defect region image X of the i-th defect image training sample... i Historical surface feature training data F i Its normalized historical normalized surface feature training data L i Each with the first enhanced view Historical semantic feature data and the second enhanced view Historical semantic feature data Feature fusion is performed to obtain the first enhanced view. Historical fusion feature data and the second enhanced view Historical fusion feature data
[0107] ④ Through the third training branch, based on the clustering projection network, the historical fusion feature data are nonlinearly mapped to the clustering space, and the enhanced views are clustered and assigned to generate a clustered view for each enhanced view, so as to train the clustering module and continue to optimize other modules.
[0108] In one embodiment, such as Figure 5As shown, the method for obtaining the clustering module based on training a clustering projection network includes: learning the clustering features of each historical fusion feature data based on the clustering projection network, generating clustered views of each enhanced view, so as to classify each enhanced view into the target cluster category; using a predefined clustering loss function, calculating the clustering error of each enhanced view, and using an optimizer to update the model parameters of the clustering projection network until a preliminary converged clustering projection network is obtained as the clustering module, while optimizing the model parameters of the remaining networks, including the network parameters of the image autoencoder network, the residual network, the instance projection network, and the fully connected layer.
[0109] The clustering projection network combines clustering analysis with projection technology. By projecting high-dimensional data into a low-dimensional space, it simplifies the data structure and reduces computational complexity while retaining key information. Then, in the low-dimensional space, clustering algorithms are used to discover the inherent grouping patterns in the data for clustering analysis. This can effectively alleviate the curse of dimensionality, reduce computational costs, and reduce the impact of noise. It can also potentially discover the nonlinear structure of the historical fusion feature data, thereby improving the clustering accuracy of the clustering model.
[0110] In one specific embodiment, such as Figure 8 As shown, the clustering projection network comprises: a fully connected layer, a ReLU activation function, another fully connected layer, and a Softmax activation function connected in sequence. It should be understood that the Softmax activation function is used in the output layer of a multi-class classification task, converting any real-valued vector output of the network into an intuitive probability distribution, thereby facilitating classification decisions and loss calculations.
[0111] The clustering projection network performs clustering analysis on each enhanced view based on the clustering characteristics of each historical fusion feature data, and generates a clustered view for each enhanced view. The clustered view is used to visualize the probability that a corresponding enhanced view belongs to multiple cluster categories. Preferably, the number of cluster categories can be preset, and clustering analysis is performed on each image of the defect region to be detected based on the preset number of cluster categories. For example, if nine cluster categories are set and numbered 1-9 respectively, the clustered view includes the probability that the enhanced view belongs to each of the nine cluster categories. However, it should be noted that the number of cluster categories can be set by the user as needed, and this application is not limited to this.
[0112] After inputting the historical fusion feature data into the clustering projection network, clustered views of each enhanced view can be obtained. For example, the first enhanced view... Historical fusion feature data and the second enhanced view Historical fusion feature data After inputting the clustering projection network, the first enhanced view is output accordingly. Clustered view and the second enhanced view Clustered view Among them, the first enhanced view Clustered view Including the first enhanced view The probability of belonging to clusters 1-9 respectively; second enhanced view Clustered view Includes a second enhanced view The probability of belonging to clusters 1-9 respectively.
[0113] In one embodiment, the clustering loss function includes: a negative entropy regularization term L. ne And comparative loss L cont .
[0114] Specifically, the negative entropy regularization term L ne By introducing negative entropy as a regularization method, the clustering projection network is encouraged to learn sparser, non-Gaussian, and more ordered feature representations or output distributions. The calculation formula is as follows:
[0115]
[0116] in, The probability that multiple augmented views of the i-th defect image training sample belong to the k-th cluster category; K is the preset number of cluster categories; N is the number of defect image training samples; p (k) is the global probability of the k-th cluster category, which is the proportion of this cluster category in the cluster assignment of all defective image training samples, and is used to measure the balance of the cluster distribution.
[0117] Comparison loss L cont A similarity metric, such as cosine similarity, is used to bring positive sample pairs closer together and push negative sample pairs further apart. This encourages similar clustering assignments for multiple augmented views of the same defective image training sample, while different clustering assignments exist for augmented views of different defective image training samples. The calculation formula is as follows:
[0118]
[0119] in, The first augmented view of the i-th defect image training sample. Clustered view and second enhanced view The corresponding clustering view, and Forming positive sample pairs; C j The clustered view of a certain augmented view of the training sample of the j-th defect image, and... The negative sample pairs are formed; sim is the similarity calculation function, such as the cosine similarity calculation function; τ is the temperature hyperparameter, used to control the sharpness of the data distribution; N is the number of training samples of the defect image, and 2N is the number of all enhanced views. It should be noted that if each historical defect area image is enhanced to generate a enhanced view, the 2N parameter in formula (6) should be adjusted to aN accordingly.
[0120] According to the negative entropy regularization term L ne And comparative loss L cont Calculate the clustering error L for each enhanced view. cluster The calculation formula is:
[0121]
[0122] in, The probability that multiple augmented views of the training sample for the i-th defect image belong to the k-th cluster category; The probability that multiple augmented views of the training sample for the j-th defect image belong to the k-th cluster category; K is the preset number of cluster categories; α is the value used to adjust the negative entropy regularization term L. ne And contrast loss L cont The weighting factor of the proportion; L cont This represents the contrast loss for each enhanced view.
[0123] Furthermore, based on the clustering error of each enhanced view obtained through calculation, the gradient of the clustering loss function with respect to each network of the defect image clustering model is calculated through backpropagation. The model parameters of each network are then updated using an optimizer until a converged clustering projection network is obtained as the clustering module. At the same time, the dimensionality reduction module, the feature extraction module, the feature fusion module, and the clustering module are optimized to finally obtain a converged defect image clustering model.
[0124] Preferably, the optimizer for the second-stage joint training uses the Adam method, with a learning rate of 0.0003, a training quantity per session of 32, and a training iteration count of 200. It should be noted that the learning rate, training quantity per session, training iteration count, and other training parameters can be set by the user as needed, and this application does not impose specific limitations.
[0125] The defect image clustering model described in this application can be trained by directly inputting historical defect region images and corresponding historical normalized surface feature training data, eliminating the need for manual data annotation, thus significantly saving labor costs and reducing training time. Test experiments have verified that the clustering accuracy of the effective categories of the defect image clustering model is over 90%, and the clustering results directly meet clustering requirements.
[0126] A convergent defect image clustering model can be used to perform cluster analysis on images of defective regions to be detected, predicting the cluster category of the image. The prediction method includes the following steps.
[0127] ① Perform median absolute deviation normalization on the surface feature data of the image of the defect region to be detected to obtain the corresponding normalized surface feature data, and input them together with the image of the defect region to be detected into a converged defect image clustering model.
[0128] ② The image autoencoder network of the dimensionality reduction module is used to reduce and compress the input image of the defect region to be detected, and to extract the texture features of the image of the defect region to be detected, thereby generating the texture feature data of the image of the defect region to be detected.
[0129] ③The residual network of the deep feature extraction module is used to further extract deep semantic features from the texture feature data to generate semantic feature data of the image of the defect region to be detected.
[0130] ④ Through the fully connected layer of the feature fusion module, the normalized surface feature data of the image of the defect region to be detected is expanded to the same dimension as the semantic feature data, and feature fusion is performed with the semantic feature data to generate the fused feature data of the image of the defect region to be detected.
[0131] ⑤ Using the clustering projection network of the clustering module, the image of the defective region to be detected is divided into the target clustering category according to the fusion feature data of the image of the defective region to be detected, so as to generate the clustering result of the image of the defective region to be detected.
[0132] This application utilizes a defect image clustering model to effectively identify the defect type in the image of the defect region to be detected, demonstrating significant effectiveness, particularly in identifying complex defects, with high clustering accuracy. It can effectively distinguish whether defects are randomly distributed or exhibit specific distribution patterns (such as rings, scratches, clusters, etc.), determining whether the defect is a systemic process problem or a random factor, thus qualitatively characterizing the defect and pinpointing the root cause of process anomalies. This guides engineers to precisely adjust process parameters, saving time and costs. Furthermore, cluster analysis of wafer defects from different production batches allows for comparison of the differences in wafer defect characteristics across batches, thereby monitoring process stability and enabling data-driven continuous improvement.
[0133] Furthermore, the defect image clustering model described in this application can also be used for training and applying defect image classification models. Specifically, a defect image classification model refers to predicting the defect type of each defect region image to be detected, generating defect detection results for the sample to be detected, and determining whether the sample is qualified. In the prior art, training a classification model requires manual data annotation of a large amount of input training data, and intermediate data output from different network layers also needs to be annotated, resulting in high manual costs and long training time. However, the defect image clustering model provided in this application can preferentially obtain the cluster categories of each defect region image to be detected. Therefore, when training the classification model, only a small number of historical defect region images for each cluster category need to be annotated, without needing to annotate the training data, i.e., all historical defect region images, thereby greatly reducing the time spent on data annotation and saving manual costs. In addition, the historical fusion feature data of each historical defect region image extracted based on the defect image clustering model can also be used as the classification basis of the classification model, enabling the classification model to effectively identify and distinguish various complex defects, and improving the classification accuracy of the classification model.
[0134] This application also provides a defect detection system. The defect detection system includes a memory and a processor.
[0135] The memory stores computer instructions to support the operation of the defect detection system. The memory can be volatile or non-volatile, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable categories of memory.
[0136] The processor is connected to the memory and configured to execute computer instructions stored in the memory to implement the defect image clustering method as described in any of the above embodiments. The processor may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the defect image clustering method can be accomplished by integrated logic circuits in the processor's hardware or by instructions in software form. The processor may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0137] In one embodiment, the defect detection system further includes a defect detection device.
[0138] like Figure 9 As shown, the defect detection device includes a motion stage and a microscopic imaging module.
[0139] The motion stage is used to carry the sample to be tested and to move multiple areas of the sample to be tested sequentially to the imaging area of the microscopic imaging module.
[0140] Specifically, the motion stage can move along a preset trajectory, causing each area to be detected on the sample to be detected to move sequentially to the imaging area.
[0141] The microscopic imaging module is used to sequentially acquire images of the defect areas to be detected in the plurality of areas to be detected, so as to obtain surface feature data of each defect area image.
[0142] In one specific embodiment, such as Figure 9 As shown, the microscopic imaging module includes: an illumination control device, an illumination source, and an imaging device, used to control the illumination source to illuminate the area to be tested of the sample located on the motion stage via the illumination control device, and to capture an image of the sample surface of the area to be tested via the imaging device. In one embodiment, the imaging device includes a high-resolution camera.
[0143] like Figure 9 As shown, the microscopic imaging module further includes an image processing unit. The image processing unit is connected to the imaging device and is used to preprocess each sample surface image to generate one or more images of the predicted detection region, and to extract surface features from each image of the defect region to generate surface feature data for each image of the defect region to be detected. This data is then used by the processor to execute the defect image clustering method described in any of the above embodiments to generate clustering results for each image of the defect region to be detected.
[0144] It should be understood that the division of modules or units in the embodiments of this application is illustrative and only represents a logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional modules / units in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or have two or more modules / units integrated into a single module or unit. The integrated modules or units described above can be implemented in hardware or as software functional modules.
[0145] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented using computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0146] In the embodiments provided in this application, the computer-readable and writable storage medium may include read-only memory, random access memory, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, flash memory, USB flash drive, portable hard drive, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Additionally, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable and writable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are intended for non-transient, tangible storage media. The disks and optical discs used in the application include compact discs (CDs), laser discs, optical discs, digital multifunction discs (DVDs), floppy disks, and Blu-ray discs, where disks typically copy data magnetically, while optical discs use lasers to copy data optically.
[0147] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0148] In summary, this application provides a defect image clustering method, a defect detection system, and a medium. A defect image clustering model is obtained through two-stage training. Based on this model, clustering analysis is performed on one or more defect region images of the sample to be detected, along with surface feature data of each defect region image, to predict the clustering results. This effectively identifies the defect types in each defect region image, particularly demonstrating significant effectiveness in identifying complex defects. The high clustering accuracy aids in the qualitative analysis of defect problems and the localization of the root causes of process anomalies, thereby guiding continuous improvement of semiconductor or broader semiconductor manufacturing processes. Furthermore, the clustering results can be used to train subsequent defect image classification models, effectively reducing the time required for data annotation and saving labor costs. Therefore, this application effectively overcomes the various shortcomings of existing technologies and possesses high industrial applicability.
[0149] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A defect image clustering method, characterized in that, include: Acquire images of one or more defective regions to be detected in the sample to be tested, as well as surface feature data of each defective region image; The median absolute deviation normalization operation is performed on the surface feature data of each defect region image to obtain the normalized surface feature data of each defect region image. The images of each defect region to be detected and the corresponding normalized surface feature data are input into a pre-trained defect image clustering model. Cluster analysis is performed on each defect region image to be detected to generate clustering results for each defect region image to be detected. The defect image clustering model includes: a dimensionality reduction module, used to reduce and compress the input images of each defect region to be detected, and to extract texture features from each image to generate texture feature data for each defect region; a deep feature extraction module, connected to the dimensionality reduction module, used to further extract deep semantic features from the texture feature data of each defect region to generate semantic feature data for each defect region; a feature fusion module, connected to the deep feature extraction module, used to fuse the normalized surface feature data and semantic feature data of each defect region to generate fused feature data for each defect region; and a clustering module, connected to the feature fusion module, used to classify each defect region to be detected into a target cluster category based on the fused feature data of each defect region to generate clustering results for each defect region.
2. The defect image clustering method according to claim 1, characterized in that, Cluster analysis is performed on the images of each defect region to be detected based on the number of preset cluster categories.
3. The defect image clustering method according to claim 1, characterized in that, The clustering results include the probability of the cluster category to which the image of the defective region to be detected belongs.
4. The defect image clustering method according to claim 1, characterized in that, The methods for performing median absolute deviation normalization on the surface feature data of the image of the defect region to be detected include: ; in, The surface feature data; The normalized surface feature data; The median of the surface feature data; The interquartile range of the surface feature data.
5. The defect image clustering method according to claim 1, characterized in that, The method of feature fusion for normalized surface feature data and semantic feature data of each defect region image to be detected includes: expanding the normalized surface feature data of each defect region image to have the same dimension as the corresponding semantic feature data.
6. The defect image clustering method according to claim 1, characterized in that, The training methods for the defect image clustering model include: Acquire multiple defect image training samples; wherein, each defect image training sample includes: a historical defect area image and historical surface feature data of the historical defect area image; Image enhancement is performed on each historical defect area image to generate multiple enhanced views for each historical defect area image. Median absolute deviation normalization is performed on each historical surface feature data to obtain historical normalized surface feature data for each historical defect area image. Based on each enhanced view, the dimensionality reduction module is subjected to the first stage of preliminary training to obtain a dimensionality reduction module that has initially converged. Based on the historical normalized surface feature data of each enhanced view and each historical defect area image, a second-stage joint training is performed on the initially converged dimensionality reduction module, the deep feature extraction module, the feature fusion module, and the clustering module to obtain the finally converged defect image clustering model.
7. The defect image clustering method according to claim 6, characterized in that, The dimensionality reduction module is obtained based on training an image autoencoder network. The initial training method in the first stage includes: The encoder based on the image autoencoder network performs dimensionality reduction and compression on each input augmented view. During the dimensionality reduction and compression process, it learns and extracts the texture features of each augmented view to generate historical texture feature data for each augmented view. Based on the decoder of the image autoencoder network, upsampling is performed on each historical texture feature data to generate multiple reconstructed images with the same dimension as the enhanced view; A predefined autoencoder loss function is used to calculate the reconstruction error between each enhanced view and the corresponding reconstructed image, and an optimizer is used to update the model parameters of the image autoencoder until a preliminary converged image autoencoder is obtained as a dimensionality reduction module.
8. The defect image clustering method according to claim 6, characterized in that, The second phase of joint training includes the following methods: Through the first training branch, based on the initially converged image autoencoder network, dimensionality reduction and compression are performed on each enhanced view to generate historical texture feature data for each enhanced view, and the dimensionality reduction module is optimized accordingly. Through the second training branch, based on the residual network, deep semantic features of each historical texture feature data are learned and extracted to generate historical semantic feature data for each enhanced view, and the deep feature extraction module is trained accordingly, and the dimensionality reduction module is further optimized. Through the third training branch, based on the fully connected layer, each historical normalized surface feature data is expanded to the same dimension as the historical semantic feature data, and feature fusion is performed with each historical semantic feature data to generate historical fused feature data for each enhanced view. Furthermore, through the third training branch, based on the clustering projection network, the historical fusion feature data are nonlinearly mapped to the clustering space, and the enhanced views are clustered and assigned to generate a clustered view for each enhanced view, so as to train the clustering module and continue to optimize other modules.
9. The defect image clustering method according to claim 8, characterized in that, The methods for obtaining the deep feature extraction module based on residual network training include: Based on the residual network, deep semantic features of each historical texture feature data are learned and extracted to generate historical semantic feature data for each enhanced view. Based on the instance projection network, high-dimensional historical semantic feature data are mapped to a low-dimensional projection space, and a projection instance of each enhanced view is generated. A predefined instance loss function is used to calculate the instance error between each projected instance, and an optimizer is used to update the model parameters of the residual network until a preliminary converged residual network is obtained as a deep feature extraction module. At the same time, the model parameters of the image autoencoder network are optimized.
10. The defect image clustering method according to claim 8, characterized in that, The methods for obtaining the clustering module based on training a clustering projection network include: Based on the clustering projection network, the clustering features of each historical fusion feature data are learned, and clustered views of each enhanced view are generated to classify each enhanced view into the target cluster category. A predefined clustering loss function is used to calculate the clustering error of each augmented view, and an optimizer is used to update the model parameters of the clustering projection network until a preliminary converged clustering projection network is obtained as the clustering module, while the model parameters of the remaining networks are optimized.
11. The defect image clustering method according to claim 1, characterized in that, The methods for obtaining the surface feature data of the image of the defect region to be detected include: The image of the defect region to be detected is sequentially filtered, brightness adjusted, contrast adjusted, and grayscale processed to generate a grayscale image. The grayscale image is segmented to generate a binary mask image, and features are extracted from the binary mask image to generate surface feature data of the defect region image to be detected. The surface feature data includes one or more of the following: defect location, defect area, defect length, defect brightness, defect roughness, spot similarity, and defect contrast in the defect region image to be detected.
12. A defect detection system, characterized in that, include: Memory, on which computer instructions are stored; A processor, connected to the memory, and configured to execute computer instructions stored on the memory to implement the defect image clustering method as described in any one of claims 1-11.
13. The defect detection system according to claim 12, characterized in that, Also includes: Defect detection device; The defect detection device includes: A motion stage is used to carry the sample to be tested and to move multiple areas of the sample to be tested sequentially to the imaging area of the microscopic imaging module. The microscopic imaging module is used to sequentially acquire images of the defect areas to be detected in the multiple areas to be detected, so as to obtain surface feature data of each defect area image.
14. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed by the processor, the defect image clustering method as described in any one of claims 1-11 is implemented.
Citation Information
Patent Citations
Wafer surface defect detection method based on machine vision
CN114910480A
