A partitioning method of an image, a defect detection method, and a defect detection apparatus

CN122115300APending Publication Date: 2026-05-29SHENZHEN JINGJI MICRO SEMICONDUCTOR TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN JINGJI MICRO SEMICONDUCTOR TECHNOLOGY CO LTD
Filing Date
2024-11-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing wafer inspection methods, manual division of the area to be inspected is not accurate enough, time-consuming and inefficient, and the standard consistency among different operators is poor, making it difficult to meet the needs of high-precision and large-volume inspection.

Method used

An initial mask is generated using a training-free image segmentation model. The target mask is determined through deduplication and merging. The target region is automatically divided based on texture features and clustering algorithms to generate target sub-images with various feature types. Defect detection is performed using a unified detection standard.

Benefits of technology

It achieves automated and precise partitioning of wafer images, improving partitioning efficiency and accuracy, reducing manual intervention, significantly improving detection efficiency and accuracy, and solving the problems of inaccurate region partitioning and long time consumption in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115300A_ABST
    Figure CN122115300A_ABST
Patent Text Reader

Abstract

The application discloses a partition method of an image, a defect detection method and a defect detection device, and relates to the technical field of semiconductor manufacturing. The method comprises the following steps: segmenting an original image to be partitioned by using an image segmentation model to generate a plurality of initial masks; determining a plurality of target masks based on the initial masks, each target mask corresponding to a target region in the original image; determining effective texture features based on texture feature values of the target regions; obtaining a characteristic vector of each target region, wherein a vector composed of the feature values of the effective texture features of each target region constitutes a characteristic vector of the corresponding target region; and performing clustering processing on the target regions based on the characteristic vectors of the target regions to obtain target sub-images of a plurality of feature types corresponding to the original image. The technical scheme provided by the application can realize automatic and accurate image partition processing of the original image, and improves the working efficiency and accuracy of image partition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor manufacturing technology, and in particular to an image partitioning method, a defect detection method, and a defect detection device. Background Technology

[0002] During semiconductor manufacturing, even minute defects (such as scratches, particles, cracks, etc.) can affect the performance of the final product. Therefore, accurate and efficient wafer inspection is crucial. However, wafer inspection faces several challenges: 1. High precision requirements: The ever-shrinking size of semiconductor devices places extremely high demands on the precision of defect detection on the wafer surface; 2. High-volume inspection: Wafer inspection is characterized by high-volume, high-resolution testing, requiring high-speed inspection capabilities; 3. Regional variability: Different regions of the wafer have varying tolerances for defects, with generally higher tolerances occurring closer to the wafer center.

[0003] In existing technologies, wafer inspection typically involves manually dividing the wafer into multiple inspection areas based on different regional inspection standards. Depending on the manufacturing process and product requirements, different inspection standards are then manually established for each area. Finally, the inspection areas of the wafer to be inspected are manually compared with the corresponding areas of a standard wafer. Since wafer inspection area division is a crucial step in wafer defect detection, the existing method, which relies on manual division, suffers from the following drawbacks: manual division is not precise enough, the manual division and marking process is time-consuming and inefficient, and there is poor consistency in the area division standards among different operators. Summary of the Invention

[0004] This application provides an image partitioning method, a defect detection method, and a defect detection device, which can realize automated and accurate image partitioning processing of the original image, improving the efficiency and accuracy of image partitioning.

[0005] In a first aspect, this application provides a method for partitioning an image, the method comprising:

[0006] The original image to be partitioned is segmented using an image segmentation model to generate multiple initial masks;

[0007] Based on the initial mask, multiple target masks are determined, each target mask corresponding to a target region in the original image;

[0008] Based on the texture features of the target region, determine the effective texture features;

[0009] Obtain the feature vector of each target region, wherein the vector composed of the feature values ​​of the effective texture features of each target region constitutes the feature vector of the corresponding target region;

[0010] Clustering is performed on the target regions based on the feature vectors of each target region to obtain target sub-images of various feature types corresponding to the original image.

[0011] Secondly, this application provides a defect detection method, which includes:

[0012] Obtain the original image of the sample;

[0013] The image partitioning method described in any embodiment of this application is used to partition the original image to obtain target sub-images of various feature types corresponding to the original image;

[0014] For target sub-images with the same feature type, the same detection standard is used to perform detection.

[0015] Thirdly, this application provides a defect detection device, which includes:

[0016] Image acquisition module, used to acquire raw images of the sample;

[0017] The image segmentation module is used to partition the original image using the image partitioning method described in any embodiment of this application to obtain target sub-images of multiple feature types corresponding to the original image;

[0018] The image detection module is used to perform detection using the same detection standard for target sub-images of the same feature type.

