Automatic segmentation and labeling method for dark field wafer image
By automatically segmenting and labeling dark-field wafer images using the RANSAC algorithm, the problem of time-consuming and labor-intensive manual segmentation and labeling is solved, achieving efficient and reliable dataset generation and supporting the training of deep learning models.
Patent Information
- Application Number
- CN202511190954.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-12-12
AI Technical Summary
In existing technologies, the segmentation and annotation of dark field wafer images rely on manual operation, which is time-consuming, labor-intensive, and highly subjective, resulting in poor data sample consistency and failing to effectively support the training of deep learning models.
The RANSAC algorithm is used to iteratively fit the bright spot coordinates. The optimal model is obtained through multiple rounds of iteration. The dark field wafer image is automatically segmented and labeled to reduce redundant information interference and improve robustness and generalization ability.
It achieves efficient and automatic wafer image segmentation and annotation, improves the consistency and reliability of datasets, supports efficient training of deep learning models, and reduces manual labor costs.
Smart Images

Figure CN121120662A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of semiconductor detection, in particular to an automatic segmentation and labeling method of dark field wafer images. BACKGROUND
[0002] In the field of semiconductor manufacturing, as the integrated circuit process advances to the node below 10nm, wafer surface defect detection has become a core link to ensure chip yield. Dark field wafer image detection technology has become one of the current mainstream detection methods due to its high sensitivity to surface particles, scratches, film unevenness and other defects. The technology illuminates the wafer with light waves at an oblique angle, uses scattering imaging principle to make the flat area of the wafer show a dark background, and the defect area forms a bright spot due to the enhancement of scattered light, and the imaging image is as shown in Figure 1 With the development of deep learning algorithm, it shows significant advantages in wafer defect recognition field, which can automatically extract defect features through end-to-end learning to realize high-precision segmentation and labeling.
[0003] In the prior art, the training and deployment of deep learning model highly depend on large-scale and high-quality labeled data sets. The original dark field wafer image usually has very large pixel resolution, not only has a large number of redundant pixels, but also has no labeled information, which cannot be directly used as training data and must be further segmented and labeled to be converted into structured data sets. Manual labeling is still the main way of this process, which requires engineers to identify defects frame by frame and manually draw masks, which is time-consuming and laborious and has strong subjectivity and high omission rate. Moreover, the judgment standards of different engineers may be different, resulting in low consistency of data samples.
[0004] Therefore, there is an urgent need for an automatic segmentation and labeling method of dark field wafer images. SUMMARY
[0005] Therefore, the present application discloses an automatic segmentation and labeling method of dark field wafer images to solve the above problems; comprising:
[0006] S1, obtaining an original dark field wafer image and pre-processing to obtain a binary image;
[0007] S2, obtaining all bright spot coordinates in the binary image;
[0008] S3, using RANSAC algorithm to iteratively fit all bright spot coordinates to obtain a candidate best model, and calculating the inliers of the candidate best model;
[0009] S4, judging whether the original dark field wafer image has defects according to the inliers, if yes, proceeding to the next step, if not, directly segmenting and marking as a defect-free sample;
[0010] S5, performing secondary fitting on the inliers to obtain a best model;
[0011] S6, segmenting the original dark field wafer image to obtain a segmented sub-image;
[0012] S7, labeling the segmented sub-image according to the optimal model to obtain a segmented and labeled image of the dark field wafer image, and ending the segmentation and labeling.
[0013] The beneficial effects of the present application include:
[0014] The present application adopts the RANSAC algorithm to obtain the optimal model to represent the distribution of the defect bright spots through multiple iterations, avoids the interference of redundant information on the final result, has high robustness and generalization ability, can effectively and quickly separate the normal bright spots and abnormal bright spots in the dark field wafer image, obtain the distribution curve of the defects, and significantly improve the problems of low efficiency, poor reliability, high labor cost and heavy burden of the existing manual segmentation and labeling scheme, can avoid the inconsistent judgment problem, and maintain the consistency of the sample data;
[0015] The dark field wafer data set obtained by the automatic segmentation and labeling of the present application has application value in wafer defect detection, quality data tracing and deep learning model training. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is an imaging image of the dark field wafer image detection in the prior art;
[0017] Figure 2 is a flowchart of the automatic segmentation and labeling method of the dark field wafer image in the present application;
[0018] Figure 3 is an image obtained by each step of the automatic segmentation and labeling method of the dark field wafer image in the present application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme, characteristics and advantages of the present application more clear, in order to make the technicians in the art better understand the technical scheme of the present application, the present application will be further introduced in detail in combination with the drawings and examples.
[0020] The present embodiment includes an automatic segmentation and labeling method of a dark field wafer image, as shown in Figure 2 , including:
[0021] S1, obtaining an original dark field wafer image and pre-processing to obtain a binary image.
[0022] Specifically, Otsu binarization, i.e., Otsu method, is adopted to perform binarization processing on the original dark field wafer image, so as to convert the original gray scale into 0 or 1. The binarization preprocessing is used to separate the foreground and background of the image, highlight the bright spots with the foreground attribute, and reduce the calculation amount, as shown in Figure 3 a) is the original dark field wafer image, and b) is the binarization image.
[0023] S2, all bright spot coordinates in the binarization image are obtained, and visualization is performed.
[0024] All bright spot coordinates, i.e., coordinates of all points with "1" in the binarization image matrix, are marked, and bright spot visualization is realized. In this embodiment, a highlight color is used for marking on the original image, and the bright spot acquisition result is shown in Figure 3 c) in FIG. 1.
[0025] S3, RANSAC algorithm is used to iteratively fit all bright spot coordinates, to obtain a candidate best model, and to calculate inliers of the candidate best model.
[0026] Specifically, the RANSAC algorithm is an iterative algorithm with high robustness. In the RANSAC algorithm, sample data is divided into two categories, i.e., abnormal points (outliers) that are not targets and target points (inliers) that need to be fitted. Through fitting of randomly sampled part of data and evaluation using all data, the optimal model that meets the distribution rule of inliers is finally selected.
[0027] The iterative fitting of all bright spots using the RANSAC algorithm includes: regarding normal bright spots as outliers and abnormal bright spots as inliers, in a single iteration process, randomly selecting not more than ten bright spot coordinates as fitting data, using polynomial fitting to fit the fitting data, and defining the fitted polynomial result as the fitting model of the current iteration. The formula of the polynomial fitting is:
[0028]
[0029] wherein, , … , represents a coefficient of each order variable in the fitted polynomial, represents the fitting model of the current iteration.
[0030] To avoid the influence of a sick equation on fitting, when a sick equation appears in iteration, the fitting result of the current iteration is discarded, and the next iteration is entered.
[0031] Further, obtaining the candidate best model includes: setting an inlier distance threshold and an iteration number threshold; calculating the coordinates of each bright spot in all bright spots one by one The vertical distance of the fitting model to the current iteration, the calculation formula is as follows:
[0032]
[0033] Wherein, The distance between the data sample and the fitting model, The coordinates of the current sample data. The inner point distance threshold and the iteration number threshold are empirical values, which need to be adjusted to a certain extent for different cases.
[0034] If the vertical distance is less than If the vertical distance is less than
[0035] The abnormal bright spots caused by wafer defects have high aggregation and directionality, which will form the effect of inner point aggregation in the two-dimensional space of imaging, so that the model of a certain iteration has reference value, and the inner points of the model contain a large number of abnormal bright spots. Therefore, the model with the most inner points is selected as the best model representing the distribution of wafer defects. Figure 3 d) in the middle shows the inner points contained in the candidate best model obtained by iteration in the embodiment.
[0036] S4, judge whether the original dark field wafer image has defects according to the inner points, if there are defects, proceed to the next step, if there are no defects, directly segment and mark as a defect-free sample.
[0037] Specifically, a clustering degree threshold is set, and the percentage of inner points in the total number of bright spots is calculated. When the percentage is less than the clustering degree threshold, the original dark field wafer image does not have defects, and the original dark field wafer image is marked as having no defects, the candidate best model is discarded, and image segmentation is directly performed. The sub-images obtained by segmentation are all marked as defect-free samples, and the segmentation and marking are ended; When the percentage is greater than the clustering degree threshold, the original dark field wafer image has defects, and the next step is performed; The clustering degree threshold is an empirical value, which needs to be adjusted to a certain extent for different cases. In the embodiment, the clustering degree threshold is set to 28%.
[0038] S5, the inner points are fitted again to obtain the best model.
[0039] Since the inner points contain a large number of abnormal bright spots and a small part of normal bright spots, in order to more accurately express the distribution properties and direction characteristics of defects, the inner points are fitted by a polynomial. In the embodiment, the formula form of the quadratic fitting is consistent with S3. The quadratic fitting process also needs to avoid the occurrence of ill-conditioned equations, Figure 3The middle e) shows the obtained best model for the secondary fitting of the inner points, and the red line is the inner point fitting curve of the best model.
[0040] S6, segmenting the original dark field wafer image to obtain a segmented sub-image.
[0041] Specifically, when segmenting the original dark field wafer image, any pixel size can be used for segmentation, and the specific segmentation accuracy is selected according to actual requirements.
[0042] S7, labeling the segmented sub-image according to the best model to obtain a segmented and labeled image of the dark field wafer image, and ending the segmentation and labeling.
[0043] Specifically, labeling the segmented sub-image includes labeling the segmented sub-image passing through the inner point fitting curve of the best model as having defects, and labeling the segmented sub-image not passing through the inner point fitting curve of the best model as not having defects. Figure 3 The middle f) shows the results of segmentation and labeling in this embodiment, and the segmented sub-image having defects is labeled as "NG" and the segmented sub-image not having defects is labeled as "OK"; the segmented and labeled image of the dark field wafer image can be used to make a dark field wafer image data set.
[0044] Finally, it should be noted that the above only describes some embodiments of the present application, and those skilled in the art can make various changes, modifications, replacements and deformations to these embodiments without departing from the principles and spirits of the present application, the protection scope of the present application is defined by the appended claims and their equivalents, and the above behaviors should be covered within the protection scope of the present application.
Claims
1. An automatic segmentation and annotation method for dark-field wafer images, characterized in that, include: S1. Obtain the original dark field wafer image and perform preprocessing to obtain a binarized image; S2. Obtain the coordinates of all bright spots in the binarized image; S3. Use the RANSAC algorithm to iteratively fit the coordinates of all bright spots to obtain candidate optimal models, and calculate the interior points of the candidate optimal models. S4. Determine whether there are defects in the original dark field wafer image based on the interior points. If there are defects, proceed to the next step. If there are no defects, directly segment and mark it as a defect-free sample. S5. Perform a second fitting on the interior points to obtain the optimal model; S6. Segment the original dark field wafer image to obtain segmented sub-images; S7. Label the segmented sub-images according to the optimal model to obtain the segmented and labeled image of the dark field wafer image, and end the segmentation and labeling.
2. The automatic segmentation and annotation method for dark field wafer images according to claim 1, characterized in that, Preprocessing includes binarizing the original dark-field wafer image using Otsu binarization.
3. The automatic segmentation and annotation method for dark field wafer images according to claim 1, characterized in that, The RANSAC algorithm is used to iteratively fit all bright spots. In each iteration, the coordinates of no more than ten bright spots are randomly selected as the data to be fitted. Polynomial fitting is used to fit the data to be fitted, and the fitted polynomial result is defined as the fitting model for the current iteration. The formula for polynomial fitting is: in, , … , This represents the coefficients of the independent variables of each order in the fitted polynomial. This represents the fitted model for the current iteration.
4. The automatic segmentation and annotation method for dark field wafer images according to claim 3, characterized in that, If an ill-conditioned equation appears during the iteration, the fitting result of the current iteration is discarded, and the process proceeds to the next iteration.
5. The automatic segmentation and annotation method for dark field wafer images according to claim 1, characterized in that, The process of obtaining the candidate best model includes: setting an interior point distance threshold and an iteration number threshold; calculating the vertical distance from each bright spot in the entire bright spot to the fitted model of the current iteration; if the vertical distance is less than the interior point distance threshold, the bright spot is determined to be an interior point; otherwise, it is determined to be an exterior point; counting all interior points and proceeding to the next iteration until the iteration number threshold is reached; and selecting the model with the most interior points as the candidate best model.
6. The automatic segmentation and annotation method for dark field wafer images according to claim 1, characterized in that, Determining whether there are defects in the original dark field wafer image based on inliers involves: setting a clustering threshold, calculating the percentage of inliers relative to the total number of bright spots; if the percentage is less than the clustering threshold, the original dark field wafer image has no defects; if the percentage is greater than the clustering threshold, the original dark field wafer image has defects.
7. The automatic segmentation and annotation method for dark field wafer images according to claim 1, characterized in that, The annotation of segmented sub-images includes: labeling segmented sub-images through which the interior point fitting curve of the best model passes as having defects, and labeling segmented sub-images that have not passed through as having no defects.