Wafer defect image classification method based on adaptive parameter selection OPTICS

By selecting the OPTICS algorithm selected by adaptive parameters in the wafer defect image classification, and the improved YOLOV10 neural network model, the number of defects in the existing technologies unbalanced, noise interference, and cluster parameter sensitivity issues have been solved, achieving high height Classification of precision and efficient wafer defects.

CN119380102APending Publication Date: 2025-01-28JIANGSU UNIV OF SCI & TECH +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411517998.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art has problems with the number of defect categories, noise interference, outlier influence and clustering parameter sensitivity in wafer defect image classification, resulting in low classification accuracy and high computational complexity.

Method used

Adopt the OPTICS algorithm based on adaptive parameters, remove the isolation and twin outbound points, design comprehensive clustering indicators, use the K-D tree to select the MINPTS parameter range, the depth-based priority search algorithm combined cluster, and improve the YOLOV10 nerve nerve The network model is to improve the classification accuracy.

Benefits of technology

Effectively removing noise and liberation points, improved the stability and accuracy of clustering, enhanced the characteristics of the characteristic extraction ability and classification efficiency of the neural network model, and significantly improved the accuracy and efficiency of wafer defect classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380102A_ABST
    Figure CN119380102A_ABST
Patent Text Reader

Abstract

The invention discloses a wafer defect image classification method based on adaptive parameter selection OPTICS. The method comprises the following steps: performing isolation and twin outlier screening on wafer defect images; the designed intra-cluster density and inter-cluster density function considering the shape and size of the cluster is used as a comprehensive clustering index; a K-D tree algorithm is adopted to select the range of MinPts parameters of the OPTICS, and the optimal MinPts clustering parameters are obtained based on the comprehensive clustering indexes; a depth-first search algorithm based on a graph theory is adopted to analyze connectivity between data points to merge spatial adjacent clusters, and a clustering result is obtained; and using the improved neural network model to classify clustering results. According to the method, the OPTICS is improved from the three aspects of outlier removal of the wafer defect image, range selection of MinPts parameters of the OPTICS algorithm and self-adaptive parameter selection of the MinPts parameters of the OPTICS algorithm, and the preprocessed data set is classified by adopting the improved neural network classification model, so that the wafer defect classification precision is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of semiconductors, relates to wafer detection technology, and specifically relates to a wafer defect image classification method based on adaptive parameter selection OPTICS. Background Art

[0002] Since the semiconductor production process is extremely complex, it needs to go through wafer design, production, packaging and other links to produce crystal chips for practical application. The complex process makes it easy for wafers to have defects during the manufacturing process, thus affecting the yield of the product. Semiconductor testing is divided into wafer testing and packaging testing. During the mid-test stage, wafer-level probing (Chip Probing) is used to verify the electrical performance and functionality of each chip on the wafer, mark defective crystals and generate wafer defect images (Wafer Map). Analyzing wafer defect images is of great significance for wafer manufacturers to detect process defects and improve production yield.

[0003] The WM-811k dataset has an imbalance in the number of defect categories. Currently, improvements to wafer defect recognition methods are mostly focused on optimizing classification models. Since unsupervised machine learning methods can analyze the internal laws of the learning data itself, some researchers remove noise and highlight the main features of the dataset through preprocessing to improve classification accuracy and reduce the computational complexity and time cost of the algorithm. However, traditional methods do not suppress the impact of outliers in the processing of wafer defect datasets, and even introduce new noise, and lack algorithms to ensure the integrity of defect features. At the same time, the fixed parameters of the clustering algorithm are not applicable to all images, and the sensitivity to the parameters also leads to unstable clustering effects. Summary of the invention

[0004] Purpose of the invention: In order to overcome the deficiencies in the prior art, a wafer defect image classification method based on adaptive parameter selection OPTICS is provided, OPTICS is improved from three aspects: outlier removal of wafer defect images, range selection of MinPts parameter of OPTICS algorithm and adaptive parameter selection, and an improved neural network classification model is used to classify the preprocessed data set, which effectively improves the wafer defect classification accuracy.

[0005] Technical solution: To achieve the above object, the present invention provides a wafer defect image classification method based on adaptive parameter selection OPTICS, comprising the following steps:

[0006] S1: Screening out isolated and twin outliers from wafer defect images;

[0007] S2: The designed intra-cluster density and inter-cluster density functions that take into account the shape and size of the clusters are used as comprehensive clustering indicators;

[0008] S3: Use the KD tree algorithm to select the range of the MinPts parameter of OPTICS, and obtain the optimal clustering parameter of MinPts based on the comprehensive clustering index;

[0009] S4: A depth-first search algorithm based on graph theory is used to analyze the connectivity between data points to merge spatially adjacent clusters and obtain clustering results;

[0010] S5: Use the improved neural network model to classify the clustering results.