[0019] To address the shortcomings of existing technologies, this application provides an image partitioning method. This method offers the following advantages: It automatically divides regions into multiple initial masks using an image segmentation model that requires no training. This method is effective even in situations lacking large amounts of training data, significantly saving time on data annotation and model training, reducing manual intervention, and improving partitioning efficiency and flexibility. The initial masks are then deduplicated and merged, ensuring each target mask has a clear and independent region. The effective texture features of each target mask corresponding to the target region in the original image are then determined. Based on these effective texture features, a clustering algorithm is used to cluster the target regions, dividing the original image into multiple target sub-images. This application enables automated and precise image partitioning of original images (such as wafer images of silicon wafers), improving the efficiency and accuracy of image partitioning.

[0020] This application also provides a defect detection method, which offers the following advantages: After determining the detection area of ​​the wafer image using the image partitioning method described above, the same detection standard is used to perform detection on target sub-images of the same feature type to complete the wafer defect detection task. By automating the region partitioning of the wafer image, multiple detection regions corresponding to different detection standards can be quickly obtained, avoiding partitioning errors caused by manual intervention, improving the accuracy of detection region classification, significantly improving the efficiency and accuracy of wafer defect detection results, and solving the problems of large workload and long time consumption in the prior art.

[0021] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on a computer-readable storage medium. This computer-readable storage medium may be packaged together with the processor of the image partitioning device, or it may be packaged separately from the processor of the image partitioning device; this application does not impose any limitations on this.

[0022] The descriptions of the second and third aspects in this application can be referenced to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second and third aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description.

[0024] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained. Attached Figure Description

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

[0026] Figure 1 A first flowchart illustrating an image partitioning method provided in an embodiment of this application;

[0027] Figure 2 A second flowchart illustrating an image partitioning method provided in an embodiment of this application;

[0028] Figure 3A third flowchart illustrating an image partitioning method provided in an embodiment of this application;

[0029] Figure 4 A flowchart illustrating a defect detection method provided in an embodiment of this application;

[0030] Figure 5 This is a schematic diagram of the structure of a defect detection device provided in an embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0032] It should be noted that the terms "first," "second," "target," and "original," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprising," "having," and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] Figure 1 This is a first flowchart illustrating an image partitioning method provided in this application embodiment. This embodiment is applicable to situations where an image is partitioned to obtain the region to be detected before defect detection. The image partitioning method provided in this embodiment can be executed by the image partitioning device provided in this application embodiment. This device can be implemented by software and / or hardware and integrated into the electronic device executing this method.

[0034] See Figure 1 The method in this embodiment includes, but is not limited to, the following steps:

[0035] S110. The original image to be partitioned is segmented using an image segmentation model to generate multiple initial masks.

[0036] Image segmentation is a computer vision technique used to divide an original image into multiple distinct regions. In this embodiment, the image segmentation model can be a commonly used model from existing technologies. It should be noted that this image segmentation model requires no pre-training and does not require a large amount of training data. Therefore, the image partitioning method of this application can be effectively used even when a large amount of training data is lacking, significantly saving time on data annotation and model training. Optional image segmentation models include Segment Anything Model, Segment Anything in HighQuality, and SAM-Adaptor.

[0037] The initial mask is used to represent the size and shape of each initial sub-image after the original image is divided into multiple initial sub-images. The original image refers to the image that needs to be partitioned. Due to the different application scenarios of the method in this application, the specific type of the original image will also be different; this embodiment takes the image processing of a silicon wafer as an example to introduce the image partitioning method of this application, so the original image is the wafer image of the silicon wafer.

[0038] In the embodiments of this application, wafer images of silicon wafers can be acquired using specific equipment (such as optical microscopes, electron microscopes, scanning probe microscopes, or professional wafer inspection equipment). The wafer image is used as the original image to be segmented. Optionally, the original image can be preprocessed. Preprocessing steps may include image resizing, image enhancement, and image denoising to reduce the impact of noise, brightness differences, and other factors on image segmentation.

[0039] The original image is input into an image segmentation model that does not require pre-training (such as the Segment Anything Model), which segments the original image to obtain multiple initial sub-images. Then, an initial mask is generated for each initial sub-image, which is an opaque graphic mask that covers the texture information of each initial sub-image, while retaining only the size and shape of each initial sub-image.

[0040] S120. Determine multiple target masks based on the initial mask, each target mask corresponding to a target region in the original image.

[0041] In this embodiment, during the process of generating multiple initial masks through the image segmentation model, due to imaging and detection algorithm limitations, a large region may be segmented into several smaller masks with overlap, and the initial masks may exhibit overlapping contours. Therefore, it is necessary to process the initial masks to determine the target mask.

