Ghost image determination method, device, storage medium and program product
Patent Information
- Application Number
- CN202610970480.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-09-25
AI Technical Summary
[0006]本申请公开了一种鬼像确定方法、设备、存储介质及程序产品,用于解决半导体晶圆缺陷检测精准度较低的问题
[0066]通过将对待检测对象的图像中识别到的多个候选缺陷,先结合属性决策树和机器学习模型进行筛选,过滤出真实缺陷,将余下的多个候选鬼像集合根据与大面积缺陷的关联区域之间的关系,识别多个候选鬼像集合是鬼像还是真实缺陷,实现了两阶段的鬼像检测与滤除。在上述鬼像的检测过程中无需人工参与,此外,经过两阶段的鬼像检测与滤除,减少了将缺陷误识别为鬼像的概率,提高了鬼像检出的精准度,有利于提高缺陷检测结果的精准度。
Smart Images

Figure CN122820596A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, device, storage medium, and program product for determining ghost images. Background Technology
[0002] Optical imaging technology can be used to detect surface defects generated during the manufacturing process of a product, which can affect the reliability of the final product. For example, chip defects (such as particle contamination, scratches, and voids) can have a serious impact on the reliability of devices made from them. For instance, defect detection during semiconductor wafer manufacturing can reduce the probability of using defective chips to make devices, thus improving device reliability.
[0003] Traditional optical inspection techniques (such as dark-field imaging) detect defects in images by using high-resolution imaging and algorithms. However, due to the high reflectivity of wafer surface defects and the assembly and adjustment precision of equipment hardware, they often produce non-real defect signals, i.e., ghost images.
[0004] Ghost images are essentially optical artifacts. The forms of ghost images captured during wafer defect detection are diverse and very similar to real defects, which seriously reduces image quality and may lead to false detection (identifying ghost images as defects) or missed detection (ghost images masking real defects), resulting in low defect detection accuracy.
[0005] Therefore, ghost image recognition is needed to improve the accuracy of defect detection. Summary of the Invention
[0006] This application discloses a method, device, storage medium, and program product for determining ghost images, which is used to solve the problem of low accuracy in semiconductor wafer defect detection.
[0007] In a first aspect, this application provides a ghost image determination method applied to a defect detection device. The defect detection device includes an image acquisition module, comprising: determining multiple candidate defects in a first image; wherein the first image is obtained by image acquisition of an object to be detected by the image acquisition module; for each candidate defect, determining attribute values of multiple attributes of the candidate defect; classifying the attribute values of the multiple candidate defects based on an attribute decision tree and a machine learning model, classifying the multiple candidate defects into a set of real defects and a set of candidate ghost images; determining a set of reference defects with a size greater than a preset threshold from the set of real defects; and for each candidate ghost image in the set of candidate ghost images, determining whether the candidate ghost image is a real ghost image based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the set of reference defects.
[0008] By first filtering multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify true defects, and then identifying whether the remaining multiple candidate ghost images are ghost images or true defects based on their relationship with the associated regions of large-area defects, a two-stage ghost image detection and filtering process is achieved. No manual intervention is required in the above ghost image detection process. Furthermore, the two-stage ghost image detection and filtering reduces the probability of misidentifying defects as ghost images, improves the accuracy of ghost image detection, and contributes to the overall accuracy of defect detection results.
[0009] In some implementations, classifying the attribute values of the plurality of candidate defects based on attribute decision trees and machine learning models, and categorizing the plurality of candidate defects into a set of real defects and a set of candidate ghost images, includes:
[0010] The attribute values of multiple attributes of each candidate defect are input into the attribute decision tree;
[0011] If the attribute decision tree determines that the candidate defect meets the first preset condition, the candidate defect is classified into the set of real defects; wherein, the attribute decision tree uses the attribute values of multiple attributes of the candidate defect and their respective preset thresholds to determine whether the candidate defect meets the first preset condition;
[0012] If the attribute decision tree determines that the candidate defect does not meet the first preset condition, the image features of the candidate defect are determined and the image features are input into the machine learning model;
[0013] Based on the output of the machine learning model, the candidate defects are classified into the set of real defects or the set of candidate ghost images.
[0014] The above scheme processes candidate defects in stages through a cascaded classification of attribute decision trees and machine learning models. The attribute decision tree first compares the attribute values of multiple attributes with preset thresholds, directly classifying candidate defects that meet the first preset condition into the real defect set, preventing them from entering the computationally intensive subsequent machine learning process. For candidate defects that do not meet the condition, image features are extracted and input into the machine learning model for secondary discrimination. Because of the pre-screening mechanism of the attribute decision tree, the amount of data that the machine learning model needs to process can be reduced to some extent, thereby lowering the overall computational cost. Simultaneously, because the machine learning model can perform refined classification of complex samples that decision trees struggle to distinguish (such as morphologically varied ghost images that are highly similar to real defects), it can compensate for the insufficient discrimination ability of single-rule models to some extent. This approach maintains processing efficiency while improving the accuracy of distinguishing difficult samples, thus achieving a balance between speed and accuracy in ghost image detection.
[0015] In some implementations, determining the image features of the candidate defects includes at least one of the following:
[0016] Calculate the angle between the long side of the minimum bounding rectangle of the candidate defect and one of the boundaries of the first image, and determine the angle as the image feature of the region where the candidate defect is located;
[0017] Calculate the first energy ratio between the energy of the central region and the energy of the edge region of the candidate defect, and determine the first energy ratio as the image feature of the region where the candidate defect is located.
[0018] Calculate a second energy ratio between the energy of the region above and the energy of the region below the candidate defect, and determine the second energy ratio as the image feature of the region where the candidate defect is located.
[0019] The above scheme characterizes the geometric shape and energy distribution of defects from different dimensions by calculating three image features: the included angle, the first energy ratio, and the second energy ratio. The included angle reflects the orientation information of the defect. In dark-field imaging, real defects and ghost images often exhibit different directional patterns, and this feature can be used to distinguish between the two to some extent. The first energy ratio (the ratio of energy in the central region to the energy in the edge region) characterizes the spatial concentration of energy in the defect. Real defects usually have energy concentrated in the center, while ghost images are more diffuse. This feature helps to capture this difference. The second energy ratio (the ratio of energy in the upper region to the lower region) describes the energy asymmetry of the defect in the vertical direction, providing a basis for discrimination based on the unique vertical distribution patterns of ghost images under certain optical systems. The three features complementarily describe the imaging performance of defects from the perspectives of orientation, aggregation, and vertical asymmetry, respectively. This allows the machine learning model to obtain richer discrimination information, thereby improving the recognition accuracy of ghost images with varied shapes that are similar to real defects to some extent, while reducing the risk of misclassifying real defects as ghost images.
[0020] In some implementations, based on the output of the machine learning model, the candidate defects are classified into the set of true defects or the set of candidate ghost images, including:
[0021] If the machine learning model outputs a first confidence level greater than or equal to a preset judgment threshold, then the candidate defect is classified into a candidate ghost image set.
[0022] If the first confidence level is less than the preset judgment threshold, the candidate defect is classified into the set of real defects; wherein, the first confidence level is the confidence level indicating that the candidate defect belongs to the ghost image.
[0023] By using the confidence level of the ghost images output by the machine learning model and the preset judgment threshold, the confidence level of the ghost images can be transformed into a definite binary classification result, thereby clearly distinguishing the ghost images to be filtered out from the real defects that should be retained, and completing the judgment closed loop from suspected samples to the final conclusion.
[0024] In some implementations, the preset judgment threshold is determined based on a baseline judgment threshold and a ghost detection threshold sensitivity; wherein, the ghost detection threshold sensitivity is determined by user input or based on the material type of the detected object.
[0025] The preset judgment threshold in the above scheme is not a fixed value, but is determined jointly based on the baseline judgment threshold and the sensitivity of the ghost image detection threshold. The sensitivity of the ghost image detection threshold can be manually entered by the user according to actual needs, or it can be automatically adapted according to the material type of the object to be detected. Since different users have different focuses in defect detection (for example, some scenarios require filtering out ghost images as much as possible, while others require avoiding missing real defects), users can flexibly control the stringency of ghost image judgment by adjusting the sensitivity, thereby obtaining appropriate detection results under different needs. At the same time, different materials (such as silicon, silicon nitride, metal films, etc.) have different surface reflectivity and scattering characteristics, resulting in different imaging manifestations of ghost images and real defects. Automatically determining the sensitivity based on the material type allows the judgment threshold to match the physical characteristics of the current object being detected, reducing the workload of repeated manual adjustments. Therefore, this scheme can improve the flexibility and scenario adaptability of ghost image detection to a certain extent, taking into account the detection needs of different user preferences and different material conditions.
[0026] In some implementations, determining whether a candidate ghost image is a real ghost image based on its spatial relationship with one of the reference defects in the set of reference defects includes:
[0027] Determine the location information of one of the reference defects in the reference defect set;
[0028] Based on the location information of the reference defect, the corresponding ghost image generation area is determined;
[0029] Determine whether the candidate ghost image is located within the ghost image generation area;
[0030] If the candidate ghost image is located within the ghost image generation area, the candidate ghost image is determined to be a real ghost image;
[0031] If the candidate ghost image is not located within the ghost image generation area, the candidate ghost image is determined to be a real defect.
[0032] The above scheme introduces a secondary determination based on spatial location relationships to finally verify the candidate ghost images marked in the first stage. Specifically, using the location information of the reference defect as a benchmark, the corresponding ghost image generation area is delineated, and it is determined whether the candidate ghost image falls within this area. Because ghost images in optical imaging often accompany large particle defects and are located in specific orientations around them, this physical law provides a basis for area determination. Therefore, only when a candidate ghost image is truly located within the predetermined ghost image area of the reference defect is it confirmed as a real ghost image; otherwise, it is corrected to a real defect. This approach can effectively filter out ghost images that are difficult to distinguish based on attribute characteristics alone while preserving real defects, thereby reducing the risk of misclassifying real defects as ghost images to a certain extent. Furthermore, since the determination rule is based on spatial location rather than a single attribute threshold, this method has a certain degree of adaptability to different optical systems and equipment differences, which helps to improve the overall accuracy and robustness of ghost image detection.
[0033] In some implementations, determining the corresponding ghost image generation area based on the location information of the reference defect includes:
[0034] Determine the inscribed circle of the reference defect;
[0035] The coordinates of the center of the reference defect are determined based on the inscribed circle of the reference defect.
[0036] Based on the center coordinates of the reference defect, the corresponding ghost image generation area is determined.
[0037] The above scheme first determines the inscribed circle of the reference defect, then uses its center as the central coordinate, and finally delineates the ghost image generation area based on this central coordinate. Since the inscribed circle reflects the internal geometric core area of the reference defect, even if the defect shape is irregular (e.g., star-shaped, elongated, or with pits), the center of the inscribed circle can reliably represent the main position of the defect, thus avoiding center positioning deviations caused by uneven or unusual defect boundaries. The ghost image generation area determined based on more accurate central coordinates has a higher degree of matching between its location and the spatial range of ghost image occurrence in the actual optical system, making it easier for real ghost images to fall into the predetermined area while reducing the false appearance of non-ghost images. Therefore, this scheme can improve the stability of ghost image region positioning under conditions of complex reference defect morphology or fluctuating image quality, thereby improving the accuracy of subsequent candidate ghost image judgment and reducing the risk of misclassifying real defects as ghost images.
[0038] In some implementations, determining the corresponding ghost image generation region based on the center coordinates of the reference defect includes:
[0039] Determine the coordinates of the point symmetrical to the center coordinates of the reference defect about the central axis of the image;
[0040] A preset geometric range is established as the ghost image generation area, centered on the coordinates of the symmetry point; wherein, the preset geometric range includes a circular area or a rectangular area centered on the symmetry point.
[0041] The above scheme calculates the point symmetrical to the center coordinates of the reference defect about the central axis of the image, and establishes a circular or rectangular pre-defined geometric area centered on this symmetrical point as the ghost image generation region. In some optical systems (e.g., detection equipment with symmetrical optical paths or reflective mirrors), ghost images often appear at positions symmetrical to the real defect about the central axis of the image (e.g., the optical axis or the detector central axis), determined by the specular reflection or symmetrical imaging characteristics of optical elements. Therefore, the ghost image generation region determined based on the coordinates of the symmetrical point can better match this type of optical phenomenon, making ghost images caused by symmetrical structures more likely to fall within the predetermined detection range, thereby improving the detection rate of such ghost images to a certain extent. Furthermore, using a circular or rectangular region centered on the symmetrical point as the ghost image generation region eliminates the need for complex geometric modeling, makes parameter adjustments intuitive, and facilitates engineering implementation and cross-machine deployment. This scheme, without increasing the computational burden, utilizes the inherent symmetry characteristics of the optical system to guide region localization, helping to improve the targeting and accuracy of ghost image detection.
[0042] In some implementations, determining the corresponding ghost image generation region based on the center coordinates of the reference defect includes:
[0043] Using the center coordinates of the reference defect as a reference point, the region where the Euclidean distance to the reference point is less than a preset radius threshold is determined as the ghost image generation region.
[0044] The above scheme uses the center coordinates of the reference defect as a reference point and directly identifies circular regions with Euclidean distances less than a preset radius threshold as ghost image generation areas. Because using circular regions as ghost image generation areas only requires determining the center coordinates and radius, the computational load is small and the processing speed is fast. Furthermore, this scheme does not rely on directional information and is suitable for optical scenarios where ghost images are isotropically distributed around the reference defect (e.g., uniformly scattering ghost images caused by spherical lenses or symmetrical optical systems). The circular region determination rule based on Euclidean distance is simple and intuitive, facilitating parameter calibration and cross-machine migration. Therefore, this scheme can reduce the computational overhead in the ghost image region determination stage to a certain extent, improve the overall efficiency of the detection process, and maintain good detection performance even when there is no significant directional bias in the ghost image distribution.
[0045] In some implementations, determining the corresponding ghost image generation region based on the center coordinates of the reference defect includes:
[0046] Calculate the coordinate difference between the candidate position and the center coordinates of the reference defect; the coordinate difference includes a first axial coordinate difference and a second axial coordinate difference;
[0047] The regions that satisfy the condition that the first axial coordinate difference is less than the first axial threshold and the second axial coordinate difference is less than the second axial threshold are defined as ghost image generation regions; wherein, the second axial threshold is greater than the first axial threshold.
[0048] The above scheme determines the ghost image generation region by comparing the horizontal and vertical offsets of the candidate ghost image with the center of the reference defect. The region with a smaller horizontal offset and a larger vertical offset has a higher threshold value in the vertical direction than in the horizontal direction. This asymmetric region delineation method is suitable for specific optical scenarios where ghost images appear only directly above or below the reference defect, with almost no horizontal offset (e.g., ghost images caused by vertical reflection or scattering at a specific angle). Because the allowable vertical offset is larger, it can effectively capture ghost images distributed along the vertical direction; simultaneously, the allowable horizontal offset is smaller, avoiding misclassification of real defects in the horizontal direction as ghost images. Compared to isotropic circular regions, this scheme more specifically matches the distribution patterns of ghost images with clear directions, thereby improving the detection accuracy of such ghost images to some extent. Furthermore, the threshold values in the two directions can be independently calibrated and adjusted, facilitating adaptation to differences in setup and adjustment of different equipment or detection channels, enhancing the flexibility and adaptability of the scheme.
[0049] In some implementations, determining multiple candidate defects in the first image includes:
[0050] Based on threshold segmentation, connected component analysis, and morphological analysis, multiple regions are identified from the first image, and each region corresponds to a candidate defect.
[0051] By using threshold segmentation, connected component analysis, and morphological analysis, candidate defects can be adaptively extracted from images with uneven illumination. Adjacent or contiguous defects can be correctly separated into independent regions, and false regions caused by noise or minor artifacts can be effectively filtered out, thereby improving the accuracy and robustness of candidate defect extraction to a certain extent.
[0052] In some implementations, the determination of multiple regions from the first image based on threshold segmentation, connected component analysis, and morphological analysis includes:
[0053] The first image is subjected to adaptive threshold segmentation to generate a binarized image;
[0054] Connectivity labeling is performed on the binarized image to identify all independent connected regions;
[0055] Morphological filtering is performed on the marked independent connected regions to identify multiple regions.
[0056] The above scheme combines adaptive threshold segmentation, connected component labeling, and morphological filtering. This scheme can stably extract candidate defect regions from a first image with uneven illumination. Adaptive threshold segmentation dynamically calculates the segmentation threshold based on local grayscale, effectively addressing brightness differences in different areas of the wafer surface and reducing false negatives and false positives. Connected component labeling classifies adjacent foreground pixels into independent regions, allowing defects that are close to each other or slightly adhered to each other to be correctly separated, avoiding region merging or splitting. Morphological filtering eliminates isolated noise points and small artifacts through opening operations and area screening, preserving the main shape of the real defects. The three processes work together to make the finally determined multiple regions closer to the actual defect distribution in terms of location, shape, and size, providing higher quality and less interference-free input data for subsequent feature extraction and classification, thereby improving the overall accuracy and robustness of defect detection to a certain extent.
[0057] In some implementations, the morphological filtering of the marked independent connected regions to determine multiple regions includes:
[0058] A morphological opening operation is performed on the marked independent connected regions, and then regions with fewer pixels than the minimum defect area threshold are removed, thus determining the processed connected regions as multiple regions.
[0059] After the above processing, the remaining connected regions are identified as the regions corresponding to multiple candidate defects. By first performing morphological opening operations on the marked independent connected regions, and then removing regions with fewer pixels than the minimum defect area threshold, the morphological opening operation, which involves both erosion and dilation, removes isolated foreground pixels or small protrusions. The erosion operation restores the size of the main region, thus filtering out false connected regions caused by image noise or minor contamination to a certain extent while maintaining the basic shape of the real defect. Subsequently, regions with areas smaller than a preset threshold are removed to further eliminate extremely small noise points remaining after the opening operation, ensuring that the remaining candidate defects have the lower limit of the actual defect size. Through this two-step filtering, a large number of invalid small regions are removed in advance, reducing the number of candidate defects sent to the subsequent classification process. This reduces the computational overhead of feature extraction and machine learning model inference to a certain extent, improving overall detection efficiency. Simultaneously, this scheme helps improve the size consistency of candidate defects, making the finally identified regions more physically meaningful.
[0060] Secondly, this application provides a ghost image determining device, which includes:
[0061] The first determining unit is used to determine multiple candidate defects in the first image; wherein the first image is obtained by the image acquisition module based on the image acquisition of the object to be detected;
[0062] The second determining unit is used to determine the attribute values of multiple attributes of each candidate defect for each candidate defect.
[0063] The parsing unit is used to classify the attribute values of the multiple candidate defects based on the attribute decision tree and machine learning model, and classify the multiple candidate defects into a set of real defects and a set of candidate ghost images;
[0064] The third determining unit is used to determine a set of reference defects with a size greater than a preset threshold from the set of real defects;
[0065] The fourth determining unit is used to determine whether each candidate ghost image in the candidate ghost image set is a real ghost image based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the reference defect set.
[0066] By first filtering multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify true defects, and then identifying whether the remaining multiple candidate ghost images are ghost images or true defects based on their relationship with the associated regions of large-area defects, a two-stage ghost image detection and filtering process is achieved. No manual intervention is required in the above ghost image detection process. Furthermore, the two-stage ghost image detection and filtering reduces the probability of misidentifying defects as ghost images, improves the accuracy of ghost image detection, and contributes to the overall accuracy of defect detection results.
[0067] Thirdly, this application provides an electronic device, which includes a processor and a memory;
[0068] The memory stores computer-executed instructions;
[0069] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method described in the first aspect above.
[0070] By first filtering multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify true defects, and then identifying whether the remaining multiple candidate ghost images are ghost images or true defects based on their relationship with the associated regions of large-area defects, a two-stage ghost image detection and filtering process is achieved. No manual intervention is required in the above ghost image detection process. Furthermore, the two-stage ghost image detection and filtering reduces the probability of misidentifying defects as ghost images, improves the accuracy of ghost image detection, and contributes to the overall accuracy of defect detection results.
[0071] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in the first aspect above.
[0072] By first filtering multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify true defects, and then identifying whether the remaining multiple candidate ghost images are ghost images or true defects based on their relationship with the associated regions of large-area defects, a two-stage ghost image detection and filtering process is achieved. No manual intervention is required in the above ghost image detection process. Furthermore, the two-stage ghost image detection and filtering reduces the probability of misidentifying defects as ghost images, improves the accuracy of ghost image detection, and contributes to the overall accuracy of defect detection results.
[0073] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect above.
[0074] By first filtering multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify true defects, and then identifying whether the remaining multiple candidate ghost images are ghost images or true defects based on their relationship with the associated regions of large-area defects, a two-stage ghost image detection and filtering process is achieved. No manual intervention is required in the above ghost image detection process. Furthermore, the two-stage ghost image detection and filtering reduces the probability of misidentifying defects as ghost images, improves the accuracy of ghost image detection, and contributes to the overall accuracy of defect detection results. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is an architecture diagram of a ghost detection system.
[0077] Figure 2 This is a schematic diagram of the structure of an image acquisition module;
[0078] Figure 3 A flowchart illustrating the ghost image determination method provided in this application embodiment;
[0079] Figure 4This is a schematic diagram showing the distribution of the first region in the image of the object to be detected.
[0080] Figure 5 This is a schematic diagram of the ghost detection device provided in an embodiment of this application.
[0081] Explanation of reference numerals in the attached figures:
[0082] 1-Semiconductor equipment;
[0083] 50-Ghost Detection Device;
[0084] 11-Image acquisition module; 12-Defect detection module; 13-Control and display module;
[0085] 111-Light source; 112-Illumination module; 113-Collection module; 114-Camera;
[0086] 501 - First determining unit; 502 - Second determining unit; 503 - Analysis unit; 504 - Third determining unit; 505 - Fourth determining unit. Detailed Implementation
[0087] The ghost image determination method provided in this application can be applied to various semiconductor devices used for defect detection, such as wafer defect imaging devices.
[0088] like Figure 1 The architecture diagram of semiconductor device 1 is as follows: Figure 1 As shown, the semiconductor device 1 includes an image acquisition module 11, a defect detection module 12, and a control and display module 13. The image acquisition module 11 is communicatively connected to the defect detection module 12. The output terminal of the defect detection module 12 is communicatively connected to the control and display module 13.
[0089] The image acquisition module 11 may include a light source 111, an illumination module 112, a collection module 113, and a camera 114. The camera 114 may include an image sensor, such as a charge-coupled device (CCD), for acquiring two-dimensional image information. The light source 111 provides illumination of a suitable wavelength for imaging. The illumination module 112 can perform diffuse reflection or other processing on the illumination source to provide uniform illumination to the object under test. Illumination of the object under test (e.g., a wafer) produces reflected, scattered, or diffracted light. Scattered or diffracted light is caused by defects. The collection module 113 captures the scattered or diffracted light and converges and guides the captured light to the image sensor of the camera 114.
[0090] An image sensor may include multiple tiny photosensitive elements (pixels) arranged in an array. When the light collected by the collection module 113 is imaged onto the photosensitive surface of the image sensor, each pixel generates a corresponding number of charges (electron-hole pairs) based on the received light intensity and stores these charges within the pixel. The image sensor controls the potential well beneath each pixel by sequentially applying clock pulse voltages to each pixel, causing the charges to output. The output charges are converted into voltage signals and amplified. The sequence of sequentially output voltage signals corresponds to the light intensity values of each pixel scanned row by row, starting from the top-left pixel. These pixel light intensity values constitute the image data of the object to be detected.
[0091] The defect detection module 12 may include hardware devices such as a central processing unit, an image processor, and memory. It is primarily used to rearrange the pixels according to the number of rows and columns of the image sensor to reconstruct a two-dimensional digital image of the object to be detected. The voltage value of each pixel is quantized into a number (e.g., a grayscale value of 0-255); the received image data is preprocessed; and a defect detection algorithm is used to detect defects in the preprocessed image data. The defect information obtained from the defect detection is then sent to the display module.
[0092] The control and display module 13 may include hardware devices such as a central processing unit, an image processor, and memory, and is mainly used to set the detection process (Recipe), control system coordination, and finally present the detection results.
[0093] Due to the high reflectivity of the surface of the object being inspected, and the fact that the relative positions and angles of the camera 114, light source 111, illumination module 112, and collection module 113 in the image acquisition module 11 are not optimally adjusted, ghost images will occur. Specifically, when the illumination light undergoes multiple reflections or refractions at the wafer surface, optical elements (such as lenses, protective glass), or between the two, a false image (i.e., a ghost image) that corresponds geometrically or optically to the real defect will be formed at a non-real defect location. For example, if the illumination angle of the light source 111 is offset, after illuminating the particles on the wafer, some of the light is reflected by the wafer surface to the lens in the collection module 113, and then reflected back to the wafer surface by the inner surface of the lens, and finally captured by the camera 114, forming a ghost image that is symmetrical to the original particle position or has a specific offset. This ghost image may be mistaken for an independent defect.
[0094] The presence of ghost images reduces the signal-to-noise ratio of defect signals, thereby reducing the accuracy of defect signal detection.
[0095] Ghost image detection schemes in related technologies either rely heavily on manual judgment or misidentify real defects as ghost images, leading to missed defects. Addressing these technical problems, this application first filters multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify real defects. Then, it identifies the remaining multiple candidate ghost image sets as either ghost images or real defects based on their relationships with the associated regions of large-area defects, thus achieving a two-stage ghost image detection and filtering process. The following detailed description, in conjunction with specific embodiments, further illustrates this application.
[0096] Please refer to Figure 2 , Figure 2 This is a schematic flowchart illustrating the ghost detection method provided in an embodiment of this application. Figure 2 As shown, the method includes the following steps:
[0097] S201: Identify multiple candidate defects in the first image; wherein the first image is obtained by the image acquisition module based on the image acquisition of the object to be detected.
[0098] Before executing step S201, under specific lighting conditions, the image acquisition module 11 acquires an image of the object to be detected and generates a first image. Specifically, after the camera 114 in the image acquisition module 11 completes the image acquisition of the object to be detected and generates the first image, the camera 114 in the image acquisition module 11 can send the acquired first image of the object to be detected to the defect detection module 12. The defect detection module 12 performs threshold segmentation and / or connected component analysis on the first image to obtain multiple candidate defects.
[0099] In some examples, the execution body of the ghost image determination method can be... Figure 1 The defect detection module 12 is shown. The camera 114 in the image acquisition module 11 can send the first image of the object under test to the defect detection module 12. The object under test can be, for example, a semiconductor wafer, such as a wafer that has not yet been patterned with a device, or a photomask.
[0100] The first image can be, for example, the first image generated after camera 114 performs one or more scans of the object to be inspected, such as a first image characterizing surface defect information of a wafer or mask. The first image can contain all or part of the surface of the object to be inspected. A candidate defect can be, for example, an image region in the first image that may correspond to a real physical defect or optical artifact, identified through preliminary image processing (such as thresholding, connected component analysis), such as a small spot with abnormal brightness, an irregularly shaped dark area, or a striped area. Candidate defects are not pre-classified as real defects or ghost images, but are used as input for subsequent analysis.
[0101] In some examples, the defect detection module 12 can preprocess the first image, such as performing flat-field correction, noise reduction and filtering, and contrast enhancement. This converts the raw, noisy first image obtained from the image acquisition module 11 into a feature-rich grayscale image, providing high-quality input for subsequent thresholding, feature extraction, and classification.
[0102] The aforementioned defect detection module 12 can extract defects from the first image to obtain multiple candidate defects. By extracting defects from the first image and obtaining multiple candidate defects, the pixel-level signals in the original first image are transformed into discretized and quantifiable candidate defect objects; providing a traversable set of candidate defect objects for subsequent ghost image recognition. Defect extraction can be implemented using any image segmentation or object detection technique, including but not limited to threshold segmentation, connected component analysis, morphological processing, deep learning-based instance segmentation, watershed algorithms, superpixel clustering, etc.
[0103] In some examples, step S201 above includes:
[0104] Based on threshold segmentation, connected component analysis, and morphological analysis, multiple regions are identified from the first image, and each region corresponds to a candidate defect.
[0105] Thresholding segmentation refers to the process of classifying pixels in a first image according to the comparison results of their grayscale values with one or more thresholds. After thresholding segmentation, the original grayscale image is converted into a binary image, where some pixels are labeled as foreground (potentially corresponding to defects) and others are labeled as background. A connected component is a continuous region in a binary image formed by connecting adjacent (e.g., four-neighbor or eight-neighbor) foreground pixels. A binary image is the image generated after thresholding segmentation, where each pixel's value contains only two states (e.g., 0 for background, 1 foreground, or 255 foreground, 0 for background). Foreground pixels typically represent areas where defects may exist. There is a path formed by foreground pixels between any two foreground pixels within the same connected component. Morphological analysis refers to image processing operations based on the image's morphology (shape and structure). Common morphological operations include erosion, dilation, opening, and closing operations. The defect detection module 12 can identify multiple candidate defects in the first image based on thresholding segmentation, connected components, and morphological analysis. By using threshold segmentation, connected component analysis, and morphological analysis, candidate defects can be adaptively extracted from images with uneven illumination. Adjacent or contiguous defects can be correctly separated into independent regions, and false regions caused by noise or minor artifacts can be effectively filtered out, thereby improving the accuracy and robustness of candidate defect extraction to a certain extent.
[0106] In some examples, the above-mentioned methods, based on threshold segmentation, connected component analysis, and morphological analysis, identify multiple regions from the first image, including:
[0107] The first image is subjected to adaptive threshold segmentation to generate a binarized image;
[0108] Connectivity labeling is performed on the binarized image to identify all independent connected regions;
[0109] Morphological filtering is applied to the marked independent connected regions to identify multiple regions.
[0110] Adaptive thresholding is a thresholding method where the threshold is not fixed but automatically calculated based on the local neighborhood grayscale distribution of each pixel in the first image. For example, for each pixel in the image, the defect detection module 12 can calculate the mean and standard deviation of grayscale values within a window (e.g., 15 pixels × 15 pixels) around that pixel, and then set the threshold to the mean grayscale value minus a constant multiple of the standard deviation, thus adapting to uneven brightness in different areas of the image. Connected component labeling refers to the process of assigning a unique identifier to each connected component in the binarized image. When performing connected component labeling, the defect detection module 12 can traverse each pixel in the binarized image. When encountering an unlabeled foreground pixel, it uses seed filling or scanline algorithms to find all foreground pixels connected to that pixel and assigns them the same number. After connected component labeling, different connected components have different numbers and can therefore be processed independently. An independent connected region is a connected component with a unique number obtained after connected component labeling. Each independent connected region corresponds to the preliminary contour of a candidate defect.
[0111] Morphological filtering refers to the process of filtering and optimizing marked independent connected regions using morphological operations (such as opening and closing operations) and filtering rules based on region attributes (such as area and aspect ratio). This process aims to remove false regions caused by noise, real defect regions with broken connections, or regions that obviously do not meet the defect size requirements.
[0112] The defect detection module 12 can perform adaptive thresholding processing on the first image. In some cases, for each pixel in the first image, the defect detection module takes a fixed-size neighborhood window (e.g., 31 pixels × 31 pixels) centered on that pixel and calculates the mean and standard deviation of the grayscale values of all pixels within that window. Then, the defect detection module sets the threshold to the mean minus a constant multiple of the standard deviation (e.g., the constant is 2). If the grayscale value of the current pixel is greater than this local threshold, the pixel is marked as foreground (e.g., assigned a value of 255); if it is less than or equal to the local threshold, it is marked as background (e.g., assigned a value of 0). The defect detection module can traverse all pixels of the first image to generate a binarized image.
[0113] In some other cases, the defect detection module can also use a global threshold segmentation method, for example, by using a preset algorithm to calculate a globally optimal threshold and then binarizing the entire image.
[0114] After obtaining the binarized image, the defect detection module can use four-adjacency or eight-adjacency connectivity rules (usually eight-adjacency, which means that each pixel's eight adjacent pixels in the top, bottom, left, right, and diagonal directions are considered connected) to perform connected component labeling operations on the image.
[0115] The defect detection module scans each pixel of the binarized image line by line. When an unlabeled foreground pixel is encountered, the defect detection module can initiate a connected component growth process: adding the pixel to the current connected component and recursively or iteratively checking its neighboring pixels, labeling all connected foreground pixels with the same number. The defect detection module 12 can assign a unique integer identifier (e.g., 1, 2, 3, ...) to each newly discovered connected component. After scanning, the defect detection module can obtain a labeled image, where each foreground pixel is assigned the number of its corresponding connected component, and pixels with different numbers belong to different independent connected regions.
[0116] After obtaining multiple independent connected regions, the defect detection module 12 can perform morphological filtering on each independent connected region to remove noise and artifacts, and obtain the region corresponding to the final candidate defect. This scheme combines adaptive threshold segmentation, connected component labeling, and morphological filtering, enabling stable extraction of candidate defect regions from a first image with uneven illumination. Adaptive threshold segmentation dynamically calculates the segmentation threshold based on local grayscale, effectively addressing brightness differences in different areas of the wafer surface and reducing false negatives and false positives. Connected component labeling classifies adjacent foreground pixels into independent regions, allowing defects that are close to each other or slightly adhered to each other to be correctly separated, avoiding region merging or splitting. Morphological filtering, through opening operations and area filtering, eliminates isolated noise points and small artifacts, preserving the main shape of the real defect. The three processes work together to make the finally determined multiple regions closer to the actual defect distribution in terms of position, shape, and size, providing higher-quality, less-interference input data for subsequent feature extraction and classification, thereby improving the overall accuracy and robustness of defect detection to a certain extent.
[0117] In some cases, morphological filtering of labeled independent connected regions can identify multiple regions, including:
[0118] A morphological opening operation is performed on the marked independent connected regions, and then regions with fewer pixels than the minimum defect area threshold are removed, thus defining the processed connected regions as multiple regions.
[0119] The defect detection module 12 can first perform a morphological opening operation on the marked image. Morphological opening refers to a combination of erosion and dilation operations on the image. Erosion can eliminate small protrusions and isolated noise points, while dilation can restore the size of the eroded main area. Opening operations are typically used to remove small noise areas while maintaining the basic shape and area of larger areas. The defect detection module 12 can first perform an erosion operation on the first image, that is, for each foreground pixel, check whether its neighborhood consists entirely of foreground pixels (or satisfies structural element matching); if not, the pixel is changed to background. The erosion operation can separate small connections and remove isolated noise pixels. Then, the defect detection module 12 can perform a dilation operation on the eroded image, that is, for each background pixel, check whether its neighborhood contains foreground pixels; if so, the pixel is changed to foreground. The dilation operation can restore the edges of the eroded portion of the area. Opening operations can eliminate small noise areas and elongated protrusions while maintaining the basic shape of larger areas.
[0120] After completing the opening operation, the defect detection module calculates the number of pixels (i.e., area) of each connected region and reads the pre-stored minimum defect area threshold (e.g., the minimum defect area threshold can be set to 5 pixels or 10 pixels). For each connected region, the defect detection module can compare its area with the threshold: if the area is less than the minimum defect area threshold, the defect detection module 12 can remove the region (i.e., mark all its pixels as background); if the area is greater than or equal to the threshold, the region is retained.
[0121] After the above processing, the remaining connected regions are identified as the regions corresponding to multiple candidate defects. By first performing morphological opening operations on the marked independent connected regions, and then removing regions with fewer pixels than the minimum defect area threshold, the morphological opening operation, which involves both erosion and dilation, removes isolated foreground pixels or small protrusions. The erosion operation restores the size of the main region, thus filtering out false connected regions caused by image noise or minor contamination to a certain extent while maintaining the basic shape of the real defect. Subsequently, regions with areas smaller than a preset threshold are removed to further eliminate extremely small noise points remaining after the opening operation, ensuring that the remaining candidate defects have the lower limit of the actual defect size. Through this two-step filtering, a large number of invalid small regions are removed in advance, reducing the number of candidate defects sent to the subsequent classification process. This reduces the computational overhead of feature extraction and machine learning model inference to a certain extent, improving overall detection efficiency. Simultaneously, this scheme helps improve the size consistency of candidate defects, making the finally identified regions more physically meaningful.
[0122] In dark-field patternless wafer inspection, defect signals are typically much stronger than background noise. A global threshold can be obtained, and the first image can be segmented based on this threshold. Illustratively, this global threshold can be determined by scanning multiple known defect samples and statistically analyzing the minimum grayscale value of a large number of real defects and the maximum grayscale value of the background noise. The global threshold can be determined between the minimum and maximum grayscale values. After identifying multiple candidate defects, step S202 can be performed.
[0123] S202: For each candidate defect, determine the attribute values of multiple attributes of the candidate defect.
[0124] Candidate defect attributes refer to computable parameters used to quantitatively describe the characteristics of candidate defects in an image. Examples include the area (number of pixels contained), aspect ratio (the ratio of the length to the width of the circumscribed rectangle), mean gray level, gray level variance, image entropy (a statistic reflecting texture complexity), lateral gradient (the rate of change of pixel values in the horizontal direction), longitudinal gradient (the rate of change of pixel values in the vertical direction), gradient ratio (the ratio of the lateral gradient to the longitudinal gradient), defect kurtosis (a statistic reflecting the sharpness of the gray level distribution), maximum gray level, circumferential energy, saturation defect features, defect classification number features, location, and defect detection score. Attribute values are the specific numerical values obtained after calculating a particular attribute of a candidate defect, such as an area attribute value of 120 pixels, an aspect ratio attribute value of 2.3, and an image entropy attribute value of 4.5 bits.
[0125] In some examples, the defect detection module 12 can use the total number of pixels contained in the region corresponding to the candidate defect as the area of the candidate defect. The defect detection module 12 can calculate the minimum bounding rectangle (or bounding rectangle) of the defect region, obtain the width and height of the rectangle, and calculate the larger of the width and height by dividing the smaller of the two to obtain the aspect ratio of the candidate defect.
[0126] In some examples, the defect detection module 12 can extract the grayscale values of all pixels within the candidate defect region from the original grayscale image, and take the maximum value as the maximum grayscale value of the candidate defect. The defect detection module 12 can calculate the arithmetic mean of the grayscale values of all pixels within the candidate defect as the grayscale mean. The defect detection module 12 can calculate the average of the squares of the differences between the grayscale values of all pixels within the candidate defect and the mean. The defect detection module 12 can perform histogram statistics on the grayscale distribution within the candidate defect and calculate the value according to the information entropy formula to measure the randomness of the grayscale distribution. The defect detection module 12 can calculate the average of the absolute values of the grayscale differences between adjacent pixels along the horizontal direction. The defect detection module 12 can calculate the average of the absolute values of the grayscale differences between adjacent pixels along the vertical direction. The defect detection module 12 can calculate the ratio of the horizontal gradient value to the vertical gradient value as the gradient ratio.
[0127] In some examples, the defect detection module 12 can set a series of concentric ring radii (e.g., r = 1, 2, 3, 5 pixels) centered on the grayscale peak point or centroid of the defect region. The energy of the central region is calculated, for example, the sum of the grayscale values of all pixels within a radius r0 (usually 3 pixels). The total energy of the candidate defect region is calculated, which is the sum of the grayscale values of all pixels within the entire candidate region. The encircled energy (EE) value is obtained by dividing the central region energy by the total energy.
[0128] In some examples, the defect detection module 12 can determine the saturation defect feature based on the following steps: obtaining the saturation grayscale threshold of the image sensor (such as 255 or 4095, determined by the full-well capacity of the sensor); if the maximum grayscale value of the candidate defect region is greater than the saturation threshold, the saturation defect feature corresponding to the candidate defect is 1, otherwise it is 0.
[0129] In some examples, the defect detection module 12 can determine the defect classification number (FinebinNumber) feature based on the following steps. For example, different numbers can be determined based on some defect types and defect sizes. For example, the candidate defect number for "scratch" is "1", the candidate defect number for "large particle" is "2", the candidate defect number for "small particle / bright spot" is "3", the candidate defect number for "suspected ghost image / stray light" is "4", and the candidate defect for other situations is "5".
[0130] In some examples, when the defect detection module 12 initially identifies a candidate defect from the first image, it can simultaneously calculate the corresponding defect detection score to represent the degree of difference between the candidate region and the background, the signal-to-noise ratio, or the credibility of being judged as a real defect.
[0131] It is understandable that, in the process of identifying candidate defects in step S201, the defect classification number (Finebin Number) feature corresponding to the candidate defect can be determined based on the attribute values of the candidate defect and the judgment conditions corresponding to each defect type.
[0132] Schematic, after obtaining each candidate defect and its corresponding multiple attribute values, step S203 can be performed.
[0133] S203: Based on attribute decision trees and machine learning models, classify the attribute values of multiple candidate defects and categorize the multiple candidate defects into a set of real defects and a set of candidate ghost images.
[0134] After calculating the attribute values of multiple attributes for each candidate defect in step S202, the defect detection module 12 can use an attribute decision tree and a machine learning model to classify the attribute values of the multiple candidate defects, obtaining a set of real defects and a set of candidate ghost images. The set of real defects refers to the set of candidate defects classified as real physical defects after joint judgment by the attribute decision tree and machine learning model. Each element in this set is considered to have a high probability of being an actual wafer surface anomaly (such as particles, scratches, voids, etc.). The set of candidate ghost images refers to the set of candidate defects classified as potentially exhibiting ghost images (optical artifacts) after joint judgment by the attribute decision tree and machine learning model. Elements in this set need to undergo further spatial location verification.
[0135] An attribute decision tree is a pre-defined, hierarchical set of defect classification rules. An attribute decision tree contains multiple hierarchically arranged decision nodes. Each non-leaf node corresponds to an inherent defect attribute and one or more preset thresholds; each leaf node corresponds to a decision result, which may include belonging to the set of true defects or belonging to the set of candidate ghost images.
[0136] The aforementioned defect detection module 12 can input the attribute values of multiple attributes for each candidate defect into an attribute decision tree. In the attribute decision tree, the attribute values of the candidate defect are sequentially traversed downwards from the root node. For any node, the attribute value corresponding to that node is compared with a preset threshold for that node; based on the comparison result, a specific sub-branch is entered; this process is repeated until a leaf node is reached, and a definitive judgment result is output. In some cases, the attribute decision tree can directly classify candidate defects that clearly conform to the characteristics of real defects into the set of real defects. For candidate defects that the decision tree cannot clearly distinguish, their attribute value vectors are input into a machine learning model. The machine learning model can be a pre-trained model used for secondary classification of candidate ghost images output by the attribute decision tree, capable of outputting ghost image confidence based on the image features of the input candidate ghost images. The aforementioned machine learning model can be, for example, a support vector machine model, a random forest, a k-nearest neighbor model, or a neural network model.
[0137] The defect detection module 12 can first use an attribute decision tree to perform a coarse screening to identify some real defects. The remaining candidate defects after coarse screening are then subjected to a second judgment using a machine learning model to further identify some real defects and multiple candidate ghost images from the candidate ghost image set. These multiple candidate ghost images can constitute a candidate ghost image set.
[0138] In some implementations, step S203 includes: inputting the attribute values of multiple attributes of each candidate defect into an attribute decision tree; if the attribute decision tree determines that the candidate defect meets a first preset condition, classifying the candidate defect into a set of real defects; wherein, the attribute decision tree uses the attribute values of multiple attributes of the candidate defect and their respective preset thresholds to determine whether the candidate defect meets the first preset condition; if the attribute decision tree determines that the candidate defect does not meet the first preset condition, determining the image features of the candidate defect and inputting the image features into a machine learning model; and classifying the candidate defect into a set of real defects or a set of candidate ghost images based on the output of the machine learning model.
[0139] The aforementioned first presupposition condition can refer to one or more conditions used by the attribute decision tree to determine whether a candidate defect can be directly classified into the set of real defects. This condition can, for example, be related to the thresholds of multiple nodes in the attribute decision tree. When the attribute value sequence of a candidate defect eventually reaches a leaf node marked as a real defect along the branches of the decision tree, it is considered to satisfy the first presupposition condition. Conversely, if it reaches a leaf node marked as requiring further judgment, the first presupposition condition is not satisfied.
[0140] For each candidate defect, the defect detection module 12 can input the candidate defect into the attribute decision tree. Each non-leaf node of the attribute decision tree corresponds to an attribute and its judgment threshold, and each leaf node corresponds to an output category.
[0141] Figure 4 This is a schematic diagram illustrating the process of determining candidate defects based on an attribute decision tree. For example... Figure 4 As shown, the defect detection module can determine whether a candidate defect is a real defect by starting from the root node of the attribute decision tree and proceeding layer by layer based on the attributes of the candidate defects. The attribute corresponding to the first layer can be, for example, a defect detection score, and the first layer corresponds to a first preset threshold. The defect detection module 12 can determine whether a candidate defect is a real defect based on the relationship between the defect detection score and the first preset threshold. The first preset threshold can be, for example, 0.5. When the defect detection score is less than 0.5, the candidate defect can be considered a real defect, corresponding to node 1. If the detection confidence is greater than or equal to 0.5, it can proceed to the second layer of the attribute decision tree.
[0142] The second layer of the attribute decision tree can correspond to saturated defect features, and node 2 of the second layer can correspond to a second preset threshold. The defect detection module 12 can determine whether a candidate defect is a real defect based on the saturated defect features and the second preset threshold. A saturated defect represents a defect whose maximum gray value has reached or exceeded the upper limit of gray value corresponding to the full-well capacity of the sensor. If the value of the saturated defect feature is greater than or equal to the second preset threshold, the candidate defect may be a saturated defect and can proceed to node 4 of the third layer. The second preset threshold can be, for example, 0.5. At node 4, the maximum gray value of the candidate defect is further used to determine whether the candidate defect is a saturated defect and proceed to the next layer. Specifically, if the maximum gray value of the candidate defect is greater than the third preset threshold, the candidate defect is a saturated defect (i.e., a real defect), as shown in node 22; otherwise, the defect is a candidate ghost image (i.e., a potential ghost image), as shown in node 21. The third preset threshold can be, for example, 700.
[0143] If the value of the saturated defect feature is less than the second preset threshold, other defect classifications can be further determined, and the process proceeds to node 3 in the third layer. In node 3, candidate defects can be further analyzed based on the feature value of the defect sub-category number and the fourth preset threshold. The fourth preset threshold can be, for example, 5. When the feature value of the defect sub-category number is less than the fourth preset threshold, energy concentration (EncEnergy, EE) can be used to further process the candidate defects, proceeding to the fourth layer.
[0144] In node 5 of the fourth layer, the relationship between the EE value and a fifth preset threshold can be used to determine whether a candidate defect is a real defect. The fifth preset threshold can be, for example, 0.3. If the EE value is less than the fifth preset threshold, the candidate defect can be a candidate ghost image (potential ghost image), as shown in node 7. If the EE value is greater than or equal to the fifth preset threshold, the candidate defect can be a real defect, as shown in node 8.
[0145] In node 3, if the feature of the defect subcategorization number is greater than or equal to the fourth preset threshold, the EE value and the maximum gray value of the defect can be combined to further analyze and enter node 6 of the fourth layer. In node 6, based on the sixth preset threshold corresponding to the EE value and the seventh preset threshold corresponding to the maximum gray value of the defect, the candidate defect is assigned to one of the four nodes (node 9, node 10, node 11, node 12). For example, if the EE value is greater than the sixth preset threshold and the maximum gray value of the defect is greater than the seventh threshold, the candidate defect is considered a real defect set and can enter node 12. Alternatively, if the EE value is greater than or equal to the sixth preset threshold and the maximum gray value of the defect is less than the seventh preset threshold, the candidate defect is considered a real defect and can enter node 11.
[0146] For example, if the EE value is less than the sixth preset threshold and the defect gray value is greater than or equal to the seventh preset threshold, the candidate defect is regarded as a candidate ghost image and enters node 10.
[0147] For example, if the circumferential energy (EE) value is less than the sixth preset threshold and the maximum grayscale value of the defect is less than the seventh preset threshold, the process proceeds to the fifth layer. Layers five through eight can use the two strong geometric properties of the candidate defect aspect ratio and defect area to identify suspected ghost images with low focusing energy (low EE value) and low grayscale, in order to identify fine scratches and tiny real particles that may be misjudged as ghost images.
[0148] In node 9 of the fifth layer, the aspect ratio and area of the candidate defect can be combined to determine whether the candidate defect is a real defect. If the aspect ratio is greater than or equal to the eighth preset value and the area is less than the ninth preset threshold, the candidate defect is determined to be a candidate ghost image, as shown in node 14. That is, it is slender but has a small area, which may be a weak scratch or noise, and needs to be judged by the model.
[0149] If the aspect ratio is less than the eighth preset threshold and the area is greater than or equal to the ninth preset threshold, then the candidate defect is determined to be a candidate ghost image set, as shown in node 15. That is, the candidate defect is nearly circular but has a large area, which may be a large particle or a strong ghost image.
[0150] If the aspect ratio is less than the eighth preset threshold and the area is less than the tenth preset threshold, then the candidate defect is determined as the first candidate threshold, as shown in node 16. That is, it is nearly circular with a very small area, which may be a nanoparticle or a ghost image.
[0151] If the aspect ratio is greater than or equal to the eighth preset value and the area is greater than or equal to the ninth preset threshold, then proceed to node 13 in the sixth layer for further evaluation. In other words, if the shape is slender and the area is large, it may be a genuine scratch, requiring further confirmation using the EE value.
[0152] In node 13, if the EE value of a candidate defect is less than the eleventh preset threshold, the candidate defect is designated as a candidate ghost image, as shown in node 17. Otherwise, it proceeds to node 18 in the seventh layer for further processing. The eleventh preset threshold can be, for example, 0.3.
[0153] In node 17, a judgment can be made based on the aspect ratio of the candidate defect and the twelfth preset threshold. If the aspect ratio of the candidate defect is greater than or equal to the twelfth preset threshold, the candidate defect can be determined as a candidate ghost image. Otherwise, the candidate defect is a real defect.
[0154] After multiple layers of decision-making in the attribute decision tree, candidate defects can be identified as real defects or ghost images based on multiple attributes. If identified as a real defect, no further processing is performed.
[0155] For candidate defects identified as ghost images by the attribute decision tree, the defect detection module 12 can extract image features of each candidate defect using various image feature extraction algorithms. Image features refer to quantified parameters used to characterize the visual or geometric attributes of the region where the candidate defect is located. Image features include, but are not limited to, the orientation angle of the candidate defect, the energy ratio between different sub-regions, and texture statistics.
[0156] After obtaining the image features of the candidate defects, the defect detection module 12 can input the image features into the machine learning model and classify the candidate defects into the set of real defects or the set of candidate ghost images based on the output of the machine learning model.
[0157] The above scheme processes candidate defects in stages through a cascaded classification of attribute decision trees and machine learning models. The attribute decision tree first compares the attribute values of multiple attributes with preset thresholds, directly classifying candidate defects that meet the first preset condition into the real defect set, preventing them from entering the computationally intensive subsequent machine learning process. For candidate defects that do not meet the condition, image features are extracted and input into the machine learning model for secondary discrimination. Because of the pre-screening mechanism of the attribute decision tree, the amount of data that the machine learning model needs to process can be reduced to some extent, thereby lowering the overall computational cost. Simultaneously, because the machine learning model can perform refined classification of complex samples that decision trees struggle to distinguish (such as morphologically varied ghost images that are highly similar to real defects), it can compensate for the insufficient discrimination ability of single-rule models to some extent. This approach maintains processing efficiency while improving the accuracy of distinguishing difficult samples, thus achieving a balance between speed and accuracy in ghost image detection.
[0158] In some examples, the image features used to determine candidate defects include at least one of the following:
[0159] Calculate the angle between the long side of the minimum bounding rectangle of the candidate defect and one of the boundaries of the first image, and determine the angle as the image feature of the region where the candidate defect is located.
[0160] Calculate the first energy ratio between the energy of the central region and the energy of the edge region of the candidate defect, and determine the first energy ratio as the image feature of the region where the candidate defect is located.
[0161] Calculate the second energy ratio between the energy of the region above the candidate defect and the energy of the region below it, and determine the second energy ratio as the image feature of the region where the candidate defect is located.
[0162] The minimum bounding rectangle is the rectangle with the smallest area that completely encloses all pixels of a candidate defect. Two sides of this rectangle are parallel to the boundary of the first image, and the other two sides are perpendicular to the boundary of the first image. The defect detection module 12 finds the minimum bounding rectangle that encloses the candidate defect by rotating rectangles at different angles and calculating their areas. The direction of the longer side refers to the direction of extension of the longer side of the minimum bounding rectangle. This direction can be represented by the angle between this side and the horizontal or vertical boundary of the first image. The angle range is, for example, from 0 degrees to 180 degrees. The angle is the minimum angular difference between the direction of the longer side of the minimum bounding rectangle and the selected reference boundary. This angle ranges from 0 degrees to 90 degrees. For example, if the direction of the longer side is parallel to the horizontal boundary, the angle is 0 degrees; if the direction of the longer side is perpendicular to the horizontal boundary, the angle is 90 degrees; if the direction of the longer side is at 45 degrees to the horizontal boundary, the angle is 45 degrees. The central region refers to the internal region divided from the local image block where the candidate defect is located. The central region can be a rectangular or circular area with a certain width and height, centered on the centroid or geometric center of the candidate defect. For example, for a 32-pixel × 32-pixel local image block, the central region can be defined as a square area (i.e., 12 × 12 pixels) from pixel 11 to pixel 22. The edge region refers to the surrounding area of the local image block containing the candidate defect, located outside the central region. The edge region can be further divided into upper edge, lower edge, left edge, right edge, or annular region. For example, in a 32 × 32-pixel block, the edge region can include all pixels in rows 1 to 10 and rows 23 to 32, as well as pixels in columns 1 to 10 and columns 23 to 32 that are not covered by the central region.
[0163] Energy refers to the sum, average, or other aggregated statistics of the gray values of all pixels in an image region. For example, for a region containing N pixels, if the gray value of each pixel is g_i, then the energy of the region can be defined as Σg_i (sum) or (Σg_i) / N (average gray value). In this specific embodiment, energy is usually expressed as the sum of gray values.
[0164] The first energy ratio refers to the ratio between the energy of the central region and the energy of the peripheral regions. This ratio can be calculated by dividing the energy value of the central region by the energy value of the peripheral region, or by subtracting the two and then normalizing. For example, if the energy of the central region is 1200 and the energy of the peripheral region is 800, then the first energy ratio can be 1200 / 800 = 1.5.
[0165] The upper region refers to the portion of the local image block containing the candidate defect that lies above the centroid or geometric center of the candidate defect. This region can be obtained by dividing the block along a horizontal midline; the upper half is the upper region.
[0166] The lower region refers to the portion of the local image block containing the candidate defect that lies below the centroid or geometric center of the candidate defect. This region can be obtained by dividing the block along a horizontal midline; the lower half is the lower region.
[0167] The second energy ratio refers to the ratio of the energy in the upper region to the energy in the lower region. This ratio is calculated similarly to the first energy ratio, for example, by dividing the total energy in the upper region by the total energy in the lower region.
[0168] The defect detection module 12 first extracts the position coordinates of all pixels covered by the candidate defect. Based on these coordinates, the defect detection module calculates the minimum bounding rectangle that can completely enclose these pixels. The calculation method can be as follows: with a step size of 1 degree, rotate a pair of orthogonal direction axes within the range of 0 degrees to 180 degrees. For each rotation angle, calculate the projection range of all pixels of the candidate defect on the pair of axes, and record the area of the rectangle determined by the projection range; select the rotation angle that minimizes the area of the rectangle, and the rectangle corresponding to this angle is the minimum bounding rectangle.
[0169] After obtaining the minimum bounding rectangle, the defect detection module 12 can identify the longer side of the rectangle (i.e., the side with the larger length). The defect detection module 12 can select the horizontal boundary of the first image (e.g., the top edge of the image) as a reference line. Then, the defect detection module 12 can calculate the angle between the direction of the longer side and the horizontal boundary. This angle is an acute angle or a right angle between 0 degrees and 90 degrees. For example, if the direction of the longer side is parallel to the horizontal boundary, the angle is 0 degrees; if the direction of the longer side is perpendicular to the horizontal boundary, the angle is 90 degrees; if the direction of the longer side is at a 30-degree angle to the horizontal boundary, the angle is 30 degrees.
[0170] The defect detection module 12 can store the calculated included angle value as an image feature of the candidate defect in the form of a floating-point number or an integer, and assign an identifier (e.g., angle feature) to the feature. This feature will be input into the machine learning model along with other image features in subsequent steps.
[0171] The defect detection module 12 can extract a local image block centered on the candidate defect from the first image. The size of the local image block can be adaptively determined according to the size of the candidate defect, or a fixed window size (e.g., 64 pixels × 64 pixels or 32 pixels × 32 pixels) can be used.
[0172] The defect detection module 12 defines a central region and edge regions within the local image block. In some cases, the central region can be a square region centered on the block's center, with both its width and height being half the block's size. For example, for a 32-pixel × 32-pixel block, the central region could be a square region from the 9th to the 24th pixel (i.e., 16 pixels × 16 pixels). The edge region consists of all pixels within the block except for the central region.
[0173] The defect detection module 12 calculates the sum of the gray values of all pixels within the central region to obtain the central energy. The defect detection module 12 also calculates the sum of the gray values of all pixels within the edge regions to obtain the edge energy. Then, the defect detection module 12 divides the central energy by the edge energy to obtain a first energy ratio. In some cases, if the edge energy is zero or close to zero, the defect detection module can set a default value (e.g., 1.0) or skip the calculation of that feature.
[0174] The defect detection module 12 can store the calculated first energy ratio as an image feature of the candidate defect and assign an identifier to the feature (e.g., center-edge energy ratio).
[0175] The defect detection module 12 can calculate a second energy ratio between the energy of the upper region and the energy of the lower region of a candidate defect, and determine this second energy ratio as an image feature of the region where the candidate defect is located. Specifically, the defect detection module can use the same local image block as in step two (or re-crop a block of the same size). The defect detection module defines the upper and lower regions within this block. In some cases, the upper region can be all pixels above the horizontal midline of the block, and the lower region can be all pixels below the horizontal midline. The position of the horizontal midline can be adjusted according to the centroid of the candidate defect, or it can be fixed as the vertical center line of the block. For example, for a 32-pixel × 32-pixel block, rows 1 to 16 can be used as the upper region, and rows 17 to 32 can be used as the lower region.
[0176] The defect detection module 12 calculates the sum of the grayscale values of all pixels in the upper region to obtain the upper energy. The defect detection module also calculates the sum of the grayscale values of all pixels in the lower region to obtain the lower energy. Then, the defect detection module divides the upper energy by the lower energy to obtain a second energy ratio. In some cases, if the lower energy is zero or close to zero, the defect detection module can set a default value (e.g., 1.0) or swap the numerator and denominator.
[0177] The defect detection module 12 stores the calculated second energy ratio as an image feature of the candidate defect and assigns an identifier (e.g., upper and lower energy ratio) to the feature.
[0178] In some examples, the defect detection module 12 can combine the three image features—the included angle, the first energy ratio, and the second energy ratio—with other image features (such as texture statistics, gradient histograms, etc.) into a single feature vector. This feature vector is then input into a machine learning model to classify candidate defects as real defects or candidate ghost images.
[0179] The above scheme characterizes the geometric shape and energy distribution of defects from different dimensions by calculating three image features: the included angle, the first energy ratio, and the second energy ratio. The included angle reflects the orientation information of the defect. In dark-field imaging, real defects and ghost images often exhibit different directional patterns, and this feature can be used to distinguish between the two to some extent. The first energy ratio (the ratio of energy in the central region to the energy in the edge region) characterizes the spatial concentration of energy in the defect. Real defects usually have energy concentrated in the center, while ghost images are more diffuse. This feature helps to capture this difference. The second energy ratio (the ratio of energy in the upper region to the lower region) describes the energy asymmetry of the defect in the vertical direction, providing a basis for discrimination based on the unique vertical distribution patterns of ghost images under certain optical systems. The three features complementarily describe the imaging performance of defects from the perspectives of orientation, aggregation, and vertical asymmetry, respectively. This allows the machine learning model to obtain richer discrimination information, thereby improving the recognition accuracy of ghost images with varied shapes that are similar to real defects to some extent, while reducing the risk of misclassifying real defects as ghost images.
[0180] In some implementations, determining the candidate defects as either the first set of true defects or the first set of candidate ghost images based on the output of the machine learning model includes:
[0181] If the first confidence level output by the machine learning model is greater than or equal to the preset judgment threshold, then the candidate defect is classified into the candidate ghost image set.
[0182] If the first confidence level is less than the preset judgment threshold, the candidate defect is classified into the set of real defects; where the first confidence level represents the probability that the candidate defect belongs to the ghost image.
[0183] After inputting the image features of candidate defects into the machine learning model, the machine learning model can output a first confidence score that the candidate defect belongs to the candidate ghost image set. The defect detection module 12 can make a secondary judgment on the candidate defect based on the first confidence score output by the machine learning model and a preset judgment threshold. If the first confidence score is greater than or equal to the preset judgment threshold, the candidate defect is judged to belong to the candidate ghost image set; if the first confidence score is less than the preset judgment threshold, the candidate defect is judged to belong to the real defect set and is identified as a real defect and retained.
[0184] By using the confidence level of the ghost images output by the machine learning model and the preset judgment threshold, the confidence level of the ghost images can be transformed into a definite binary classification result, thereby clearly distinguishing the ghost images to be filtered out from the real defects that should be retained, and completing the judgment closed loop from suspected samples to the final conclusion.
[0185] In some application scenarios, the defect detection module 12 can determine a preset judgment threshold based on the baseline judgment threshold and the sensitivity of the ghost detection threshold; wherein, the sensitivity of the ghost detection threshold is determined by user input or based on the material type of the detected object.
[0186] The defect detection module 12 can determine a preset judgment threshold based on a preset baseline judgment threshold and a ghost image detection threshold sensitivity. The ghost image detection threshold sensitivity is an adjustable coefficient used to adjust the strictness of ghost image filtering. The preset judgment threshold and the ghost image detection threshold sensitivity are positively correlated; for example, the product of the preset baseline judgment threshold and the ghost image detection threshold sensitivity can be used as the preset judgment threshold. In some examples, users can set different ghost image detection threshold sensitivities according to the ratio of ghost images to real defects in different demand scenarios. The preset baseline judgment threshold is pre-stored in the defect detection module 12 as a benchmark for comparing the confidence level output by the machine learning model. Users can input the ghost image detection threshold sensitivity through the display interface of the control and display module. The control and display module can input the ghost image detection threshold sensitivity into the defect detection module.
[0187] In some examples, the defect detection module can identify the material type of the object to be detected and determine the ghost detection threshold sensitivity based on the material type.
[0188] The defect detection module can obtain the wafer substrate material type selected by the user through the host computer user interface; the material type includes at least one of the following: single crystal silicon, polycrystalline silicon, silicon nitride, silicon oxide, aluminum, copper, photoresist, or other semiconductor process thin film materials; the material type is matched with the preset material-sensitivity mapping table to determine the ghost image detection threshold sensitivity corresponding to the material type.
[0189] In addition, the defect detection module can acquire the surface image of the object to be detected, extract the global grayscale statistical features, texture features or color features of the surface image; input the features into a pre-trained material classification model, or perform similarity matching with feature templates of multiple pre-stored material types to identify the material type of the object to be detected.
[0190] By dynamically setting the sensitivity of the ghost image detection threshold, the preset judgment threshold can be dynamically configured. On the one hand, users can adjust the ghost image filtering severity online according to different product batches and different defect hazard levels, enhancing the process adaptability of the detection strategy. On the other hand, the sensitivity parameters can be automatically matched according to the wafer substrate material, reducing the frequency of manual intervention and improving the automation level of the detection process.
[0191] S204: Determine a reference defect set whose size is greater than a preset threshold from the actual defect set.
[0192] After steps S201-S203, multiple real defects are identified. The defect detection module 12 can then determine multiple reference defects whose areas are greater than a threshold based on the area of these real defects. In some examples, these reference defects may be larger defects selected from the set of real defects. These larger defects are the main source of ghosting (e.g., large dust particles or scratches). These reference defects belong to the set of real defects. In other words, the reference defects are the larger defects among the multiple real defects.
[0193] S205: For each candidate ghost image in the candidate ghost image set, determine whether the candidate ghost image is a real ghost image based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the reference defect set.
[0194] In some examples, whether a candidate ghost image is a real ghost image is determined based on its spatial relationship with one of the reference defects in the set of reference defects, including:
[0195] Determine the location information of one of the reference defects in the reference defect set;
[0196] Based on the location information of the reference defect, the corresponding ghost image generation area is determined;
[0197] Determine whether the candidate ghost image is located within the ghost image generation area;
[0198] If a candidate ghost image is located within the ghost image generation area, the candidate ghost image is determined to be a real ghost image;
[0199] If the candidate ghost image is not located within the ghost image generation area, the candidate ghost image is determined to be a real defect.
[0200] Ghost image generation area refers to one or more spatial ranges defined around a reference defect, based on its location and according to pre-stored region generation rules. Candidate ghost images appearing within this range have a high probability of being genuine ghost images generated by the reference defect. The ghost image generation area can take various geometric shapes, such as a circular area (a circle centered on the reference defect with radius R), an annular area (an annulus with inner radius R1 and outer radius R2), a fan-shaped area (an arc-shaped area within a specific angular range), a rectangular area (a fixed offset range relative to the reference defect), or a combination of these shapes. For example, pre-calibration results might show that, under the current detection channel, ghost images will appear in a fan-shaped area 25 to 35 pixels to the lower right of the reference defect, with an orientation angle of 40 to 50 degrees. Genuine ghost images are candidate ghost images that are ultimately determined to be optical artifacts rather than real physical defects. These defects should be filtered out from the detection results. Genuine defects are candidate defects that are ultimately determined to be physical anomalies (such as particles, scratches, voids, etc.) that actually exist on the surface of the object being inspected. If a candidate ghost image is not located within the ghost image generation area of any reference defect, it is reclassified as a real defect, retained, and reported.
[0201] For each reference defect in the reference defect set, the defect detection module 12 reads the position coordinates of that reference defect. In some cases, the defect detection module can calculate the centroid coordinates of the reference defect as its position information. Illustratively, the defect detection module 12 can iterate through all pixels covered by the reference defect, accumulate the x and y coordinates of each pixel, and divide them by the total number of pixels to obtain the centroid coordinates (xc, yc). In other cases, the defect detection module 12 can directly use the geometric center coordinates of the reference defect (i.e., the center point of the smallest bounding rectangle) or other representative point coordinates specified by the user. The defect detection module 12 can associate this position information with the corresponding reference defect identifier and store it in memory for later use.
[0202] The aforementioned region generation rules can be pre-generated based on optical imaging principles or pre-defined empirical rules. In some examples, the ghost image generation region can be determined based on optical imaging principles. In an ideal optical system, light rays will only propagate along the designed path once and form an image. However, when light rays pass through each optical surface (such as the front and back surfaces of a lens, detector protective glass, etc.), in addition to most of the transmission, a small portion of the light rays will always be reflected. These reflected rays will continue to propagate within the optical system and may be reflected again by other surfaces. Ultimately, these rays that accidentally reach the detector after secondary or multiple reflections will form an additional, false image, i.e., a ghost image. All possible problematic optical paths can be identified first. In a system with p (where p is an integer greater than or equal to 2) optical surfaces, any combination of two surfaces may form a secondary reflection ghost image. For example, a 6-lens system may have 66 ghost image paths. These ghost image paths can be enumerated. For each identified candidate reflection path, the defect detection module uses paraxial optics formulas (such as the Gaussian imaging formula, a linear approximation of the paraxial refraction and reflection laws) to calculate the imaging position of the ghost image under that path. For example, the image plane coordinates of the ghost image (offsets Δx and Δy relative to the main image), the equivalent focal length of the ghost image, and the diameter of the blur spot on the image plane. These calculations allow us to obtain the approximate spatial location and dispersion range of the ghost image relative to the main defect. The defect detection module can estimate the ratio of the ghost image energy generated by each candidate reflection path to the main image energy based on the optical surface reflectivity and transmittance, combined with the light energy attenuation in the light propagation path. If this ratio is lower than a preset energy threshold (e.g., lower than 0.5%), the ghost image is determined to be invisible in actual detection and is ignored. Then, the defect detection module converts the ghost image location information retained after energy threshold filtering into a region generation rule based on the center of the reference defect. For example, if the ghost image path calculation shows that the ghost image appears to the lower right of the reference defect, offset horizontally by 25 pixels and vertically by 30 pixels, the area determined based on the location of the reference defect, this offset, and the allowable deviation range (e.g., ±5 pixels) can be used as a ghost image generation region. The aforementioned offset and allowable deviation range constitute the region generation rule. Rules can be generated for storing the above-mentioned areas.
[0203] In some examples, the ghost image generation area can be determined based on pre-defined empirical rules. Although ghost image generation involves complex optical reflection, refraction, and diffraction processes, for a pre-assembled, fixed optical inspection device, the relative positions, curvature, reflectivity, and other parameters of its optical elements remain constant. Therefore, the spatial relationship between the ghost image and the large particle defect that generates it is repeatable on this device. That is, as long as the device hardware and inspection conditions do not change, the ghost image will always appear in the same relative position around the main defect (e.g., always appearing in a ring-shaped area of 20-30 pixels to the lower right).
[0204] Based on this principle, pre-defined empirical rules can be used to determine the ghost image generation area. Specifically, one or more calibration samples with standard defects of known location and size (e.g., particles of a specific diameter fabricated at specific coordinates) can be selected. The calibration sample is loaded onto the defect detection equipment to be calibrated, and scanning and imaging are performed according to the actual detection process, acquiring images containing the main defect image and its corresponding ghost images. On the acquired images, the main defect position is located based on the known defect coordinate information, and ghost images appearing around it are searched manually or semi-automatically, recording the offset of each ghost image relative to the main defect (including horizontal offset, vertical offset, distance, and orientation angle). The offset data of ghost images generated by main defects of different locations and sizes are statistically analyzed to summarize the stable positional rules of ghost images appearing around the main defect (e.g., ghost images always appear within a range of 25 to 35 pixels to the lower right of the main defect, and this offset does not change significantly with the defect size). The statistically obtained ghost image distribution rules are transformed into quantifiable region generation rules (e.g., fixed offset, biased range, or distance and angle thresholds). For scenarios with multiple detection channels or different machines, separate independent region generation rules are established for each. During actual detection, the defect detection module automatically calls the corresponding region generation rule based on the currently used channel and machine identifier, and delineates the ghost image generation area based on the location of the reference defect for subsequent candidate ghost image determination.
[0205] For each reference defect, the defect detection module 12 can determine the ghost image generation region corresponding to that reference defect. The defect detection module 12 can read the location information of the reference defect (e.g., barycenter coordinates (xr, yr)) and, combined with region generation rules determined based on optical imaging principles or pre-calibrated empirical rules, calculate one or more geometric regions. For example, if the region generation rules stipulate that the ghost image appears in a rectangular region below and to the right of the reference defect, with a horizontal offset of +25 pixels to +35 pixels and a vertical offset of +20 pixels to +30 pixels, then the defect detection module will use (xr, yr) as the region to generate the ghost image. r ,y r Using (x, y) as the reference, generate a top-left corner coordinate of (x, y). r+25,y r +20), the lower right corner coordinate is (x r +35,y r A rectangular area of +30 is designated as the ghost image generation area.
[0206] This scheme employs a secondary determination based on spatial location relationships to ultimately verify the candidate ghost images marked in the first stage. Specifically, using the location information of the reference defect as a benchmark, the corresponding ghost image generation area is delineated, and it is determined whether the candidate ghost image falls within this area. Since ghost images in optical imaging often accompany large particle defects and are located in specific orientations around them, this physical law provides a basis for area determination. Therefore, a candidate ghost image is only confirmed as a real ghost image when it is truly located within the predetermined ghost image area of the reference defect; otherwise, it is corrected to a real defect. This approach effectively filters out ghost images that are difficult to distinguish based solely on attribute characteristics while preserving real defects, thereby reducing the risk of misclassifying real defects as ghost images to some extent. Furthermore, because the determination rule is based on spatial location rather than a single attribute threshold, this method has a certain degree of adaptability to different optical systems and equipment differences, contributing to improved overall accuracy and robustness of ghost image detection.
[0207] In some implementations, the corresponding ghost image generation area is determined based on the location information of the reference defect, including:
[0208] Determine the inscribed circle of the reference defect;
[0209] Determine the coordinates of the center of the reference defect based on the inscribed circle of the reference defect;
[0210] Based on the center coordinates of the reference defect, the corresponding ghost image generation area is determined.
[0211] The inscribed circle is the largest circle that lies entirely within the pixel area covered by the reference defect and has at least one point of contact with the boundary of the reference defect. This inscribed circle can be used to approximate the size and center position of the reference defect. For example, for an approximately circular defect, its inscribed circle can be the largest inscribed circle found through iterative search; for an irregularly shaped defect, the inscribed circle can be the circle determined by the pixel furthest from the boundary, found through a distance transformation algorithm. The aforementioned center coordinates refer to the spatial center position of the reference defect. Center coordinates can be obtained in various ways, such as the centroid coordinates, geometric center coordinates of the reference defect, or the center coordinates determined by the inscribed circle.
[0212] After obtaining the reference defect set, the defect detection module performs an inscribed circle determination operation for the currently processed reference defect. First, the defect detection module obtains the coordinate set of all pixels covered by the reference defect. Then, the defect detection module performs a distance transformation on the reference defect region: for each pixel within the region, it calculates the shortest Euclidean distance from that pixel to the boundary of the reference defect. The defect detection module 12 can traverse all internal pixels, find the pixel with the maximum distance value, determine the maximum distance value as the radius of the inscribed circle, and determine the coordinates of that pixel as the center of the inscribed circle. In some cases, if multiple pixels have the same maximum distance value, the defect detection module can take the average of the coordinates of these pixels as the center of the circle.
[0213] The defect detection module directly uses the center coordinates of the obtained inscribed circle as the center coordinates of the reference defect. The module stores these center coordinates as (x0, y0) and determines the ghost image generation area based on them. There are several ways to determine the ghost image generation area, such as any one or more combinations of the following: First, using the center coordinates (x0, y0) as the center and a preset radius R (e.g., 30 pixels) as the radius, determine a circular area as the ghost image generation area. Second, using the center coordinates (x0, y0) as the reference point, determine a rectangular area with the upper left corner coordinates (x0-W / 2, y0-H / 2) and the lower right corner coordinates (x0+W / 2, y0+H / 2), where W and H are preset width and height (e.g., W=40 pixels, H=40 pixels). Third, using the center coordinates (x0, y0) as the reference point, determine an annular area with an inner radius of R1 and an outer radius of R2 (e.g., R1=15 pixels, R2=35 pixels). Fourth, using the center coordinates (x0, y0) 0) Based on the baseline, a region in a specific direction is determined according to a pre-calibrated offset, such as a rectangular region with a horizontal offset of Δx∈[20,30] pixels and a vertical offset of Δy∈[10,20] pixels.
[0214] The defect detection module can select one of the following methods based on pre-configured rules (such as parameters set by the user through the host computer interface or parameters obtained by system calibration) to calculate a specific geometric region description (such as center coordinates and radius, rectangular boundary coordinates, etc.), and determine the geometric region as the ghost image generation region corresponding to the reference defect.
[0215] After determining the ghost image generation area, the defect detection module can determine whether the position coordinates of the candidate ghost image fall within the ghost image generation area. If they do, the candidate ghost image is determined to be a real ghost image; if they do not, the module continues to check the ghost image generation areas of other reference defects, or ultimately determines them to be real defects.
[0216] The above scheme first determines the inscribed circle of the reference defect, then uses its center as the central coordinate, and finally delineates the ghost image generation area based on this central coordinate. Since the inscribed circle reflects the internal geometric core area of the reference defect, even if the defect shape is irregular (e.g., star-shaped, elongated, or with pits), the center of the inscribed circle can reliably represent the main position of the defect, thus avoiding center positioning deviations caused by uneven or unusual defect boundaries. The ghost image generation area determined based on more accurate central coordinates has a higher degree of matching between its location and the spatial range of ghost image occurrence in the actual optical system, making it easier for real ghost images to fall into the predetermined area while reducing the false appearance of non-ghost images. Therefore, this scheme can improve the stability of ghost image region positioning under conditions of complex reference defect morphology or fluctuating image quality, thereby improving the accuracy of subsequent candidate ghost image judgment and reducing the risk of misclassifying real defects as ghost images.
[0217] In some embodiments, determining the corresponding ghost image generation region based on the center coordinates of the reference defect includes:
[0218] Determine the coordinates of the point symmetrical to the center coordinates of the reference defect about the central axis of the image;
[0219] A preset geometric range is established as the ghost image generation area, centered on the coordinates of the symmetry point; the preset geometric range includes a circular or rectangular area centered on the symmetry point.
[0220] After obtaining the center coordinates of the reference defect (e.g., determined by the center of the inscribed circle), the defect detection module can determine the ghost image generation area using a mirror symmetry-based approach.
[0221] The defect detection module first determines the central axis of the first image. In some cases, the central axis can be a vertical central axis, with its x-coordinate being half the image width. The defect detection module reads the center coordinates (X0, Y0) of a reference defect and then calculates the coordinates of the point symmetrical to these center coordinates about the image central axis.
[0222] After obtaining the coordinates of the symmetry point, the defect detection module establishes a preset geometric area centered on these coordinates as the ghost image generation region. This preset geometric area can be a circular region centered on the symmetry point with a radius of a preset value R (e.g., 30 pixels). Alternatively, it can be a rectangular region centered on the symmetry point with a width of W (e.g., 50 pixels) and a height of H (e.g., 40 pixels). The defect detection module determines the established circular or rectangular region as the ghost image generation region corresponding to the reference defect.
[0223] By calculating the symmetrical point of the reference defect center coordinates about the image's central axis, a circular or rectangular pre-defined geometric area is established centered on this symmetrical point as the ghost image generation region. In some optical systems (e.g., detection equipment with symmetrical optical paths or reflective mirrors), ghost images often appear symmetrical to the real defect about the image's central axis (such as the optical axis or detector's central axis). This is determined by the specular reflection or symmetrical imaging characteristics of optical elements. Therefore, the ghost image generation region determined based on the symmetrical point coordinates can better match this type of optical phenomenon, making ghost images induced by symmetrical structures more likely to fall within the predetermined detection range, thereby improving the detection rate of such ghost images to a certain extent. Furthermore, using a circular or rectangular region centered on the symmetrical point as the ghost image generation region eliminates the need for complex geometric modeling, makes parameter adjustments intuitive, and facilitates engineering implementation and cross-machine deployment. This scheme, without increasing the computational burden, utilizes the inherent symmetry characteristics of the optical system to guide region localization, helping to improve the targeting and accuracy of ghost image detection.
[0224] In some embodiments, determining the corresponding ghost image generation region based on the center coordinates of the reference defect includes:
[0225] Using the center coordinates of the reference defect as a reference point, the area where the Euclidean distance to the reference point is less than a preset radius threshold is determined as the ghost image generation area.
[0226] The defect detection module 12 can determine the ghost image generation area in a simpler way. After obtaining the center coordinates of the reference defect (e.g., determined by the center of the inscribed circle or the centroid), the defect detection module uses these center coordinates as a reference point. The defect detection module reads a pre-stored preset radius threshold Rth (e.g., 40 pixels).
[0227] The defect detection module 12 can determine a region consisting of all points whose Euclidean distance to the reference point is less than a preset radius threshold Rth. Geometrically, this region is a circular area (including all points inside the circle) with the reference point (i.e., the center coordinates of the reference defect) as the center and Rth as the radius. The defect detection module identifies this circular area as the ghost image generation region.
[0228] In some cases, the defect detection module can also use regions where the Euclidean distance is less than or equal to a preset radius threshold as ghost image generation regions.
[0229] In the above solution, with the center coordinate of the reference defect as the reference point, a circular area whose Euclidean distance is less than a preset radius threshold is directly determined as the ghost image generation area. When a circular area is used as the ghost image generation area, only two parameters, the center coordinate and the radius, need to be determined, resulting in small calculation amount and fast processing speed. Meanwhile, this solution does not rely on direction information and is suitable for optical scenes where ghost images are isotropically distributed around the reference defect (for example, uniform scattering ghost images caused by spherical lenses or symmetric optical systems). The circular area determination rule based on Euclidean distance is simple and intuitive, which facilitates parameter calibration and cross-stage migration. Therefore, this solution can reduce the calculation overhead in the ghost image region determination stage to a certain extent, improve the overall efficiency of the detection process, and maintain a good detection effect under the condition that the ghost image distribution has no obvious direction preference.
[0230] In some embodiments, determining the corresponding ghost image generation region based on the center coordinate of the reference defect comprises:
[0231] calculating a coordinate difference between a candidate position and the center coordinate of the reference defect, wherein the coordinate difference comprises a first axial coordinate difference and a second axial coordinate difference;
[0232] determining an area satisfying that the first axial coordinate difference is smaller than a first axial threshold and the second axial coordinate difference is smaller than a second axial threshold as the ghost image generation area, wherein the second axial threshold is larger than the first axial threshold.
[0233] the defect detection module 12 may also determine the ghost image generation area by means of coordinate difference comparison. After obtaining the center coordinate (X0, Y0) of the reference defect, the defect detection module reads a pre-stored first axial threshold δ1 and a pre-stored second axial threshold δ2, wherein δ2 is larger than δ1. For example, δ1 may be set to 10 pixels, and δ2 may be set to 30 pixels.
[0234] the defect detection module defines a ghost image generation area, which is composed of all candidate positions (Xc, Yc) satisfying the following conditions: the absolute coordinate difference ΔX=|Xc-X0| in the horizontal direction is less than δ1, and the absolute coordinate difference ΔY=|Yc-Y0| in the vertical direction is greater than δ2. Geometrically, this area is a band-shaped area or a rectangular area that is narrow in the horizontal direction (with a width of 2δ1), is located above or below the reference defect in the vertical direction and is far away (extending outward from the distance δ2). Specifically, the area may comprise two sub-areas: one sub-area is located directly below the reference defect (Yc>Y0+δ2), and the other sub-area is located directly above the reference defect (Yc<Y0-δ2), and the horizontal offset of both is limited within ±δ1.
[0235] The defect detection module defines the region satisfying ΔX < δ1 and ΔY > δ2 as the ghost image generation region. In some cases, the defect detection module may also use the criteria of greater than or equal to or less than or equal to, depending on the threshold definition method.
[0236] By comparing the horizontal and vertical offsets of candidate ghost images with the center of the reference defect, the region with smaller horizontal offset and larger vertical offset is identified as the ghost image generation region, where the threshold value in the vertical direction is greater than that in the horizontal direction. This asymmetric region delineation method is suitable for specific optical scenarios where ghost images only appear directly above or below the reference defect, with almost no horizontal offset (e.g., ghost images caused by vertical reflection or scattering at a specific angle). Because the allowable vertical offset is larger, ghost images distributed along the vertical direction can be effectively captured; simultaneously, the allowable horizontal offset is smaller, avoiding misclassification of real defects in the horizontal direction as ghost images. Compared to isotropic circular regions, this scheme more specifically matches the distribution patterns of ghost images with clear directions, thereby improving the detection accuracy of such ghost images to a certain extent. Furthermore, the threshold values in the two directions can be independently calibrated and adjusted, facilitating adaptation to differences in setup and adjustment of different equipment or detection channels, enhancing the flexibility and adaptability of the scheme.
[0237] For each reference defect, with its center point as the center, the ghost image generation region associated with each reference defect is determined based on historical or empirical data. This ghost image generation region can be, for example, a ring-shaped sector or a rectangular band in a specific direction of the reference defect.
[0238] In some examples, the first region related to the reference defect is determined based on the location of the reference defect set and the spatial distribution parameters of the ghost image relative to the defect that produced the ghost image.
[0239] Spatial distribution parameters refer to a set of characteristic quantities used to quantify the geometrical positional relationship and distribution range of a ghost image relative to the parent defect (i.e., a large particle defect) that generated the ghost image in image space. This set of parameters is a numerical expression of the physical laws governing ghost image imaging, establishing a deterministic mapping rule from the location of the parent defect to the spatial region where the ghost image may appear. Spatial distribution parameters can be engineering calibration values obtained through actual measurement and calibration, corresponding one-to-one with a specific inspection machine, a specific inspection channel, and a specific process layer.
[0240] The aforementioned spatial distribution parameters include one or more of the following: polar coordinate parameters, rectangular coordinate parameters, region expansion parameters, and probability distribution parameters.
[0241] The polar coordinate parameters include the distance and azimuth of the ghost image relative to the defect that produced it; the rectangular coordinate parameters include the lateral and longitudinal offsets of the ghost image relative to the defect that produced it; the region expansion parameters include the radius, angular range, or calibration rectangle size of the ghost image distribution area; and the probability distribution parameters describe the calibration covariance matrix or calibration kernel function of the spatial distribution probability density of the ghost image.
[0242] Using the reference position of the defect set as the origin, a geometrically matching continuous region can be generated in the image space based on the ghost image spatial distribution parameters, serving as the first region. For example, the centroid of the reference defect set can be used as the pole, the calibrated azimuth angle as the polar axis direction, the calibrated distance as the radial offset, and the calibrated radius or calibrated angle range as the extension boundary to generate a fan-shaped region, an annular region, or an annular sector; the generated geometric region is then mapped to the image coordinate system to obtain the first region composed of several pixel coordinates.
[0243] Through the above implementation process, adaptive and high-precision positioning of the ghost image generation area was achieved. Regions are generated in real time using a reference defect set as anchor points, ensuring a one-to-one correspondence between the region location and the parent defect, thus avoiding the erroneous filtering of real defects within the region by fixed template filtering.
[0244] In some embodiments, the method further includes: determining spatial distribution parameters by measuring the relative position between a third defect on a reference sample and the ghost image it produces.
[0245] At least one third defect with a known location, size, or scattering characteristics can be placed on the surface of the reference sample. This third defect is a large-particle defect capable of stably producing ghost images, with a size greater than or equal to the area threshold for ghost image generation. The substrate material type and film structure of the reference sample are the same as or similar to those of the object being tested to ensure consistency in ghost image imaging characteristics. Using the testing equipment to be calibrated and the current testing channel, a dark-field scanning image is performed on the reference sample to obtain a calibration image containing the third defect and its associated ghost image. The acquisition conditions of the calibration image (including light source wavelength, illumination angle, focus height, gain, etc.) are consistent with the imaging conditions during subsequent actual testing. Defect extraction is performed on the calibration image to locate the first position coordinate of the third defect in the image. Based on the imaging characteristics of the ghost image (such as diffusion morphology, fixed offset direction, etc.), the associated ghost image generated by the third defect is identified, and its second position coordinate in the image is located. The identification process can be manually assisted or the position can be averaged through multiple scans to improve measurement accuracy. Based on the first and second position coordinates, the spatial relative position parameters between the third defect and its generated ghost image are calculated. The spatial relative position parameter is directly determined as the spatial distribution parameter; or the difference between the spatial relative position parameter and the theoretical position relationship is determined as the spatial distribution parameter (i.e., the position deviation); the spatial distribution parameter is associated with and stored in the system configuration library along with information such as the current detection machine identifier, the current detection channel identifier, the current substrate material type, and the current imaging conditions.
[0246] Through the above process, the spatial distribution parameters of the ghost image generation area were measured and the machine was customized. Compared with directly using the theoretical values of optical design, this process fully considers the influence of non-ideal hardware factors such as objective lens adjustment eccentricity, lens spacing tolerance, illumination incident angle deviation, and sensor tilt on the actual position of the ghost image, so that the spatial distribution parameters are precisely aligned with the actual imaging state of the current detection machine and the current detection channel.
[0247] The location information of multiple candidate ghost image sets can be compared with the location information of the first region mentioned above. If the location information of a candidate ghost image set is located within the first region, then the candidate ghost image set is a ghost image. If the location of a candidate ghost image set does not fall within the first region of any reference defect set, then the candidate ghost image set is a real defect.
[0248] After the above steps S201~S205, the real defects and ghost images can be determined from the candidate ghost image set.
[0249] By first filtering multiple candidate defects identified in the image of the object to be detected using attribute decision trees and machine learning models to identify true defects, and then identifying whether the remaining multiple candidate ghost images are ghost images or true defects based on their relationship with the associated regions of large-area defects, a two-stage ghost image detection and filtering process is achieved. No manual intervention is required in the above ghost image detection process. Furthermore, the two-stage ghost image detection and filtering reduces the probability of misidentifying defects as ghost images, improves the accuracy of ghost image detection, and contributes to the overall accuracy of defect detection results.
[0250] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the distribution of the first region in the image of the object to be detected. The defect detection module 12 can first determine the true defect set from the multiple candidate defects identified from the first image by combining attribute decision trees and machine learning models. The true defect set can include multiple true defects. The defect detection module 12 can determine multiple reference defects 301 with an area greater than the area threshold from the multiple true defects. Multiple reference defects can form a reference defect set. The region corresponding to the reference defect can be determined according to the position of each reference defect and the spatial distribution parameters of the ghost image relative to the defect that generated the ghost image. The region can include, for example, regions 302, 303 and 304. Among them, region 301 corresponds to the first type of ghost image. The first type of ghost image appears as a continuous or discontinuous wavy bright ring around the edge of a large particle defect. It is close to the boundary of the large particle defect and has no significant radial offset; the brightness is unevenly distributed along the circumference, and is usually stronger in the direction orthogonal to the illumination direction; the first type of ghost image is generated by the diffraction effect of surface plasmon waves excited by strong scattering particles or high-angle scattered light at the edge of the objective lens aperture. Spatial distribution parameters can be, for example: distance range: 0~5 pixels (measured from the boundary of large particles); azimuth feature: omnidirectional distribution, but with azimuth intensity modulation; region shape: annular band.
[0251] Region 302 corresponds to type ② ghost image, which appears as a linear tail extending downwards (or along a specific fixed direction) from the center of the large particle defect. It is basically aligned with the center of the large particle defect and extends vertically; its brightness decreases from near to far, resembling a comet tail. The cause is charge blooming in the sensor under strong light or charge transfer leakage in the vertical shift register. Spatial distribution parameters can be, for example: distance range: 20~40 pixels (measured from the centroid of the large particle); orientation feature: fixed direction, vertically downwards (180°) in this embodiment; region shape: rectangular strip or fan shape.
[0252] Region 303 corresponds to type ③ ghost image, which appears as an isolated, diffuse light spot at a fixed offset position diagonally below the large particle defect. This type of ghost image has a clear distance and azimuth offset from the large particle defect; its shape is nearly circular with blurred edges and no sharp boundaries. It is caused by secondary parasitic images formed by multiple reflections of scattered light from the large particle between the two parallel optical surfaces of the lens group. Spatial distribution parameters can be, for example: distance range: 45~55 pixels (measured from the centroid of the large particle); azimuth feature: 45° (225°) to the lower right; region shape: circular or elliptical neighborhood.
[0253] For the remaining candidate defects (excluding the real defects) among multiple candidate defects, their positions are matched with regions 302, 303, and 304. Successfully matched remaining candidate defects are identified as ghost images, while unsuccessfully matched remaining candidate defects are identified as real defects.
[0254] Corresponding to Figure 2 In addition to the ghost image determination method shown, this application also provides a ghost image detection device. Figure 5 This is a schematic diagram of the ghost detection device provided in the embodiments of this application; as shown. Figure 5 As shown, the ghost detection device 50 includes:
[0255] The first determining unit 501 is used to determine multiple candidate defects in the first image; wherein, the first image is obtained by the image acquisition module based on the image acquisition of the object to be detected;
[0256] The second determining unit 502 is used to determine the attribute values of multiple attributes of each candidate defect.
[0257] The parsing unit 503 is used to classify the attribute values of multiple candidate defects based on the attribute decision tree and machine learning model, and classify the multiple candidate defects into a set of real defects and a set of candidate ghost images.
[0258] The third determining unit 504 is used to determine a set of reference defects with a size greater than a preset threshold from the set of real defects;
[0259] The fourth determining unit 505 is used to determine whether a candidate ghost image is a real ghost image for each candidate ghost image in the candidate ghost image set, based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the reference defect set.
[0260] In some embodiments, the parsing unit 503 is further configured to: input the attribute values of multiple attributes of each candidate defect into the attribute decision tree;
[0261] If the attribute decision tree determines that a candidate defect meets the first preset condition, the candidate defect is classified into the set of real defects; wherein, the attribute decision tree uses the attribute values of multiple attributes of the candidate defect and their respective preset thresholds to determine whether the candidate defect meets the first preset condition.
[0262] If the attribute decision tree determines that the candidate defect does not meet the first preset condition, the image features of the candidate defect are determined and the image features are input into the machine learning model;
[0263] Based on the output of the machine learning model, candidate defects are classified into either the set of real defects or the set of candidate ghost images.
[0264] In some embodiments, the parsing unit 503 is further configured to analyze the image features of the candidate defects based on at least one of the following:
[0265] Calculate the angle between the long side of the minimum bounding rectangle of the candidate defect and one of the boundaries of the first image, and determine the angle as the image feature of the region where the candidate defect is located.
[0266] Calculate the first energy ratio between the energy of the central region and the energy of the edge region of the candidate defect, and determine the first energy ratio as the image feature of the region where the candidate defect is located.
[0267] Calculate the second energy ratio between the energy of the region above the candidate defect and the energy of the region below it, and determine the second energy ratio as the image feature of the region where the candidate defect is located.
[0268] In some embodiments, the parsing unit 503 is further configured to:
[0269] If the machine learning model outputs a first confidence level greater than or equal to a preset judgment threshold, then the candidate defect is classified into a candidate ghost image set.
[0270] If the first confidence level is less than the preset judgment threshold, the candidate defect is classified into the set of real defects; where the first confidence level represents the probability that the candidate defect belongs to the ghost image.
[0271] In some embodiments, the preset judgment threshold is determined based on a baseline judgment threshold and a ghost detection threshold sensitivity; wherein, the ghost detection threshold sensitivity is determined by user input or based on the material type of the detected object.
[0272] In some embodiments, the fourth determining unit 505 is further configured to:
[0273] Determine the location information of one of the reference defects in the reference defect set;
[0274] Based on the location information of the reference defect, the corresponding ghost image generation area is determined;
[0275] Determine whether the candidate ghost image is located within the ghost image generation area;
[0276] If a candidate ghost image is located within the ghost image generation area, the candidate ghost image is determined to be a real ghost image;
[0277] If the candidate ghost image is not located within the ghost image generation area, the candidate ghost image is determined to be a real defect.
[0278] In some embodiments, the fourth determining unit 505 is further configured to:
[0279] Determine the inscribed circle of the reference defect;
[0280] Determine the coordinates of the center of the reference defect based on the inscribed circle of the reference defect;
[0281] Based on the center coordinates of the reference defect, the corresponding ghost image generation area is determined.
[0282] In some embodiments, the fourth determining unit 505 is further configured to:
[0283] Determine the coordinates of the point symmetrical to the center coordinates of the reference defect about the central axis of the image;
[0284] A preset geometric range is established as the ghost image generation area, centered on the coordinates of the symmetry point; the preset geometric range includes a circular or rectangular area centered on the symmetry point.
[0285] In some embodiments, the fourth determining unit 505 is further configured to:
[0286] Using the center coordinates of the reference defect as a reference point, the area where the Euclidean distance to the reference point is less than a preset radius threshold is determined as the ghost image generation area.
[0287] In some embodiments, the fourth determining unit 505 is further configured to:
[0288] Calculate the coordinate difference between the candidate location and the center coordinates of the reference defect; the coordinate difference includes the first axial coordinate difference and the second axial coordinate difference;
[0289] The regions that satisfy the condition that the first axial coordinate difference is less than the first axial threshold and the second axial coordinate difference is less than the second axial threshold are defined as ghost image generation regions; wherein, the second axial threshold is greater than the first axial threshold.
[0290] In some embodiments, the first determining unit 501 is further configured to:
[0291] Based on threshold segmentation, connected component analysis, and morphological analysis, multiple regions are identified from the first image, and each region corresponds to a candidate defect.
[0292] In some embodiments, the first determining unit 501 is further configured to perform adaptive threshold segmentation processing on the first image to generate a binarized image;
[0293] Connectivity labeling is performed on the binarized image to identify all independent connected regions;
[0294] Morphological filtering is applied to the marked independent connected regions to identify multiple regions.
[0295] In some embodiments, the first determining unit 501 is further configured to perform a morphological opening operation on the marked independent connected regions, and then remove regions with a number of pixels less than the minimum defect area threshold, thereby determining the processed connected regions as multiple regions.
[0296] This application also provides an electronic device, a processor, and a memory; the processor in the electronic device is coupled to the memory, the memory is used to store computer programs or instructions and / or data, and the processor is used to execute the computer programs or instructions stored in the memory, or to read the data stored in the memory, in order to perform the methods in the above method embodiments.
[0297] Optionally, there may be one or more processors.
[0298] Optionally, there may be one or more memories.
[0299] Alternatively, the memory can be integrated with the processor or set up separately.
[0300] In addition, this application also provides a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the methods in the various method embodiments of this application to be performed.
[0301] This application also provides a computer program product, which includes computer program code or instructions, such that when the computer program code or instructions are run on a computer, the methods in the various method embodiments of this application are executed.
[0302] Furthermore, this application also provides a chip including a processor. A memory for storing a computer program is provided independently of the chip, and the processor is used to execute the computer program stored in the memory, so that the methods in the various method embodiments of this application are performed.
[0303] Furthermore, the chip may also include a communication interface. The communication interface can be an input / output interface or an interface circuit, etc. Furthermore, the chip may also include memory.
[0304] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with the ability to process signals. In implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware encoding processor, or implemented by a combination of hardware and software modules in the encoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0305] The memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), and synchronous link dynamic memory (SLDRAM).
[0306] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory can be integrated into the processor.
[0307] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0308] The above-described preferred embodiments have further illustrated the purpose, technical solutions, and advantages of the present invention. It should be understood that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for determining ghost images, applied to a defect detection device, the defect detection device comprising an image acquisition module, characterized in that, include: Multiple candidate defects are identified in a first image; wherein, the first image is obtained by the image acquisition module from the image of the object to be detected; For each candidate defect, determine the attribute values of multiple attributes of the candidate defect; The attribute values of the multiple candidate defects are classified based on the attribute decision tree and machine learning model, and the multiple candidate defects are classified into a set of real defects and a set of candidate ghost images. From the set of real defects, determine a set of reference defects whose size is greater than a preset threshold; For each candidate ghost image in the candidate ghost image set, it is determined whether the candidate ghost image is a real ghost image based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the reference defect set.
2. The method according to claim 1, characterized in that, The classification of attribute values of the multiple candidate defects based on attribute decision trees and machine learning models, categorizing the multiple candidate defects into a set of real defects and a set of candidate ghost images, includes: The attribute values of multiple attributes of each candidate defect are input into the attribute decision tree; If the attribute decision tree determines that the candidate defect meets the first preset condition, the candidate defect is classified into the set of real defects; wherein, the attribute decision tree uses the attribute values of multiple attributes of the candidate defect and their respective preset thresholds to determine whether the candidate defect meets the first preset condition; If the attribute decision tree determines that the candidate defect does not meet the first preset condition, the image features of the candidate defect are determined and the image features are input into the machine learning model; Based on the output of the machine learning model, the candidate defects are classified into the set of real defects or the set of candidate ghost images.
3. The method according to claim 2, characterized in that, The image features for determining the candidate defects include at least one of the following: Calculate the angle between the long side of the minimum bounding rectangle of the candidate defect and one of the boundaries of the first image, and determine the angle as the image feature of the region where the candidate defect is located; Calculate the first energy ratio between the energy of the central region and the energy of the edge region of the candidate defect, and determine the first energy ratio as the image feature of the region where the candidate defect is located; Calculate a second energy ratio between the energy of the region above the candidate defect and the energy of the region below it, and determine the second energy ratio as the image feature of the region where the candidate defect is located.
4. The method according to claim 2 or 3, characterized in that, Based on the output of the machine learning model, the candidate defects are categorized into either the set of true defects or the set of candidate ghost images, including: If the machine learning model outputs a first confidence level greater than or equal to a preset judgment threshold, then the candidate defect is classified into a candidate ghost image set. If the first confidence level is less than the preset judgment threshold, the candidate defect is classified into the set of real defects; wherein, the first confidence level represents the probability that the candidate defect belongs to the ghost image.
5. The method according to claim 4, characterized in that, The preset judgment threshold is determined based on the baseline judgment threshold and the sensitivity of the ghost detection threshold; wherein, the sensitivity of the ghost detection threshold is determined by user input or based on the material type of the detected object.
6. The method according to any one of claims 1-5, characterized in that, The step of determining whether a candidate ghost image is a real ghost image based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the reference defect set includes: Determine the location information of one of the reference defects in the reference defect set; Based on the location information of the reference defect, the corresponding ghost image generation area is determined; Determine whether the candidate ghost image is located within the ghost image generation area; If the candidate ghost image is located within the ghost image generation area, the candidate ghost image is determined to be a real ghost image; If the candidate ghost image is not located within the ghost image generation area, the candidate ghost image is determined to be a real defect.
7. The method according to claim 6, characterized in that, The step of determining the corresponding ghost image generation area based on the location information of the reference defect includes: Determine the inscribed circle of the reference defect; The coordinates of the center of the reference defect are determined based on the inscribed circle of the reference defect. Based on the center coordinates of the reference defect, the corresponding ghost image generation area is determined.
8. The method according to claim 7, characterized in that, Determining the corresponding ghost image generation area based on the center coordinates of the reference defect includes: Determine the coordinates of the point symmetrical to the center coordinates of the reference defect about the central axis of the image; A preset geometric range is established as the ghost image generation area, centered on the coordinates of the symmetry point; wherein, the preset geometric range includes a circular area or a rectangular area centered on the symmetry point.
9. The method according to claim 7, characterized in that, Determining the corresponding ghost image generation area based on the center coordinates of the reference defect includes: Using the center coordinates of the reference defect as a reference point, the region where the Euclidean distance to the reference point is less than a preset radius threshold is determined as the ghost image generation region.
10. The method according to claim 7, characterized in that, Determining the corresponding ghost image generation area based on the center coordinates of the reference defect includes: Calculate the coordinate difference between the candidate position and the center coordinates of the reference defect; the coordinate difference includes a first axial coordinate difference and a second axial coordinate difference; The regions that satisfy the condition that the first axial coordinate difference is less than the first axial threshold and the second axial coordinate difference is less than the second axial threshold are defined as ghost image generation regions; wherein, the second axial threshold is greater than the first axial threshold.
11. The method according to any one of claims 1 to 10, characterized in that, The determination of multiple candidate defects in the first image includes: Based on threshold segmentation, connected component analysis, and morphological analysis, multiple regions are identified from the first image, and each region corresponds to a candidate defect.
12. The method according to claim 11, characterized in that, The method, based on threshold segmentation, connected component analysis, and morphological analysis, identifies multiple regions from the first image, including: The first image is subjected to adaptive threshold segmentation to generate a binarized image; Connectivity labeling is performed on the binarized image to identify all independent connected regions; Morphological filtering is performed on the marked independent connected regions to identify multiple regions.
13. The method according to claim 12, characterized in that, The morphological filtering process performed on the marked independent connected regions identifies multiple regions, including: A morphological opening operation is performed on the marked independent connected regions, and then regions with fewer pixels than the minimum defect area threshold are removed, thus determining the processed connected regions as multiple regions.
14. A device for identifying ghost images, characterized in that, include: The first determining unit is used to determine multiple candidate defects in the first image; wherein the first image is obtained by the image acquisition module based on the image acquisition of the object to be detected; The second determining unit is used to determine the attribute values of multiple attributes of each candidate defect for each candidate defect. The parsing unit is used to classify the attribute values of the multiple candidate defects based on the attribute decision tree and machine learning model, and classify the multiple candidate defects into a set of real defects and a set of candidate ghost images; The third determining unit is used to determine a set of reference defects with a size greater than a preset threshold from the set of real defects; The fourth determining unit is used to determine whether each candidate ghost image in the candidate ghost image set is a real ghost image based on the spatial positional relationship between the candidate ghost image and one of the reference defects in the reference defect set.
15. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1 to 13.
17. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 13.