[0011] Furthermore, in the step S1 , isolated outlier points that are not connected to any other defective grains and twin outlier points that have only two interconnected points are both outliers.

[0012] Furthermore, the design method of the intra-cluster density function in step S2 is:

[0013] A cluster density calculation method that reflects the cluster shape is designed. The variance of the distance from the cluster point to the cluster center is used to reflect the distribution of the cluster points. The cluster density Com is then obtained by taking the weighted average of the average distance from all points to the cluster center and the variance. The formula is:

[0014]

[0015] Where C is the number of clusters, n i is the number of points in the i-th cluster, d(x ij ,μ i ) is point x ij To cluster center μ i The distance is the average distance from the points in the i-th cluster to the center point.

[0016] Furthermore, the design method of the inter-cluster density function in step S2 is:

[0017] A cluster density calculation method based on kernel density estimation is designed to replace the traditional simple sample point counting, and the density of cluster center points and the distance of the nearest neighbor points are used to evaluate the separation between clusters; the specific steps are as follows:

[0018] A1: Traverse all cluster pairs (C i ,C j ), C i ,C j For different clusters; for each valid cluster, calculate the average value of its data points as the center point, and then calculate the average value of the two center points as the midpoint between clusters;

[0019] A2: Use kernel density to calculate the midpoints between clusters and cluster C i and C j The density of the center point is used as the density at the corresponding point; A3: for cluster Ci and cluster C j Use the nearest neighbor algorithm to calculate cluster C i Each point in cluster C j The average distance of the closest point in the cluster C j Each point in cluster C i The average distance between the closest points;

[0020] A4: For each pair of clusters, calculate the ratio of the center point density of the cluster to the center point density of the two clusters, and combine the nearest neighbor distance between clusters to accumulate the calculation results into the total cluster density Den;

[0021] A5: After traversing all cluster pairs, calculate the average value of the accumulated inter-cluster density, normalize the accumulated inter-cluster density value, and obtain the average density of all cluster pairs. At this time, Den is

[0022]

[0023] Where Den is the density between clusters, C is the number of clusters, density(u ij ) is the core point density of the merged cluster, density(v i ) and density(v j ) are clusters C i and cluster C j The density, d min (C i ,C j ) is cluster C i and cluster C j The distance between the nearest neighbors.

[0024] Furthermore, in step S2, the comprehensive clustering index Score is calculated by the intra-cluster density Com and the inter-cluster density Den, which is expressed as

[0025] Score=Com+Den (3)

[0026] Furthermore, the step S3 is specifically as follows:

[0027] B1: Use data points to construct a KD tree to calculate the distance between each sample point in the data set and other sample points, and obtain the distance matrix of each data point;

[0028] B2: Arrange the distance matrix in non-descending order to obtain the density distribution information of the data points;

[0029] B3: For each distance value, calculate the average number of data points contained in the circle with the current distance value as the radius, round it up, and finally take the average as the upper limit of the MinPts range. Since at least two sample points can form a valid cluster, the lower limit is set to 2;

[0030] B4: Iterate the OPTICS clustering for each MinPts value within the range, calculate the score according to the comprehensive indicator Score, and find the parameter value with the smallest score during the iteration process, which is the optimal MinPts clustering parameter.

[0031] Furthermore, the step S4 is specifically as follows:

[0032] C1: Construct n×n distance matrix D, data point x i and x j The Euclidean distance between ij ;

[0033] D ij =||x i -x j ||2 (4) where ||·||2 represents the Euclidean norm;

[0034] C2: Setting distance threshold To determine directly connected clusters, the distance matrix D is converted into an adjacency matrix A and compressed into a sparse matrix representation; if A ij =1 means x i and x j The distance is less than τ, indicating that the two are directly connected; A ij =0 means the two are not directly connected;

[0035]

[0036] C3: Use the depth-first search algorithm to find the connected components in the graph. For each unvisited node, start the algorithm from that node; traverse all nodes connected to that node and assign connected component labels. Then, treat all data points belonging to the same connected component as a cluster, update the labels of the data points and uniformly mark them with the same cluster label. Finally, merge all different connected components into one cluster.

[0037] In step S4, a graph-theory-based method for identifying connected component supplementary feature clusters is used to merge similar clusters, and the merged new clusters are defined as supplementary feature clusters.

[0038] Furthermore, the neural network model in step S5 uses the YOLOV10 network as a basic model, and the specific improvement methods include:

[0039] Based on the YOLOV10 model, the C2f module adds a full-dimensional dynamic convolution, namely the ODConv (Omni-Dimensional Dynamic Convolution) module. The ODConv module adopts a multi-dimensional attention mechanism and learns the complementary attention of the convolution kernel in all four dimensions of the kernel space (i.e., the spatial size, the number of input channels, and the number of output channels of each convolution layer) through a parallel strategy;