[0042] Specifically, multiple target masks are determined based on the initial mask, including: performing region deduplication and merging processing on mask pairs with adjacent relationships in the multiple initial masks to obtain multiple target masks.

[0043] First, it's necessary to identify mask pairs with adjacency relationships. Adjacency can be spatial, determined by pixel location. For example, if some pixels in two initial masks are spatially adjacent, these two masks (i.e., mask pairs) can be considered adjacent. Next, these mask pairs undergo region deduplication and merging. Assume two adjacent masks contain some identical pixel regions; these overlapping regions might be due to ambiguity or inaccuracy in the boundary delineation of the image segmentation model. The purpose of deduplication is to ensure that each final target mask has a clear and independent region. Finally, by performing this region deduplication and merging process on all adjacency mask pairs, multiple target masks are obtained. These target masks, compared to the initial masks, have more reasonable and accurate region delineation.

[0044] In a preferred embodiment, when performing defect detection on the original image, the original image typically includes regions of interest and regions of no interest. Therefore, based on the detection requirements, before performing region deduplication and merging on adjacent mask pairs among multiple initial masks, the process further includes: filtering the initial sub-images corresponding to each of the multiple initial masks to remove initial sub-images of regions of no interest and retain initial sub-images of regions of interest. This reduces noise in image partitioning and decreases computational load. Here, regions of no interest refer to areas outside the defect detection area of ​​the original image, such as some areas at the image edges; regions of interest refer to areas within the defect detection area of ​​the original image.

[0045] S130. Determine effective texture features based on the texture feature values ​​of the target region.

[0046] Texture features refer to the texture information of the image corresponding to the target region. Texture features can include at least contrast, dissimilarity, homogeneity, energy, and correlation.

[0047] Specifically, based on the texture feature values ​​of the target region, effective texture features are determined, including:

[0048] The first step is to extract the feature values ​​of multiple texture features for each target region.

[0049] The texture feature values, or texture feature values, of each target region are extracted using a pre-defined feature extraction method. Then, a gray-level co-occurrence matrix (GLCM) is used to construct corresponding texture features for each target region. For each texture feature, its corresponding feature value is calculated. Feature values ​​are obtained through certain mathematical transformations or statistical analyses and are used to quantify a certain attribute of the texture feature. For example, in principal component analysis, the feature value represents the variance information carried by each principal component. As an example, assuming there are 5 target regions in the original image, and R1 to R5 represent the index of the target region, Table 1 below shows the feature values ​​of the texture features corresponding to each target region in the original image:

[0050] Table 1 Feature value table of texture features of the target region

[0051] Target area number Contrast dissimilarity homogeneity energy Correlation R1 33.42576 1.461447 0.641185 0.434578 0.995343 R2 10.19968 0.526362 0.936707 0.921969 0.993848 R3 28.35854 0.630838 0.954272 0.949129 0.973461 R4 1.60375 0.019489 0.99888 0.997679 0.9878 R5 0.644519 0.015326 0.998523 0.99827 0.991995

[0052] The second step is to calculate the statistics for each texture feature.

[0053] Statistics refer to evaluation items used to reflect the statistical characteristics of the data in Table 1 above. In this embodiment, statistics can be standard deviation and mean. Based on the feature values ​​of image texture features of each target region in the original image, the standard deviation and mean of each texture feature are calculated as evaluation items of effective texture features, as shown in Table 2 below:

[0054] Table 2. Statistics of texture features in the target region

[0055] Evaluation Items Contrast dissimilarity homogeneity energy Correlation Standard deviation 5.438239 0.213013 0.046723 0.072912 0.010101 mean 2.982136 0.064922 0.991193 0.986832 0.976845

[0056] The third step is to determine the texture features corresponding to the statistical quantities that meet the preset data standards as valid texture features.

[0057] After calculating the statistics for each texture feature, the values ​​of the preset data standards can be used to filter out valid texture features, which is not limited in this invention. The number of valid texture features obtained based on the preset data standards is at least one, such as m valid texture features, where m≥1. In this embodiment, a statistic > 0.2 is used as the preset data standard. If the standard deviation / mean of a certain texture feature in Table 2 is > 0.2, then the texture feature is considered a valid texture feature. For example, contrast and dissimilarity in the table can be considered valid texture features.

[0058] S140. Obtain the feature vector of each target region.

[0059] The vector composed of the feature values ​​of the effective texture features of each target region constitutes the feature vector of the corresponding target region.

[0060] In this embodiment, for any target region, the feature values ​​of each effective texture feature can be obtained from Table 1 above, and these feature values ​​can be combined into a vector. Assume we have extracted m effective texture features, whose corresponding feature values ​​are λ1, λ2, ..., λ... m Then the characteristic vector v can be represented as v = [λ1, λ2, ..., λ]. m This vector represents the characteristic vector of the corresponding target region, which integrates various texture feature information of the target region. The characteristic vector of each target region is obtained by traversing each target region.

[0061] S150. Cluster the target regions based on the feature vectors of each target region to obtain target sub-images of various feature types corresponding to the original image.

[0062] Specifically, based on the feature vector of each target region, clustering is performed on the target regions to obtain target sub-images with multiple feature types corresponding to the original image, including:

[0063] The first step is to construct an undirected graph by using the feature vectors of each target region as spatial sample points.

[0064] Taking obtaining n target regions as an example, if we treat the characteristic vector of each target region as a spatial sample point, we can obtain n spatial sample points. Each spatial sample point is represented by its corresponding m-dimensional characteristic vector, and the i-th spatial sample point can be defined as v. i Then v i ∈R m , 1≤i≤n. Finally, an undirected graph is constructed based on these spatial sample points.

[0065] The second step is to determine the symmetric normalized Laplace matrix of the undirected graph.

[0066] This embodiment uses the spectral clustering algorithm to obtain the symmetric normalized Laplacian matrix of an undirected graph. In the spectral clustering algorithm, the edge connecting any two spatial sample points has a corresponding weight. The weight indicates the similarity between spatial sample points; two spatial sample points that are closer together have higher weight values, meaning higher similarity; two spatial sample points that are farther apart have lower weight values, meaning lower similarity.

[0067] First, the weight values ​​between any two spatial sample points in the undirected graph need to be determined. Then, the adjacency matrix and degree matrix of the undirected graph are constructed based on the weight values. Next, the Laplacian matrix of the undirected graph is calculated based on the adjacency matrix and degree matrix. Finally, the Laplacian matrix is ​​symmetrically normalized to obtain the symmetrically normalized Laplacian matrix.

[0068] The third step is to construct a target matrix that represents the clustering attributes of spatial sample points based on the symmetric normalized Laplace matrix.

[0069] Obtain the pre-set target cluster number k. Solve for the k smallest eigenvalues ​​of the symmetric normalized Laplacian matrix and obtain the corresponding k n-dimensional eigenvectors as column vectors. Construct the target matrix based on these column vectors. Each row vector of the target matrix represents the clustering attribute of a spatial sample point, and the row vector of the i-th row corresponds to the clustering attribute of the i-th spatial sample point.

[0070] Let u be the vector of the i-th row of the target matrix. i ∈R k u i Represents the i-th spatial sample point v i The clustering attribute, that is, through the Laplacian feature map, groups the spatial sample points v i The m-dimensional spatial attributes are transformed into k-dimensional spatial attribute representations. Typically, the number of effective texture features m in an image is greater than the number of target clusters k, thus achieving a dimensionality reduction representation of sample attributes and significantly reducing the computational cost of image partitioning.

[0071] The fourth step is to use the K-means algorithm to cluster the spatial sample points based on the target matrix to classify the target regions corresponding to the spatial sample points and obtain target sub-images with multiple feature types.

[0072] The basic idea of ​​the K-means algorithm is to initialize k centers of n spatial sample points, assign each sample point to the nearest center to form k clusters, then use the center point of each cluster as the new center and perform the assignment again, and recalculate the center based on the k clusters. By repeating the iteration, the center point no longer changes significantly or the preset number of iterations is reached. The resulting k clusters are the k partitions.

[0073] Furthermore, the image partitioning method of this application also includes: for ease of display, using preset colors to display the outlines of target sub-images of the same feature type. That is, the outlines of target sub-images of the same feature type have the same color, while the outlines of target sub-images of different feature types have different colors.

[0074] The technical solution provided in this embodiment segments the original image to be partitioned using an image segmentation model, generating multiple initial masks. Based on the initial masks, multiple target masks are determined, each target mask corresponding to a target region in the original image. Based on the texture features of the target regions, effective texture features are determined. A feature vector for each target region is obtained. Based on the feature vector of each target region, clustering processing is performed on the target regions to obtain target sub-images of various feature types corresponding to the original image. This application achieves automated region partitioning to obtain multiple initial masks through an image segmentation model that does not require training. It can effectively use the image partitioning method of this application even when a large amount of training data is lacking, significantly saving time on data annotation and model training, reducing manual intervention, and improving partitioning efficiency and flexibility. The initial masks are then deduplicated and merged, ensuring that each target mask has a clear and independent region. The effective texture features of the target region corresponding to each target mask in the original image are then determined, and a clustering algorithm is used to cluster the target regions based on the effective texture features, thereby dividing the original image into multiple target sub-images. This application enables automated and precise image partitioning processing of raw images (such as wafer images of silicon wafers), improving the efficiency and accuracy of image partitioning.