[0040] Complementary attention is used to enhance the expressive power and feature extraction ability of the convolution kernel. The attention weights of different dimensions are multiplied element by element with the convolution kernel to obtain the new convolution kernel weight W′:

[0041] W'=W☉α w ☉α s ☉α c ☉α f (6)

[0042] Among them, ☉ represents element-by-element multiplication, W represents the convolution kernel, and α w , α s , α c , α f They represent the attention weights of the convolution kernel, spatial dimension, input channel, and output channel respectively; the new convolution kernel will adaptively adjust the weights according to the characteristics of the input feature map, thereby achieving complementary feature extraction in multiple dimensions.

[0043] In order to enable the model to capture more global features, the inverted residual module of MobileNetV2 is introduced in ODConv, and a new inverted residual full-dimensional dynamic convolution module IRODConv (InvertedResidualsODConv) is proposed, which can capture more features without significantly increasing the amount of calculation; and global average pooling and global maximum pooling are added to better extract global features;

[0044] By combining the depth-wise separable convolution and attention mechanism in the inverted residual module, the final output is:

[0045]

[0046] Among them, X is the input feature map, W k is the kth convolution kernel weight, Res(X) is the output of the inverted residual module, and Y is the final output. This process realizes the adaptive adjustment of the convolution kernel's attention in each dimension, enabling the model to dynamically select important features, reduce unnecessary calculations, and enhance the flexibility of feature extraction. It reduces the number of parameters and calculations, and improves the overall efficiency of the model. The inverted residual module adds a residual connection path. When the input and output dimensions are the same, the input and output are directly added to retain information and improve the efficiency of gradient transfer.

[0047] The improved IRODConv is combined with the C2f module to construct a new feature fusion module C2f_IRODConv, and then introduced into the original YOLOV10 model to form an improved YOLOV10 network model.

[0048] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0049] 1. The method of the present invention takes into account the interference of algorithm calculation amount and noise in the data set, designs a method of using 8-neighborhood to screen out outliers, and uses KD tree to select the MinPts parameter range; improves the clustering indicators of intra-cluster density and inter-cluster density to consider the shape and size of feature clusters, and uses new indicators to select the optimal MinPts parameter; designs a graph-theory-based supplementary feature cluster method to restore misjudged noise points and uses a depth-first search algorithm to solve the problem of incomplete feature clusters.

[0050] 2. The present invention proposes an improved YOLOV10 classification model suitable for wafer defect classification. The inverse residual module in MobileNetV2 is added to ODConv, and global maximum pooling and global average pooling are introduced to form an inverse difference full-dimensional dynamic convolution (IRODConv). This module improves the feature extraction performance of the model in the wafer defect classification task and improves the classification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Flowchart for selecting optimal clustering parameters for OPTICS;

[0052] Figure 2 Schematic diagram of outliers;

[0053] Figure 3 Schematic diagram for removing outliers;

[0054] Figure 4 This is the Edge-Ring type defect clustering result diagram;

[0055] Figure 5 This is the ODConv structure diagram;

[0056] Figure 6 This is the IRODConv structure diagram;

[0057] Figure 7 This is the YOLOV10 network structure diagram for introducing c2f_IRODConv;

[0058] Figure 8 Comparison diagram of original images and clustering results of all types of defects;

[0059] Fig. 9This is the fixed parameter OPTICS clustering result diagram of Donut defect;

[0060] Fig.10 This is a Near-full category defect image diagram under the clustering algorithm of the present invention;

[0061] Fig.11 This is the classification accuracy result diagram under the same model;

[0062] Fig.12 This is the classification F1 score result diagram under different models;

[0063] Fig.13 The following are the classification recall results under different models. DETAILED DESCRIPTION

[0064] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0065] The present invention provides a wafer defect image classification method based on adaptive parameter selection OPTICS, comprising the following steps:

[0066] S1: Screening out isolated and twin outliers from wafer defect images;

[0067] In step S1 of this embodiment, the outlier situation is as follows: Figure 2 As shown, (a) is a schematic diagram of an isolated outlier, (b) and (c) are schematic diagrams of twin outliers, where the gray area is the defective grain and the white part is other areas;

[0068] The wafer defect image in this embodiment is a WM-811K specified data set, in which the wafer edge pixel value is 0, the non-defective grain is 1, and the defective grain is 2. In this embodiment, the 8-neighborhood method is used to traverse all data points. If all the adjacent values ​​of a pixel value 2 are 0 or 1, or there is only one adjacent pixel value 2 in its diagonal or four neighborhoods, then the pixel is isolated. In order to reduce the noise interference and calculation amount caused by outliers to clustering, and restore the edge pixels misjudged in the original image to defective pixels, the 8-neighborhood method is used to remove noise points.