[0075] The image partitioning method provided in the embodiments of this application is further described below. Figure 2 This is a second flowchart illustrating an image partitioning method provided in an embodiment of this application. This embodiment optimizes the above embodiments, specifically by explaining in detail the process of deduplicating and merging the initial mask to obtain the target mask.

[0076] See Figure 2 The method in this embodiment includes, but is not limited to, the following steps:

[0077] S210. For any mask pair, determine whether there is an overlapping region between the first initial mask and the second initial mask.

[0078] In this embodiment, two adjacent initial masks among multiple initial masks are referred to as mask pairs, resulting in multiple mask pairs. Each mask pair includes an adjacent first initial mask and a second initial mask. The system checks whether each mask pair has overlapping contours. For any mask pair, an element-wise logical AND operation is performed on the first and second initial masks. If the result is "True", it indicates that the mask pair has an overlapping area, and step S220 is executed. If the result is "False", it indicates that the mask pair does not have an overlapping area, and the first and second initial masks in the mask pair are directly used as the target masks.

[0079] S220. If there is an overlapping area, determine whether the area of ​​the overlapping area reaches the preset area.

[0080] The preset area is the area of ​​the smaller of the first initial mask and the second initial mask multiplied by a preset percentage, and the preset percentage is determined by the number of pixels in the smaller area.

[0081] In this embodiment, when the mask pair has an overlapping area, the overlapping area of ​​the first initial mask and the second initial mask in the mask pair is first detected. Then, the area of ​​each of the first initial mask and the second initial mask is calculated, and the initial mask with the smaller area is determined. Next, the number of pixels of the initial mask with the smaller area is obtained. If the number of pixels is large, the preset percentage is set to a large number, such as 5%; if the number of pixels is small, the preset percentage is set to a small number, such as 3%. The preset percentage depends on the partitioning requirements and is not limited in this invention. Finally, the area of ​​the smaller of the first initial mask and the second initial mask is multiplied by the preset percentage to obtain a preset area, and it is determined whether the area of ​​the overlapping region reaches the preset area.

[0082] In one optional embodiment, the preset percentage can be directly determined to a suitable value based on the actual application. The preset area can be obtained by multiplying the area of ​​the smaller of the first initial mask and the second initial mask by this value. It should be noted that when setting the preset percentage, care should be taken. If the preset percentage is too large, the masks will not be able to merge, resulting in multiple contours; if the percentage is too small, the masks of two different target areas will merge, resulting in missing contours.

[0083] S230. If the preset area is reached, the first initial mask and the second initial mask are merged to obtain a merged mask.

[0084] In this embodiment of the application, if the area of ​​the overlapping region reaches a preset area, the first initial mask and the second initial mask in the mask pair can be merged to obtain a merged mask.

[0085] S240. Traverse all mask pairs and use the merged mask and the unmerged initial mask together as the target mask.

[0086] In the embodiments of this application, for any mask pair, the above steps are used to merge the initial masks that meet the above conditions, and the merged mask and the unmerged initial mask are used together as the target mask.

[0087] The technical solution provided in this embodiment determines whether there is an overlapping region between the first initial mask and the second initial mask for any mask pair. If there is an overlapping region, it determines whether the area of ​​the overlapping region reaches a preset area. If the preset area is reached, the first initial mask and the second initial mask are merged to obtain a merged mask. All mask pairs are traversed, and the obtained merged mask and the unmerged initial masks are used together as the target mask. This application performs deduplication and merging processing on multiple initial masks automatically divided by the image segmentation model to solve the problems of incomplete initial masks and overlapping initial masks, so that each target mask obtained has a clear and independent region.

[0088] The image partitioning method provided in the embodiments of this application is further described below. Figure 3 This is a schematic diagram of the third process of an image partitioning method provided in this application embodiment. This application embodiment is an optimization based on the above embodiments, specifically an optimization that includes a detailed explanation of the clustering process for the target region.

[0089] See Figure 3 The method in this embodiment includes, but is not limited to, the following steps:

[0090] S310. Construct an undirected graph by using the characteristic vectors of each target region as spatial sample points.

[0091] In this embodiment of the application, the undirected graph includes a dataset consisting of multiple spatial sample points. Each spatial sample point corresponds to a multidimensional vector consisting of all valid texture features of a target region, and the edge connecting any two spatial sample points has a corresponding weight.