[0069] In this embodiment, isolated outliers that are not connected to any other defective grains and twin outliers that have only two interconnected points are all noise points. Figure 3 In (a), the outliers in the original image are filtered out and assigned a value of 1, and the outliers are removed. Figure 3(c) The image retains the main features of the defect, reduces the number of pixel value 2 from 540 to 363, and restores the pixels inside the wafer that are misjudged as edges to normal grain pixel value 1, reducing the data points to be clustered and noise interference.

[0070] S2: The designed intra-cluster density and inter-cluster density functions that take into account the shape and size of the clusters are used as comprehensive clustering indicators;

[0071] The design method of the intra-cluster density function Com is:

[0072] The formula for calculating the density within a cluster based on the average scattering Scat is:

[0073]

[0074] Among them, v i is the center point of the i-th cluster, σ(v i ) is the standard deviation of the ith cluster, mean(v i ) is the average distance of the ith cluster, n i is the number of points in the i-th cluster, and C is the number of clusters;

[0075] Formula (1) calculates the intra-cluster density based on the average distance and standard deviation of a single cluster, without considering the distribution of points within the cluster. In order to comprehensively consider the characteristics of the entire wafer defect image, the present invention designs an intra-cluster density calculation method that reflects the cluster shape. The variance of the distance from the intra-cluster point to the cluster center is used to reflect the distribution of the intra-cluster point. The intra-cluster density Com is then obtained by taking the weighted average of the average distance from all points to the cluster center and the variance. The formula is:

[0076]

[0077] Where C is the number of clusters, n i is the number of points in the i-th cluster, d(x ij ,μ i ) is point x ij To cluster center μ i The distance is the average distance from the points in the i-th cluster to the center point. The smaller the Com value, the closer the points in the cluster are, the tighter the cluster is, and the better the clustering effect is.

[0078] The design method of the inter-cluster density function Den is:

[0079] The inter-cluster density usually only considers the distance between cluster centers, while ignoring the shape and size of the cluster. The present invention designs an inter-cluster density calculation method based on kernel density estimation to replace the traditional simple sample point counting, and uses the density of cluster center points and the distance of the nearest neighbor point to evaluate the separation between clusters; the specific steps are as follows:

[0080] A1: Traverse all cluster pairs (C i ,C j ), C i ,C j For different clusters; for each valid cluster, calculate the average value of its data points as the center point, and then calculate the average value of the two center points as the midpoint between clusters;

[0081] A2: Use kernel density to calculate the midpoints between clusters and cluster C i and C j The density of the center point is taken as the density magnitude at the corresponding point;

[0082] A3: for cluster C i and cluster C j Use the nearest neighbor algorithm to calculate cluster C i Each point in cluster C j The average distance of the closest point in the cluster C j Each point in cluster C i The average distance between the closest points;

[0083] A4: For each pair of clusters, calculate the ratio of the center point density of the cluster to the center point density of the two clusters, and combine the nearest neighbor distance between clusters to accumulate the calculation results into the total cluster density Den;

[0084] A5: After traversing all cluster pairs, calculate the average value of the accumulated inter-cluster density, normalize the accumulated inter-cluster density value, and obtain the average density of all cluster pairs. At this time, Den is

[0085]

[0086] Where Den is the density between clusters, C is the number of clusters, density(u ij ) is the core point density of the merged cluster, density(v i ) and density(v j ) are clusters C i and cluster C j The density, d min (C i ,C j ) is cluster C i and cluster C j The distance between the nearest neighbors.

[0087] The comprehensive clustering index Score is calculated by the intra-cluster density Com and the inter-cluster density Den, expressed as

[0088] Score=Com+Den (4)

[0089] The Score is calculated by the intra-cluster density Com and the inter-cluster density Den. The smaller the Score value, the better the clustering effect.

[0090] S3: Use the KD tree algorithm to select the range of the MinPts parameter of OPTICS, and obtain the optimal clustering parameter of MinPts based on the comprehensive clustering index;

[0091] The adaptive parameter selection OPTICS algorithm clustering only retains the largest cluster, resulting in the loss of some features in the clustering process. In order to avoid some features of the wafer being misjudged as noise, the present invention proposes a method for identifying connected components based on graph theory to supplement feature clusters to merge similar clusters, and defines the merged new clusters as supplementary feature clusters to effectively deal with the problem of missing features in the clustering process; supplementary feature clusters include two steps: outlier processing and cluster merging;

[0092] Different clusters have a certain distance in spatial distribution after clustering. The number of non-noise data points in the four neighborhoods of the core point marked as noise is used to re-evaluate whether the point is a noise point. For each noise point, the Euclidean distance to all other points is calculated. In the four neighborhoods, it is detected whether there are three or more data points whose Euclidean distance is less than the four neighborhood distance. If so, the noise point is the core point of the new cluster.

[0093] Based on the above, refer to Figure 1 , step S3 specifically includes:

[0094] B1: Use data points to construct a KD tree to calculate the distance between each sample point in the data set and other sample points, and obtain the distance matrix of each data point;

[0095] B2: Arrange the distance matrix in non-descending order to obtain the density distribution information of the data points;

[0096] B3: For each distance value, calculate the average number of data points contained in the circle with the current distance value as the radius, round it up, and finally take the average as the upper limit of the MinPts range. Since at least two sample points can form a valid cluster, the lower limit is set to 2;

[0097] B4: Iterate the OPTICS clustering for each MinPts value within the range, calculate the score according to the comprehensive indicator Score, and find the parameter value with the smallest score during the iteration process, which is the optimal MinPts clustering parameter.

[0098] S4: A depth-first search algorithm based on graph theory is used to analyze the connectivity between data points to merge spatially adjacent clusters and obtain clustering results;

[0099] Step S4 is specifically as follows:

[0100] C1: Construct n×n distance matrix D, data point x i and x j The Euclidean distance between ij ;

[0101] D ij =||x i -x j ||2 (5)

[0102] Among them, ||·||2 represents the Euclidean norm;

[0103] C2: Setting distance threshold To determine directly connected clusters, the distance matrix D is converted into an adjacency matrix A and compressed into a sparse matrix representation; if A ij =1 means x i and x j The distance is less than τ, indicating that the two are directly connected; A ij =0 means the two are not directly connected;

[0104]

[0105] C3: Use the depth-first search algorithm to find the connected components in the graph. For each unvisited node, start the algorithm from that node; traverse all nodes connected to that node and assign connected component labels. Then, treat all data points belonging to the same connected component as a cluster, update the labels of the data points and uniformly mark them with the same cluster label. Finally, merge all different connected components into one cluster.

[0106] In step S4, a graph-theory-based method for identifying connected component supplementary feature clusters is used to merge similar clusters, and the merged new clusters are defined as supplementary feature clusters.

[0107] This embodiment clusters Edge-Ring type defects, such as Figure 4 As shown in the figure, (a) is an Edge-Ring type defect, and the result is obtained after clustering using the OPTICS algorithm. Figure 4 (b). Figure 4 In (b), the clustering algorithm only retains the largest cluster, and the ring-shaped edge details are missing. After restoring the misjudged noise points and identifying the connected components to supplement the feature clusters, the largest feature cluster data is supplemented to obtain a complete ring-shaped Edge-Ring defect shape, as shown in Figure 4 As shown in (c), the wafer defect clustering result after supplementing the feature cluster retains the largest ring feature cluster, which can more completely describe the defect characteristics of the corresponding type and reduce the difficulty of subsequent classification processing.

[0108] S5: Use the improved neural network model to classify the clustering results.

[0109] In this embodiment, the neural network model uses the YOLOV10 network as the basic model, and the specific improvement methods include:

[0110] Based on the YOLOV10 model, the C2f module adds a full-dimensional dynamic convolution, namely the ODConv (Omni-DimensionalDynamicConvolution) module. Figure 5 It can be seen that the ODConv module adopts a multi-dimensional attention mechanism, learns attention weights in each dimension, and applies these weights to the convolution kernel. The complementary attention of the convolution kernel in all four dimensions of the kernel space (i.e., the spatial size, the number of input channels, and the number of output channels of each convolution layer) is learned through a parallel strategy. The main function of complementary attention is to enhance the expression and feature extraction capabilities of the convolution kernel. The attention weights of different dimensions are multiplied element by element with the convolution kernel to obtain the new convolution kernel weight W′:

[0111] W'=W☉α w ☉α s ☉α c ☉α f (7)

[0112] Among them, ☉ represents element-by-element multiplication, W represents the convolution kernel, and α w , α s , α c , α f Represent the attention weights of the convolution kernel, spatial dimension, input channel, and output channel respectively. The new convolution kernel will adaptively adjust the weights according to the characteristics of the input feature map, thereby achieving complementary feature extraction in multiple dimensions.

[0113] In order to make the model capture more global features, such as Figure 6 As shown in the figure, the inverted residual module of MobileNetV2 is introduced in ODConv, and a new inverted residual full-dimensional dynamic convolution module IRODConv (Inverted ResidualsODConv) is proposed, which can capture more features without significantly increasing the amount of calculation; and global average pooling and global maximum pooling are added to better extract global features. Through the combination of the depth-separable convolution and attention mechanism in the inverted residual module, the final output is obtained:

[0114]

[0115] Among them, X is the input feature map, W kis the kth convolution kernel weight, Res(X) is the output of the inverted residual module, and Y is the final output. This process realizes the adaptive adjustment of the convolution kernel's attention in each dimension, enabling the model to dynamically select important features, reduce unnecessary calculations, and enhance the flexibility of feature extraction. It reduces the number of parameters and calculations, and improves the overall efficiency of the model. The inverted residual module adds a residual connection path. When the input and output dimensions are the same, the input and output are directly added to retain information and improve the efficiency of gradient transfer.