[0092] The vector composed of the feature values ​​of the effective texture features of each target region constitutes the feature vector of the corresponding target region. Each feature vector of the target region is treated as a spatial sample point, and each spatial sample point corresponds to an m-dimensional vector composed of m effective texture features. Taking n spatial sample points as an example, the i-th spatial sample point is defined as v. i Then v i ∈R m , 1≤i≤n. Finally, an undirected graph is constructed based on these spatial sample points.

[0093] S320. Construct the adjacency matrix and degree matrix of the undirected graph.

[0094] The process of constructing the adjacency matrix of an undirected graph can be as follows: the adjacency matrix W is formed by any two spatial sample points v i and v j The edge weights w between ij The matrix formed by w ij =w jiThe adjacency matrix W is an n×n symmetric matrix, where 1≤i≤n, 1≤j≤n. For two spatial sample points v connected by an edge... i and v j w ij >0; for two spatial sample points v that are not connected by an edge. i and v j w ij =0.

[0095] Obtain the pairwise Euclidean distances between all spatial sample points, and calculate the similarity of the spatial sample points, i.e., the edge weights, based on the Euclidean distances. Optionally, the ∈-nearest neighbor method, K-nearest neighbor method, or fully connected method can be used to calculate the similarity. Preferably, the fully connected method is used, defining the edge weights using a Gaussian kernel function. Where σ is the scaling parameter of the Gaussian function, v i For the i-th sample point, v j For the j-th sample point, ||v i -v j ||2 represents the L2 norm, also known as the sample point v. i and sample point v j Euclidean distance ρ between ij .

[0096] The process of constructing the degree matrix D of an undirected graph can be as follows: for any spatial sample point v i Its degree d i Defined as the sum of the weights of all edges connected to it, which is also the sum of the elements in the i-th row of the adjacency matrix:

[0097] A degree matrix D is constructed based on the degree of each spatial sample point. The degree matrix D is an n×n diagonal matrix, with values ​​only on the main diagonal, and the spatial sample point v... i degree d i The elements of the i-th row and i-th column of the degree matrix D are given by the following formula (1):

[0098]

[0099] For example, an adjacency matrix W is given by the following formula (2):

[0100]

[0101] Add up the elements of each column of the adjacency matrix and then put the values ​​on the diagonal to obtain the degree matrix D, as shown in formula (3):

[0102]

[0103] S330. Subtract the adjacency matrix and degree matrix to obtain the Laplace matrix of the undirected graph.

[0104] In the embodiments of this application, the adjacency matrix and the degree matrix are subtracted, such as L = DW, to obtain the Laplacian matrix of the undirected graph, denoted as L.

[0105] S340. Perform symmetric normalization on the Laplace matrix to obtain a symmetric normalized Laplace matrix.

[0106] In this embodiment, the Laplace matrix is ​​symmetrically normalized using the following formula (4) to obtain the symmetrically normalized Laplace matrix, denoted as L. sym :

[0107] L sym =D -1 / 2 LD -1 / 2 (4)

[0108] S350. Obtain the eigenvalues ​​of the symmetric normalized Laplace matrix and arrange the eigenvalues ​​in ascending order.

[0109] In this embodiment, the symmetric normalized Laplace matrix is ​​solved using the eigenvalue solving method to obtain n eigenvalues. These n eigenvalues ​​are then sorted in ascending order.

[0110] S360. Solve for the n-dimensional eigenvectors corresponding to the first k eigenvalues ​​after permutation.

[0111] Where k is the number of partitions to be partitioned, i.e., the number of target clusters for clustering set in advance; and n is the number of spatial sample points.

[0112] In this embodiment, the corresponding n-dimensional eigenvector is calculated for each eigenvalue using the eigenvector solving method, resulting in k n-dimensional eigenvectors. The advantage of this approach is that it transforms the high-dimensional spatial representation of sample points into a low-dimensional spatial representation. This transformation enhances the clustering properties of the sample data, and the smaller eigenvalues ​​of the symmetric normalized Laplacian matrix primarily reflect the global structure and overall connectivity of the samples. By analyzing these features, natural cluster structures in the sample data can be easily discovered; that is, clusters can be easily detected when the samples are represented in the new spatial representation.

[0113] S370. Use k n-dimensional feature vectors as column vectors to establish a target matrix. Each row vector of the target matrix represents the clustering attribute of a spatial sample point.

[0114] In this embodiment, k n-dimensional feature vectors are used as column vectors, and these column vectors are merged to form a target matrix with a size of n*k. The row vector of the i-th row of the target matrix corresponds to the clustering attribute of the i-th spatial sample point.

[0115] S380. Standardize the vectors in each row of the target matrix.