[0116] The attention mechanism is used to generate the weights of the convolution kernels, and the feature selection capability is enhanced by combining different convolution kernels. The weights generated by the attention mechanism are applied in the inverted residual module to further improve the efficiency and accuracy of feature extraction. The improved IRODConv is combined with the C2f module to construct a new feature fusion module C2f_IRODConv, and then introduced into the original YOLOV10 model to form an improved YOLOV10 network model. The improved YOLOV10 network structure is as follows: Figure 7 shown.

[0117] Based on the above scheme, in order to verify the effectiveness and effect of the method of the present invention, this embodiment has been experimentally verified and analyzed, as follows:

[0118] In this example, the algorithm is implemented in the Pytorch framework using the Python programming language under the Windows 11 operating system, and the experimental environment is pytorch 2.1.0 and python 3.9.18. The PC configuration is Intel (R) Core (TM) i5-12400 CPU, 2.5 GHz main frequency, 32 GB running memory, RTX2060 GPU, and 6 GB video memory.

[0119] In order to test the performance of the method of the present invention in clustering effect, in this embodiment, the silhouette coefficient is selected as the evaluation index. The silhouette coefficient comprehensively considers the compactness and separation of the data, and evaluates the test data set more comprehensively and objectively. The larger the silhouette coefficient, the better the clustering effect. The formula is:

[0120]

[0121] Among them, a(i) is the average distance from sample i to other points in the cluster, indicating the compactness within the cluster, and b(i) is the average distance from sample i to samples in different clusters, indicating the separation between clusters. The range of the silhouette coefficient is [-1,1]. When the silhouette coefficient is less than 0, it means that the average distance between different clusters is less than the average distance within the cluster, and the clustering effect is poor; when the silhouette coefficient is greater than 0, it means that the average distance within the cluster is less than the average distance between different clusters, and the clustering effect is good.

[0122] The data set used in this embodiment is WM811-k, which has serious category imbalance. The present invention performs data enhancement on the data set, adopts rotation, horizontal and vertical mirror flipping, and expands each category of defect images to more than 4500. Since the number of original images of Near-full and Scratch categories is too small, they are expanded to 1584 and 3492 respectively. For Random type without specific images, the clustering algorithm may destroy the original defect features, so the Random type images are not clustered, and only the outliers and twin outliers are removed.

[0123] The comparison of clustering results of various types of defect images is shown in the figure below: Figure 8 As shown in the figure, noise points of defects of each category have been filtered out, while the main features are retained without destroying the characteristic shape of the defects.

[0124] The traditional fixed parameter OPTICS algorithm does not work well for defects in the Donut, Edge-Ring and Scratch categories. Because circular and narrow defects are prone to discontinuities in spatial distribution, setting MinPts to 2 will cause the above defect features to be identified as multiple feature clusters when the degree of discreteness is large, thus affecting the clustering effect.

[0125] Fig. 9 This is the fixed parameter OPTICS clustering result diagram of Donut defect. Fig. 9 In (b), the MinPts parameter is fixed to 2, and different colors represent different clusters. The largest cluster and the second largest cluster of the Donut defect together constitute the main characteristics of the defect. The clusters in the dotted box and other clusters have discontinuities due to fixed parameter clustering, resulting in the largest cluster being divided into different clusters. The operation of merging clusters in the present invention can solve this type of problem well.

[0126] The number of wafer images with the optimal contour coefficient is shown in Table 1. Due to the limitations of fixed parameters, the average optimal proportion of the DBSCAN algorithm with fixed parameters is only 12.76%. Although the OPTICS algorithm has a high proportion in the Center, Edge-Loc and Loc categories, the average proportion is only 71.21%. The average proportion of the DBSCAN algorithm with automatic parameterization reached 91.75%, but because the shape and size of the cluster are ignored in the Com and Den formulas, the optimal proportion of the Scratch category is only 68%. The algorithm of the present invention ensures that the defect characteristics of the Loc and Scratch categories are retained intact through the improved intra-cluster and inter-cluster calculation methods designed by the present invention. Compared with the DBSCAN algorithm with automatic parameterization, the proportion of contour coefficients of each category of the present invention is improved.

[0127] Table 1

[0128]

[0129] The data in Table 1 shows that the number of Near-full defects accounts for a relatively low proportion of 85.48%, which is determined by the shape of Near-full defects. Fig.10 In the figure, the Near-full type defect features almost cover the entire wafer surface, resulting in only a single cluster in most cases. From the calculation method of the silhouette coefficient, it can be seen that the calculation of the inter-cluster separation requires the existence of multiple clusters. When there is only one cluster, it cannot be calculated. At this time, the silhouette coefficient is assigned to -1, which leads to a low optimal proportion of the silhouette coefficient of this type of defect. The clustering result is consistent with the actual characteristics of the defect, so the low silhouette coefficient of this category due to the number of clustering clusters does not affect the actual clustering effect, and the algorithm of the present invention is still effective for this type of defect.

[0130] In this embodiment, in order to test the performance of the algorithm of the present invention in classification effect, YOLOV8-cls is used as the classification model, and the DBSCAN and OPTICS clustering algorithms with fixed parameters and the algorithm of the present invention are verified. The specific results are shown in Table 2.

[0131] Table 2

[0132]

[0133] From the analysis of Table 2, it can be seen that the accuracy of DBSCAN with fixed parameters can only reach 87.685% on average, and the accuracy of OPTICS with fixed parameters can only reach 93.585%. After clustering by the algorithm of the present invention, the classification accuracy of wafer defects can reach 96.447%, and the accuracy of each category is higher than that of other algorithms in the table. Therefore, the improved clustering algorithm of the present invention has better effect than the traditional clustering algorithm with fixed parameters.

[0134] In this embodiment, the present invention uses YOLOV8, YOLOV9, and YOLOV10 as comparison models, and conducts comparative experiments with the improved YOLO model of the present invention. In the experiment, all data enhancement and mosaic operations are turned off, and the experiment is run on the same device and virtual environment. The experimental parameters are uniformly set as shown in Table 3. The experimental results are shown in Table 3. Fig.11 , Fig.12 , Fig.13 shown.

[0135] Table 3

[0136] Epoch batch_size device optimizer seed patience 100 18 0(GPU) AdamW 17 25

[0137] Fig.11 , Fig.12 , Fig.13 The performance of different models in terms of precision, F1 score, and recall is analyzed. Fig.11In the , the improved model of the present invention is only slightly lower than the YOLOV9 and YOLOV10 models by 0.02 to 0.1 percentage points in the Loc type, and the overall accuracy reaches 99.695%, which is significantly better than other models in the figure and has outstanding classification accuracy. Fig.12 In the experiment, the algorithm of the present invention and the YOLOV10 model relied on the powerful feature extraction ability of the model, and the recall rate of defects in each category was stable at more than 98%. The average recall rate of the algorithm of the present invention reached 99.385%, which was higher than the 99.208% of YOLOV10. Usually, a higher recall rate will lead to a loss of precision, but the improved model of the present invention has a higher accuracy rate, indicating that the model is accurate in predicting most images during the prediction process. Fig.13 In the results, the improved model of the present invention has a higher F1 score in each category compared with other models, indicating that the comprehensive performance of the model in terms of precision and recall is better.

[0138] It can be seen from the results that the improved model of the present invention achieves higher accuracy, recall rate and F1 score when classifying wafer defect images, indicating that the model has good stability when classifying wafer defects.

Claims

1. A wafer defect image classification method based on adaptive parameter selection OPTICS, characterized in that: The steps include: S1: Screening out isolated and twin outliers from wafer defect images; S2: The designed intra-cluster density and inter-cluster density functions that take into account the shape and size of the clusters are used as comprehensive clustering indicators; S3: Use the KD tree algorithm to select the range of the MinPts parameter of OPTICS, and obtain the optimal clustering parameter of MinPts based on the comprehensive clustering index; S4: A depth-first search algorithm based on graph theory is used to analyze the connectivity between data points to merge spatially adjacent clusters and obtain clustering results; S5: Use the improved neural network model to classify the clustering results.

2. According to the wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 1, it is characterized in that: In the step S1, isolated outlier points that are not connected to any other defective grains and twin outlier points that have only two interconnected points are all outliers.

3. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 1, characterized in that: The design method of the intra-cluster density function in step S2 is: A cluster density calculation method that reflects the cluster shape is designed. The variance of the distance from the cluster point to the cluster center is used to reflect the distribution of the cluster points. The cluster density Com is then obtained by taking the weighted average of the average distance from all points to the cluster center and the variance. The formula is: Where C is the number of clusters, n i is the number of points in the i-th cluster, d(x ij ,μ i ) is point x ij To cluster center μ i The distance is the average distance from the points in the i-th cluster to the center point.

4. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 3 is characterized in that: The design method of the inter-cluster density function in step S2 is: A cluster density calculation method based on kernel density estimation is designed to replace the traditional simple sample point counting, and the density of cluster center points and the distance of the nearest neighbor points are used to evaluate the separation between clusters; the specific steps are as follows: A1: Traverse all cluster pairs (C i ,C j ), C i ,C j For different clusters; for each valid cluster, calculate the average value of its data points as the center point, and then calculate the average value of the two center points as the midpoint between clusters; A2: Use kernel density to calculate the midpoints between clusters and cluster C i and C j The density of the center point is taken as the density magnitude at the corresponding point; A3: for cluster C i and cluster C j Use the nearest neighbor algorithm to calculate cluster C i Each point in cluster C j The average distance of the closest point in the cluster C j Each point in cluster C i The average distance between the closest points; A4: For each pair of clusters, calculate the ratio of the center point density of the cluster to the center point density of the two clusters, and combine the nearest neighbor distance between clusters to accumulate the calculation results into the total cluster density Den; A5: After traversing all cluster pairs, calculate the average value of the accumulated inter-cluster density, normalize the accumulated inter-cluster density value, and obtain the average density of all cluster pairs. At this time, Den is Where Den is the density between clusters, C is the number of clusters, density(u ij ) is the core point density of the merged cluster, density(v i ) and density(v j ) are clusters C i and cluster C j The density, d min (C i ,C j ) is cluster C i and cluster C j The distance between the nearest neighbors.

5. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 4 is characterized in that: In step S2, the comprehensive clustering index Score is calculated by the intra-cluster density Com and the inter-cluster density Den, which is expressed as Score=Com+Den(3).

6. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 1, characterized in that: The step S3 is specifically as follows: B1: Use data points to construct a KD tree to calculate the distance between each sample point in the data set and other sample points, and obtain the distance matrix of each data point; B2: Arrange the distance matrix in non-descending order to obtain the density distribution information of the data points; B3: For each distance value, calculate the average number of data points contained in the circle with the current distance value as the radius, round it up, and finally take the average as the upper limit of the MinPts range. Since at least two sample points can form a valid cluster, the lower limit is set to 2; B4: Iterate the OPTICS clustering for each MinPts value within the range, calculate the score according to the comprehensive indicator Score, and find the parameter value with the smallest score during the iteration process, which is the optimal MinPts clustering parameter.

7. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 1, characterized in that: The step S4 is specifically as follows: C1: Construct n×n distance matrix D, data point x i and x j The Euclidean distance between ij ; D ij =||x i -x j ||2 (4) Among them, ||·||2 represents the Euclidean norm; C2: Setting distance threshold To determine directly connected clusters, the distance matrix D is converted into an adjacency matrix A and compressed into a sparse matrix representation; if A ij =1 means x i and x j The distance is less than τ, indicating that the two are directly connected; A ij =0 means the two are not directly connected; C3: Use the depth-first search algorithm to find the connected components in the graph. For each unvisited node, start the algorithm from that node; traverse all nodes connected to that node and assign connected component labels. Then, treat all data points belonging to the same connected component as a cluster, update the labels of the data points and uniformly mark them with the same cluster label. Finally, merge all different connected components into one cluster.

8. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 1, characterized in that: In step S5, the neural network model uses the YOLOV10 network as the basic model, and the specific improvement methods include: Based on the YOLOV10 model, the full-dimensional dynamic convolution, namely the ODConv module, is added to the C2f module. The ODConv module adopts a multi-dimensional attention mechanism and learns the complementary attention of the convolution kernel in all four dimensions of the kernel space through a parallel strategy; The inverted residual module of MobileNetV2 is introduced in ODConv, and a new inverted residual full-dimensional dynamic convolution module IRODConv is proposed, which can capture more features without significantly increasing the amount of calculation; and global average pooling and global maximum pooling are added to better extract global features; through the combination of deep separable convolution and attention mechanism in the inverted residual module, the number of parameters and calculation is reduced, and the overall efficiency of the model is improved; The improved IRODConv is combined with the C2f module to construct a new feature fusion module C2f_IRODConv, and then introduced into the original YOLOV10 model to form an improved YOLOV10 network model.

9. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 8, characterized in that: In step S5, the complementary attention is used to enhance the expression ability and feature extraction ability of the convolution kernel. The attention weights of different dimensions are multiplied element by element with the convolution kernel to obtain a new convolution kernel weight W′: W'=W☉α w ☉α s ☉α c ☉α f (6) Among them, ☉ represents element-by-element multiplication, W represents the convolution kernel, α w , α s , α c , α f They represent the attention weights of the convolution kernel, spatial dimension, input channel, and output channel respectively; the new convolution kernel will adaptively adjust the weights according to the characteristics of the input feature map, thereby achieving complementary feature extraction in multiple dimensions.

10. The wafer defect image classification method based on adaptive parameter selection OPTICS according to claim 8, characterized in that: In step S5, the final output is obtained by combining the depth-separable convolution and attention mechanism in the inverted residual module: Among them, X is the input feature map, W k is the kth convolution kernel weight, Res(X) is the output of the inverted residual module, and Y is the final output.

Citation Information

Cited By

  • Wafer defect detection data processing method and system

    CN120088247A

  • Wafer defect cluster analysis method based on DBSCAN clustering

    CN120910485A