[0116] The standardization process includes min-max standardization or Z-score standardization.

[0117] In this embodiment, each row of data in the target matrix is ​​transformed according to the required standard or formula, so that each row of data has the same scale and range, thereby avoiding unfair comparisons caused by different data scales. Optionally, min-max standardization or Z-score standardization can be used to standardize the target matrix, where each row vector of the target matrix represents the standardized clustering attribute of a spatial sample point.

[0118] S390. Based on the standardized target matrix, the K-means algorithm is used to cluster the spatial sample points to classify the target regions corresponding to the spatial sample points, resulting in target sub-images with various feature types.

[0119] In this embodiment, clustering can be easily achieved using the commonly used K-means algorithm, resulting in more efficient sample clustering results. The target sub-images obtained after region segmentation using this method all have a complete outline, and the target regions are divided into several feature types.

[0120] The technical solution provided in this embodiment constructs an undirected graph by using the feature vectors of each target region as spatial sample points; constructs the adjacency matrix and degree matrix of the undirected graph; obtains the Laplacian matrix of the undirected graph by subtracting the adjacency matrix and degree matrix; performs symmetric normalization on the Laplacian matrix to obtain a symmetric normalized Laplacian matrix; obtains the eigenvalues ​​of the symmetric normalized Laplacian matrix and arranges the eigenvalues ​​in ascending order; solves for the n-dimensional eigenvectors corresponding to the first k eigenvalues ​​after arrangement; establishes a target matrix by using the k n-dimensional eigenvectors as column vectors, where each row of the target matrix represents the clustering attribute of a spatial sample point; performs standardization on each row of the target matrix; and, based on the standardized target matrix, uses the K-means algorithm to cluster the spatial sample points to classify the target regions corresponding to the spatial sample points, obtaining target sub-images with multiple feature types.

[0121] This application constructs an undirected graph for the target region in the original image, and then constructs an adjacency matrix and a degree matrix based on the edge weights of any two spatial sample points in the undirected graph, thereby obtaining the symmetric normalized Laplacian matrix of the undirected graph. Selecting the k smallest eigenvalues ​​of the symmetric normalized Laplacian matrix reflects the global structure and overall connectivity of the spatial sample points; then determining the eigenvectors corresponding to these eigenvalues, and establishing the target matrix, transforms the high-dimensional spatial representation of the sample points into a low-dimensional spatial representation, which enhances the clustering properties of the sample data. By analyzing these features, clusters can be easily detected in the spatial sample points under the new spatial representation; based on this, clustering can be easily achieved using the commonly used K-means algorithm, thus achieving more effective sample clustering results.

[0122] This application also provides a defect detection method. Figure 4 This is a flowchart illustrating a defect detection method provided in an embodiment of this application. The method in this embodiment includes, but is not limited to, the following steps:

[0123] S410. Obtain the original image of the sample.

[0124] In this embodiment, the type of sample is not limited. When the sample is a silicon wafer, the original image is a wafer image of the silicon wafer.

[0125] In the embodiments of this application, wafer images of silicon wafers can be obtained using specific equipment (such as optical microscopes, electron microscopes, scanning probe microscopes, or professional wafer inspection equipment).

[0126] S420. Using an image partitioning method, the original image is partitioned to obtain target sub-images of various feature types corresponding to the original image.

[0127] The image partitioning method is any of the methods described in the above embodiments.

[0128] S430. For target sub-images with the same feature type, the same detection standard shall be used to perform detection.

[0129] In this embodiment, after determining the region to be detected in the wafer image, the same detection standard is used to perform detection on target sub-images of the same feature type to complete the wafer defect detection task. By automating the region division of the wafer image, multiple detection regions corresponding to different detection standards can be quickly obtained, avoiding partitioning errors caused by manual intervention, improving the accuracy of detection region classification, significantly improving the efficiency and accuracy of wafer defect detection, and solving the problems of large workload and long time consumption in the prior art.

[0130] Figure 5This is a schematic diagram of the structure of a defect detection device provided in an embodiment of this application, as shown below. Figure 5 As shown, the device 500 may include:

[0131] Image acquisition module 510 is used to acquire the original image of the sample;

[0132] The image segmentation module 520 is used to segment the original image using the image segmentation method described in any embodiment of this application to obtain target sub-images of multiple feature types corresponding to the original image;

[0133] The image detection module 530 is used to perform detection using the same detection standard for target sub-images of the same feature type.

[0134] The defect detection device provided in this embodiment is applicable to the defect detection method provided in the above embodiments, and has the corresponding functions and beneficial effects.

[0135] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0136] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for partitioning an image, characterized in that, The method includes: The original image to be partitioned is segmented using an image segmentation model to generate multiple initial masks; Based on the initial mask, multiple target masks are determined, each target mask corresponding to a target region in the original image; Based on the texture feature values ​​of the target region, valid texture features are determined; Obtain the feature vector of each target region, wherein the vector composed of the feature values ​​of the effective texture features of each target region constitutes the feature vector of the corresponding target region; Clustering is performed on the target regions based on the feature vectors of each target region to obtain target sub-images of various feature types corresponding to the original image.

2. The image partitioning method according to claim 1, characterized in that, The process of determining multiple target masks based on the initial mask includes: The adjacent mask pairs among the multiple initial masks are deduplicated and merged to obtain multiple target masks.

3. The image partitioning method according to claim 2, characterized in that, The mask pair includes adjacent first initial masks and second initial masks; the process of deduplicating and merging adjacent mask pairs among the plurality of initial masks to obtain a plurality of target masks includes: For any of the mask pairs, determine whether there is an overlapping region between the first initial mask and the second initial mask; If there is an overlapping area, it is determined whether the area of ​​the overlapping area reaches a preset area. The preset area is the area of ​​the smaller of the first initial mask and the second initial mask multiplied by a preset percentage. The preset percentage is determined by the number of pixels of the smaller area. If the preset area is reached, the first initial mask and the second initial mask are merged to obtain a merged mask; Traverse all mask pairs and use the merged mask and the unmerged initial mask together as the target mask.

4. The image partitioning method according to claim 2, characterized in that, Before performing region deduplication and merging on adjacent mask pairs among the multiple initial masks, the process further includes: The initial sub-images corresponding to each of the multiple initial masks are filtered to remove the initial sub-images of regions of no interest and retain the initial sub-images of regions of interest.

5. The image partitioning method according to claim 1, characterized in that, The determination of effective texture features based on the texture features of the target region includes: Extract feature values ​​of multiple texture features for each target region; Calculate the statistics for each of the texture features; The texture features corresponding to the statistics that meet the preset data standards are determined as the effective texture features.

6. The image partitioning method according to claim 1, characterized in that, The clustering process based on the feature vector of each target region to obtain target sub-images of multiple feature types corresponding to the original image includes: An undirected graph is constructed by using the feature vector of each target region as spatial sample points. Determine the symmetric normalized Laplace matrix of the undirected graph; Construct a target matrix characterizing the clustering attributes of the spatial sample points based on the symmetric normalized Laplace matrix; Based on the target matrix, the K-means algorithm is used to cluster the spatial sample points to classify the target regions corresponding to the spatial sample points, thereby obtaining target sub-images with multiple feature types.

7. The image partitioning method according to claim 6, characterized in that, Determining the symmetric normalized Laplacian matrix of the undirected graph includes: Construct the adjacency matrix of the undirected graph; Construct the degree matrix of the undirected graph; The Laplacian matrix of the undirected graph is obtained by subtracting the adjacency matrix and the degree matrix. The Laplace matrix is ​​symmetrically normalized to obtain the symmetrically normalized Laplace matrix.

8. The image partitioning method according to claim 6, characterized in that, The construction of the target matrix characterizing the clustering attributes of the spatial sample points based on the symmetric normalized Laplacian matrix includes: Obtain the eigenvalues ​​of the symmetric normalized Laplacian matrix and arrange the eigenvalues ​​in ascending order; Solve for the n-dimensional feature vectors corresponding to the first k feature values ​​after permutation, where k is the number of partitions to be divided and n is the number of spatial sample points; The target matrix is ​​constructed by using the k n-dimensional feature vectors as column vectors, and each row vector of the target matrix represents the clustering attribute of a spatial sample point.

9. The image partitioning method according to claim 7, characterized in that, Before performing clustering processing on the spatial sample points using the K-means algorithm, the following steps are also included: The target matrix is ​​standardized for each row vector, including min-max standardization or Z-score standardization.

10. The image partitioning method according to claim 1, characterized in that, The method further includes: The outline of the target sub-image of the same feature type is displayed using a preset color.

11. A defect detection method, characterized in that, The method includes: Obtain the original image of the sample; The original image is partitioned using any one of the image partitioning methods described in claims 1-10 to obtain target sub-images of various feature types corresponding to the original image; For target sub-images with the same feature type, the same detection standard is used to perform detection.

12. A defect detection device, characterized in that, The device includes: Image acquisition module, used to acquire raw images of the sample; The image segmentation module is used to partition the original image using any one of the image partitioning methods described in claims 1-10 to obtain target sub-images of multiple feature types corresponding to the original image; The image detection module is used to perform detection using the same detection standard for target sub-images of the same feature type.