Wafer surface defect detection method and system
By performing scale normalization and grayscale consistency processing on wafer surface images, and combining low-resolution global scanning with high-resolution local detection, the problems of insufficient detection efficiency and accuracy and inconsistent results in existing technologies are solved, achieving efficient and stable wafer surface defect detection.
Patent Information
- Application Number
- CN202512052668.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-15
AI Technical Summary
Existing wafer surface defect detection technologies involve large computational demands on high-resolution images, making it difficult to balance detection efficiency and accuracy. Low-resolution images may lead to the loss of information on minute defects, and the lack of effective fusion of detection results from multiple regions and scales results in inconsistent detection outcomes.
After scale normalization and grayscale consistency processing, low-resolution global scanning is performed to extract suspected defect areas. Key detection areas are generated through spatial correlation analysis, and high-resolution local images are acquired for defect detection. The results are then fused by combining regional feature analysis and multi-scale consistency judgment.
It improves detection efficiency and accuracy, stabilizes the boundary positioning of defect areas, ensures the consistency of multi-scale detection results, and enhances the reliability of overall detection results.
Smart Images

Figure CN122048810A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of defect detection technology, specifically relating to a method and system for detecting defects on the surface of a wafer. Background Technology
[0002] As the core carrier in the semiconductor device manufacturing process, the surface quality of the wafer directly affects the stability and yield of subsequent processes such as photolithography, etching, thin film deposition, and device packaging. During wafer manufacturing and inspection, the wafer surface may develop various types of surface defects, such as scratches, particles, pits, and cracks, due to process fluctuations, material defects, or environmental factors. To ensure that the wafer meets the requirements of subsequent processes, defect inspection is usually performed on the wafer surface after wafer processing or at critical process nodes to identify the location and distribution of defects.
[0003] Existing wafer surface defect detection technologies mainly include image processing methods based on rule-based algorithms and defect recognition methods based on machine learning or deep learning. Among them, traditional image processing methods typically extract potential defect regions by performing grayscale analysis, gradient calculation, threshold segmentation, and connected component analysis on wafer surface images. This type of method has a relatively fixed implementation process and is suitable for detection scenarios with strong regularity and small background changes.
[0004] In practical applications, the aforementioned detection schemes still have certain limitations. First, directly performing defect detection model inference on the entire high-resolution wafer image is computationally intensive, making it difficult to balance detection efficiency and accuracy. On the other hand, relying solely on low-resolution images may lead to the loss of minute defects or boundary details. Second, some schemes lack further analysis of the internal boundary structure of the defect candidate region after its generation, making it difficult to finely adjust the defect contour position and easily causing unstable defect region localization. Furthermore, when multiple regions and multiple scales of detection results coexist, the existing schemes have relatively simple fusion strategies for detection results from different regions, lacking effective characterization of differences between regions, which affects the consistency of the final detection results. Summary of the Invention
[0005] This invention addresses the problems in existing technologies by providing a wafer surface defect detection method and system. It solves the issues raised in the background, where performing defect detection model inference directly on the entire high-resolution wafer image results in high computational load, making it difficult to balance detection efficiency and accuracy. Conversely, relying solely on low-resolution images may lead to the loss of minute defects or boundary details. Furthermore, it addresses the problem that some solutions lack further analysis of the internal boundary structure of defect candidate regions after generation, making it difficult to finely adjust the defect contour position and causing unstable defect region localization. Additionally, it addresses the issue that existing solutions use relatively simple fusion strategies for detection results from different regions when multiple regions and scales coexist, lacking effective characterization of regional differences and affecting the consistency of the final detection results.
[0006] The technical solution adopted in this invention is as follows: In a first aspect, this application provides a method for detecting defects on a wafer surface, the method comprising the following steps: The original surface image of the wafer to be inspected is obtained, and the original surface image is subjected to scale normalization and grayscale consistency processing to obtain a standard wafer image for subsequent processing. Low-resolution global scanning processing is performed based on standard wafer images to calculate image gradient information and extract a set of suspected defect regions. Spatial correlation analysis is performed on each suspected defect region in the suspected defect region set, and several key detection areas are generated based on the size, distribution density and mutual distance of the suspected defect regions. High-resolution local images are acquired for each key detection area, and these high-resolution local images are input into a pre-trained defect detection model to obtain defect candidate information within each key detection area. Regional feature analysis is performed on the defect candidate information. Within the defect candidate information region, boundary candidate pixels are screened based on gradient magnitude. The boundary region range is determined by connected component analysis. The position of the boundary contour is corrected using the second derivative matrix to obtain the boundary-corrected regional defect candidate result. Multi-scale consistency judgment and regional weight fusion are performed on the boundary-corrected regional defect candidate results in each key detection area to output the final detection result of wafer surface defects.
[0007] Furthermore, the original surface image undergoes scale normalization and grayscale consistency processing, including: Obtain the grayscale value of each pixel in the original surface image. The original surface image is scaled according to a preset reference scale; Calculate the average gray level of the entire image based on the scaled image. With gray standard deviation ,in:
[0008]
[0009] The grayscale values of each pixel are consistent according to a preset grayscale mapping function, so that the corrected pixel grayscale values are consistent. satisfy:
[0010] The image after scale normalization and grayscale consistency correction is used as a standard wafer image for subsequent extraction of suspected defect areas.
[0011] Further, low-resolution global scan processing includes: The standard wafer image is downsampled to obtain a low-resolution wafer image for global scanning; Calculate the gradient magnitude of pixels on a low-resolution wafer image. ,in:
[0012] gradient magnitude With preset gradient threshold Compare and select the one that satisfies The pixels are used as gradient candidate pixels; Connectivity analysis is performed based on gradient candidate pixels to form several connected regions, and the area of each connected region is calculated. ; When the area of the connected region When the corresponding connected region is identified as a suspected defect region, it is added to the suspected defect region set. This is the preset area threshold.
[0013] Furthermore, spatial correlation analysis of suspected defective areas includes: Calculate each suspected defect region in the suspected defect region set. Geometric center coordinates With area ; Based on any two suspected defect areas , Calculate the distance between regions using the center coordinates ,in:
[0014] For each suspected defect area Calculate the regional density index ,in:
[0015] in This is a spatial distance threshold parameter; When suspected defect area Regional density index When this occurs, it is merged with adjacent suspected defect areas that meet the distance criteria to form the same key inspection area; in, The preset regional density threshold.
[0016] Furthermore, acquiring high-resolution local images of key detection areas includes: The mapping position of the key detection area in the standard wafer image is determined based on its position coordinates in the low-resolution wafer image. Let the scaling ratio between the low-resolution image and the standard wafer image be . Then the center coordinates of the key detection area satisfy:
[0017] The pixel coordinates of the key detection area in the high-resolution wafer image. The pixel coordinates of the key detection area in the low-resolution wafer image; Centered on the mapped location, a local area of a preset size is cropped from the standard wafer image to form a high-resolution local image; Each high-resolution local image is used as an independent detection input for subsequent acquisition of defect candidate information.
[0018] Furthermore, the output of the defect detection model for high-resolution local images includes: Several candidate defect regions are generated in each high-resolution local image, and a corresponding detection confidence level is assigned to each candidate defect region. ; Detection confidence satisfy:
[0019] in This represents the feature representations extracted by the defect detection model at different scales or levels. Let i be the feature mapping function for the i-th defect candidate; The results, which include the location, scale information, and detection confidence of the defect candidate region, are used as defect candidate information.
[0020] Furthermore, regional feature analysis includes: Recalculate the gradient magnitude within the region corresponding to the defect candidate information. Filter to meet The pixels are used as boundary candidate pixels; in The threshold for filtering local boundaries; Connectivity analysis is performed based on boundary candidate pixels to determine the range of boundary connected regions, and connected regions with an area smaller than a preset threshold are removed. Calculate the second derivative matrix within the defined boundary connected region. ,in:
[0021] in, Represents image grayscale The second-order change in the x-direction, Represents image grayscale The second-order change in the y-direction, Represents image grayscale The mixed second-order change in the x and y directions; based on The eigenvalue distribution is used to correct the boundary contour position, generating regional defect candidate results after boundary correction.
[0022] Furthermore, multi-scale consistency judgments include: Multiple judgments were made on the candidate results of the same region-level defects based on different scale features, resulting in multiple sets of judgment values. ; Calculate the defect consistency score based on the number of judgment values K. ,in:
[0023] when At that time, retain the corresponding regional-level defect candidate results; when When this happens, the corresponding regional-level defect candidate results are removed; in, This is the defect determination threshold used in the multi-scale consistency judgment stage.
[0024] Furthermore, regional weight fusion includes: Calculate the regional weighting coefficient for each key detection area. ,in:
[0025]
[0026] in This indicates the number of regional-level defect candidates within the key detection area. This represents the candidate defect density within the i-th key detection area. Indicates the area of key testing zones; Based on regional weight coefficients The retained regional-level defect candidate results are weighted and fused to obtain the fused defect judgment result.
[0027] Secondly, this application provides a wafer surface defect detection system for implementing the wafer surface defect detection method as described in the first aspect, the system comprising: The image acquisition and preprocessing module is configured to acquire the original surface image of the wafer to be inspected, perform scale normalization and grayscale consistency processing on the original surface image, and generate a standard wafer image. The global scanning and suspected defect extraction module is connected to the image acquisition and preprocessing module. It is configured to perform low-resolution global scanning processing based on standard wafer images, calculate image gradient information, and extract a set of suspected defect regions accordingly. The spatial correlation and key detection area generation module is connected to the global scanning and suspected defect extraction module. It is configured to perform spatial correlation analysis on suspected defect areas in the suspected defect area set and generate several key detection areas based on the size information, distribution density and mutual distance relationship of the suspected defect areas. The high-resolution local image acquisition module is connected to the spatial association and key detection region generation module and is configured to acquire corresponding high-resolution local images for each key detection region. The defect candidate information acquisition module is connected to the high-resolution local image acquisition module and is configured to input the high-resolution local image into the pre-trained defect detection model to obtain defect candidate information in each key detection area. The regional feature parsing and boundary correction module is connected to the defect candidate information acquisition module. It is configured to perform regional feature parsing on the defect candidate information, correct the boundary contour of the defect candidate region, and generate regional defect candidate results with boundary correction. The multi-scale consistency judgment and result fusion module is connected to the regional feature analysis and boundary correction module. It is configured to perform multi-scale consistency judgment and regional weight fusion on the boundary-corrected regional defect candidate results in each key detection area, and output the final detection result of wafer surface defects.
[0028] As can be seen from the above technical solutions, the advantages of the present invention are: By performing scale normalization and grayscale consistency processing on the original wafer surface images, the wafer surface images obtained under different inspection batches and imaging conditions are kept consistent in grayscale distribution and spatial scale, providing a stable input basis for subsequent defect detection processing and helping to reduce the impact of differences in imaging conditions on defect detection results.
[0029] The detection process combines low-resolution global scanning with high-resolution local detection. First, a low-resolution global scan is performed on a standard wafer image to extract suspected defect areas. Then, a key detection area is generated through spatial correlation analysis. High-resolution local images are obtained only for the key detection area and defect detection is performed. This reduces the repetitive calculation of the entire high-resolution wafer image while ensuring the detection coverage, which helps to balance detection accuracy and processing efficiency.
[0030] By performing spatial correlation analysis on suspected defect areas, and comprehensively considering the size information, spatial distribution density, and distance relationship between areas, key detection areas are generated. This enables the detection process to focus on areas with spatial correlation in defect distribution, which helps improve the consistency of processing scenarios with concentrated local defects.
[0031] After obtaining the defect candidate information, a regional feature parsing process is introduced. Within the defect candidate region, boundary candidate pixels are filtered based on gradient information. The position of the defect boundary contour is corrected by combining connected component analysis and second derivative information, which makes the boundary positioning of the defect candidate region more stable and helps to reduce the regional positioning deviation caused by boundary blurring or noise interference.
[0032] Multi-scale consistency judgment is performed on the regional defect candidate results after boundary correction, and regional weight fusion is performed in combination with the defect candidate distribution in the key detection area. This establishes a unified judgment criterion among the multi-scale detection results, so that the final output wafer surface defect results are consistent across different scales and different detection areas, which helps to improve the reliability of the overall detection results. Attached Figure Description
[0033] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying 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.
[0034] Figure 1 This is a step diagram of the wafer surface defect detection method in the embodiment; Figure 2 This is a structural diagram of the wafer surface defect detection system in the embodiment. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] Please see Figure 1 As shown, this application provides a method for detecting defects on a wafer surface, including the following steps: Step S1: Obtain the original surface image of the wafer to be inspected, and perform scale normalization and grayscale consistency processing on the original surface image to obtain a standard wafer image for subsequent processing. In a specific implementation, the original surface image can be acquired by an imaging device installed in the wafer inspection equipment. This imaging device can be a line scan camera, an area scan camera, or other image acquisition devices suitable for wafer surface imaging. Because different batches of wafers may have differences in magnification, exposure conditions, or uneven illumination during the imaging process, the original surface images may exhibit inconsistencies in spatial scale and grayscale distribution. This step performs scale normalization on the original surface images to ensure consistency in pixel scale across different images. Simultaneously, it performs grayscale consistency correction to ensure the overall grayscale distribution meets preset statistical characteristics, thereby obtaining a standard wafer image. This processing allows subsequent steps to be performed at the same scale and grayscale reference, which helps ensure the stability of suspected defect area extraction.
[0037] In one embodiment, for multiple continuously acquired wafer surface images, the images are first scaled according to the device calibration parameters, and then the overall grayscale of the images is normalized so that different wafer images have consistent input characteristics in the subsequent inspection process.
[0038] Step S2: Perform low-resolution global scanning processing based on standard wafer images, calculate image gradient information, and extract a set of suspected defect regions; In a specific implementation, the standard wafer image can first undergo downsampling processing to obtain a low-resolution wafer image for global scanning. By calculating the gradient information of pixels on the low-resolution image, regions with significant grayscale changes on the wafer surface can be quickly identified. This gradient information reflects the location of potential edges or abnormal structures in the image. Based on preset gradient judgment conditions, pixels that meet the conditions are filtered, and adjacent gradient pixels are combined into connected regions through connectivity analysis, thus forming several candidate regions. Furthermore, based on the area information of the candidate regions, regions that are too small or obviously caused by noise can be eliminated, ultimately obtaining a set of suspected defective regions.
[0039] In one embodiment, by scanning the low-resolution wafer image line by line and calculating the gradient magnitude, only areas with obvious gradient changes and a certain degree of spatial continuity are marked, so that suspected defective areas can be quickly located with low computational cost.
[0040] Step S3: Perform spatial correlation analysis on each suspected defect region in the suspected defect region set, and generate several key detection regions based on the size, distribution density and mutual distance of the suspected defect regions. In a specific implementation, for the set of suspected defect areas obtained in step S2, the geometric center position and area size information of each suspected defect area can be calculated. By analyzing the spatial distribution relationship of different suspected defect areas, areas that are close to each other and have a relatively concentrated distribution are associated. When multiple suspected defect areas meet the preset association conditions in spatial location, they can be merged into the same key detection area. Through this spatial association analysis, the originally discrete suspected defect areas can be integrated into representative key detection areas, thereby providing a more reasonable detection unit for subsequent high-resolution detection.
[0041] In one embodiment, when multiple suspected defect areas exhibit localized clustering on the wafer surface, spatial correlation analysis is used to combine them into a key detection area, enabling subsequent detection to cover the overall defect distribution within that area.
[0042] Step S4: Obtain high-resolution local images for each key detection area, input the high-resolution local images into the pre-trained defect detection model, and obtain defect candidate information in each key detection area. In a specific implementation, based on the position coordinates of the key detection area in the low-resolution wafer image, its corresponding position in the standard wafer image is determined, and a high-resolution local image of a preset size is cropped centered on this position. The high-resolution local image contains richer detail information than the low-resolution image, making it suitable for precise defect identification. The cropped high-resolution local images are then input into a pre-trained defect detection model, which can be constructed using deep learning, to identify potential defect structures in the local images and output candidate defect regions and their related information.
[0043] In one embodiment, for each key detection area, only a local image covering that area is captured and model inference is performed, thereby avoiding repeated detection of the entire high-resolution wafer image.
[0044] In one specific embodiment, the pre-trained defect detection model is obtained through offline training before being applied to wafer surface defect detection. During training, multiple wafer surface images with completed defect annotations are first acquired as training samples. These training samples include normal region samples and defect region samples containing defects such as scratches, particles, and pits. After uniformly scaling and grayscale normalizing the training samples, they are input into the defect detection model for feature learning. During model training, the model is guided to gradually learn the differences between normal and defective structures on the wafer surface by supervising the location and category annotation information of defect regions in the training samples. The model parameters are iteratively updated based on the deviation between the model output and the annotation results. After multiple rounds of training, when the model's detection results on the validation samples meet the preset convergence conditions, the model training is completed, and the trained model parameters are stored and solidified as the pre-trained defect detection model to be used in subsequent wafer surface defect detection processes.
[0045] Step S5: Perform regional feature analysis on the defect candidate information. Within the defect candidate information region, filter the boundary candidate pixels based on the gradient magnitude, determine the boundary region range through connected component analysis, and use the second derivative matrix to correct the position of the boundary contour to obtain the regional defect candidate result after boundary correction. In a specific implementation, for the defect candidate information output in step S4, the image gradient information is recalculated within the corresponding defect candidate region to further extract boundary-related features. By filtering pixels whose gradient magnitudes meet the conditions and combining them with connected component analysis, the range of regions in the defect candidate region that may correspond to the actual defect boundary can be determined. Based on this, an analysis method based on second-order derivative information is introduced to characterize the gray-level change characteristics of pixels within the boundary region, and the position of the defect boundary contour is corrected accordingly, thereby obtaining the boundary-corrected region-level defect candidate result.
[0046] In one embodiment, for the preliminary detected defect candidate regions, their boundaries are repositioned through region-level feature analysis, so that the contour of the defect region fits the actual wafer surface structure more closely.
[0047] Step S6: Perform multi-scale consistency judgment and regional weight fusion on the boundary-corrected regional defect candidate results in each key detection area, and output the final detection result of wafer surface defects.
[0048] In a specific implementation, for regional defect candidate results within the same key detection area, multiple judgments can be made based on different scales or feature levels, and consistency analysis is performed on the judgment results. When a regional defect candidate result meets the consistency condition in multi-scale judgments, it is retained for subsequent processing. Furthermore, according to the distribution of defect candidates within the key detection area, corresponding weights are assigned to defect candidate results in different areas, and the retained results are fused to finally output the detection results of wafer surface defects.
[0049] In one embodiment, by uniformly integrating the detection results of multiple key detection areas, the final output wafer surface defect result can reflect the comprehensive judgment of the entire detection process.
[0050] In some embodiments, scale normalization and grayscale consistency processing are performed on the original surface image, including: Obtain the grayscale value of each pixel in the original surface image. The original surface image is scaled according to a preset reference scale; Calculate the average gray level of the entire image based on the scaled image. With gray standard deviation ,in:
[0051]
[0052] The grayscale values of each pixel are consistent according to a preset grayscale mapping function, so that the corrected pixel grayscale values are consistent. satisfy:
[0053] The image after scale normalization and grayscale consistency correction is used as a standard wafer image for subsequent extraction of suspected defect areas.
[0054] In a specific implementation, the original surface image can be acquired by the imaging module in the wafer inspection equipment. During the imaging process, differences in exposure parameters, light source brightness, or camera response may cause fluctuations in the overall brightness and contrast of the image from different wafers. This embodiment scales the original surface image to ensure all images are processed at a uniform reference scale, avoiding the impact of resolution differences on subsequent inspection steps. Simultaneously, by statistically analyzing the overall grayscale distribution of the image and performing consistency correction, the grayscale distribution of images from different wafers is made comparable, thereby ensuring that the subsequent extraction of suspected defect areas is performed under a unified grayscale benchmark.
[0055] In one embodiment, for multiple continuously acquired wafer surface images, the images are first uniformly scaled, and then grayscale consistency correction is performed to ensure that each image has consistent input characteristics in the subsequent global scanning stage.
[0056] In some embodiments, low-resolution global scan processing includes: The standard wafer image is downsampled to obtain a low-resolution wafer image for global scanning; Calculate the gradient magnitude of pixels on a low-resolution wafer image. ,in:
[0057] gradient magnitude With preset gradient threshold Compare and select the one that satisfies The pixels are used as gradient candidate pixels; Connectivity analysis is performed based on gradient candidate pixels to form several connected regions, and the area of each connected region is calculated. ; When the area of the connected region When the corresponding connected region is identified as a suspected defect region, it is added to the suspected defect region set. This is the preset area threshold.
[0058] In a specific implementation, downsampling the standard wafer image reduces the amount of image data while preserving overall structural information, thereby improving processing efficiency in the global scanning stage. Analyzing the image using gradient information allows for rapid location of areas with significant grayscale changes on the wafer surface. By using pixels that meet gradient conditions as candidates and further performing connectivity analysis, spatially adjacent candidate pixels can be combined into regions, thus avoiding interference from isolated pixels in the detection results. Setting area conditions to filter smaller connected regions helps reduce the number of noisy areas entering subsequent processing steps.
[0059] In one embodiment, a global scan is used to quickly identify areas on the wafer surface that may have anomalies, providing a candidate range for subsequent fine inspection.
[0060] In some embodiments, spatial correlation analysis of suspected defective regions includes: Calculate each suspected defect region in the suspected defect region set. Geometric center coordinates With area ; Based on any two suspected defect areas , Calculate the distance between regions using the center coordinates ,in:
[0061] For each suspected defect area Calculate the regional density index ,in:
[0062] in This is a spatial distance threshold parameter; When suspected defect area Regional density index When this occurs, it is merged with adjacent suspected defect areas that meet the distance criteria to form the same key inspection area; in, The preset regional density threshold.
[0063] In a specific implementation, by analyzing the geometric center location of suspected defect areas, the spatial distribution relationship of different regions on the wafer surface can be determined. When multiple suspected defect areas are spatially close, it often reflects the presence of multiple abnormal structures within the same local area. By introducing a region density index to quantify the spatial aggregation degree of suspected defect areas and merging adjacent areas accordingly, more representative key detection areas can be formed, thereby providing reasonable detection units for subsequent high-resolution detection.
[0064] In one embodiment, when multiple suspected defects that are close to each other appear in a certain area on the wafer surface, they are combined into the same key detection area through spatial correlation analysis for unified processing.
[0065] In some embodiments, acquiring a high-resolution local image of a key detection region includes: The mapping position of the key detection area in the standard wafer image is determined based on its position coordinates in the low-resolution wafer image. Let the scaling ratio between the low-resolution image and the standard wafer image be . Then the center coordinates of the key detection area satisfy:
[0066] The pixel coordinates of the key detection area in the high-resolution wafer image. The pixel coordinates of the key detection area in the low-resolution wafer image; Centered on the mapped location, a local area of a preset size is cropped from the standard wafer image to form a high-resolution local image; Each high-resolution local image is used as an independent detection input for subsequent acquisition of defect candidate information.
[0067] In a specific implementation, by establishing a spatial mapping relationship between low-resolution wafer images and standard wafer images, the key detection areas located during the global scanning stage can be accurately mapped onto high-resolution images. A local image is then cropped centered on the mapped location, ensuring that the acquired high-resolution local image completely covers the key detection areas. This provides input data containing rich details for subsequent defect detection models.
[0068] In one embodiment, high-resolution local images are acquired only for the locations corresponding to key detection areas, thereby avoiding repeated detection of the entire high-resolution wafer image.
[0069] In some embodiments, the output of the defect detection model to a high-resolution local image includes: Several candidate defect regions are generated in each high-resolution local image, and a corresponding detection confidence level is assigned to each candidate defect region. ; Detection confidence satisfy:
[0070] in This represents the feature representations extracted by the defect detection model at different scales or levels. Let i be the feature mapping function for the i-th defect candidate; The results, which include the location, scale information, and detection confidence of the defect candidate region, are used as defect candidate information.
[0071] In a specific implementation, the defect detection model can be built based on deep learning to identify potential defects in high-resolution local images. During processing, the model extracts feature information from different levels and generates corresponding candidate defect regions based on these features. By assigning a detection confidence level to each candidate defect region, the candidate results can be quantitatively described, providing foundational data for subsequent region-level feature analysis and consistency assessment.
[0072] In one embodiment, for multiple defect candidates within the same key detection area, their location and confidence information are output as inputs for subsequent processing.
[0073] In some embodiments, region-level feature parsing includes: Recalculate the gradient magnitude within the region corresponding to the defect candidate information. Filter to meet The pixels are used as boundary candidate pixels; in The threshold for filtering local boundaries; Connectivity analysis is performed based on boundary candidate pixels to determine the range of boundary connected regions, and connected regions with an area smaller than a preset threshold are removed. Calculate the second derivative matrix within the defined boundary connected region. ,in:
[0074] in, Represents image grayscale The second-order change in the x-direction, Represents image grayscale The second-order change in the y-direction, Represents image grayscale The mixed second-order change in the x and y directions; based on The eigenvalue distribution is used to correct the boundary contour position, generating regional defect candidate results after boundary correction.
[0075] In a specific implementation, by recalculating gradient information within the defect candidate region, pixel features related to the boundary can be further extracted. Organizing the boundary candidate pixels using connected component analysis helps to determine continuous boundary regions. Based on this, second-order derivative information is introduced to characterize the gray-level variation characteristics within the boundary region, and the boundary contour of the defect candidate region is adjusted accordingly, thereby obtaining more stable region-level defect candidate results.
[0076] In one embodiment, a boundary correction process is performed on the preliminary defect candidate regions to make the defect region contours more closely match the actual structure of the wafer surface.
[0077] In some embodiments, multi-scale consistency determination includes: Multiple judgments were made on the candidate results of the same region-level defects based on different scale features, resulting in multiple sets of judgment values. ; Calculate the defect consistency score based on the number of judgment values K. ,in:
[0078] when At that time, retain the corresponding regional-level defect candidate results; when When this happens, the corresponding regional-level defect candidate results are removed; in, This is the defect determination threshold used in the multi-scale consistency judgment stage.
[0079] In a specific implementation, by repeatedly judging regional defect candidate results at different scales or feature levels, the stability of defects under different feature expressions can be comprehensively reflected. When the consistency score meets the preset conditions, the defect candidate result is considered to have consistent performance in multi-scale judgment and is thus retained.
[0080] In one embodiment, only regional defect candidate results that pass the consistency judgment are included in the subsequent fusion processing flow.
[0081] In some embodiments, region weight fusion includes: Calculate the regional weighting coefficient for each key detection area. ,in:
[0082]
[0083] in This indicates the number of regional-level defect candidates within the key detection area. This represents the candidate defect density within the i-th key detection area. Indicates the area of key testing zones; Based on regional weight coefficients The retained regional-level defect candidate results are weighted and fused to obtain the fused defect judgment result.
[0084] In a specific implementation, by statistically analyzing the distribution of defect candidates within different key detection areas, the concentration of defect candidates in each area can be reflected. The defect candidate results for different areas are weighted according to regional weight coefficients, so that the final fusion result can comprehensively reflect the detection situation in different areas.
[0085] In one embodiment, the detection results of multiple key detection areas are uniformly processed by region weight fusion to form the final judgment result of wafer surface defects.
[0086] Please see Figure 2 As shown, in some embodiments, this application provides a wafer surface defect detection system for implementing a wafer surface defect detection method, the system comprising: The image acquisition and preprocessing module is configured to acquire the original surface image of the wafer to be inspected, perform scale normalization and grayscale consistency processing on the original surface image, and generate a standard wafer image. The global scanning and suspected defect extraction module is connected to the image acquisition and preprocessing module. It is configured to perform low-resolution global scanning processing based on standard wafer images, calculate image gradient information, and extract a set of suspected defect regions accordingly. The spatial correlation and key detection area generation module is connected to the global scanning and suspected defect extraction module. It is configured to perform spatial correlation analysis on suspected defect areas in the suspected defect area set and generate several key detection areas based on the size information, distribution density and mutual distance relationship of the suspected defect areas. The high-resolution local image acquisition module is connected to the spatial association and key detection region generation module and is configured to acquire corresponding high-resolution local images for each key detection region. The defect candidate information acquisition module is connected to the high-resolution local image acquisition module and is configured to input the high-resolution local image into the pre-trained defect detection model to obtain defect candidate information in each key detection area. The regional feature parsing and boundary correction module is connected to the defect candidate information acquisition module. It is configured to perform regional feature parsing on the defect candidate information, correct the boundary contour of the defect candidate region, and generate regional defect candidate results with boundary correction. The multi-scale consistency judgment and result fusion module is connected to the regional feature analysis and boundary correction module. It is configured to perform multi-scale consistency judgment and regional weight fusion on the boundary-corrected regional defect candidate results in each key detection area, and output the final detection result of wafer surface defects.
[0087] In some embodiments, this application provides a terminal, including: Memory, used to store wafer surface defect detection programs; A processor is used to execute the steps of the wafer surface defect detection method when the wafer surface defect detection system is used.
[0088] In some embodiments, this application provides a computer-readable storage medium that stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the wafer surface defect detection method.
[0089] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.
Claims
1. A method for detecting defects on a wafer surface, characterized in that, Includes the following steps: The original surface image of the wafer to be inspected is obtained, and the original surface image is subjected to scale normalization and grayscale consistency processing to obtain a standard wafer image for subsequent processing. Low-resolution global scanning processing is performed based on standard wafer images to calculate image gradient information and extract a set of suspected defect regions. Spatial correlation analysis is performed on each suspected defect region in the suspected defect region set, and several key detection areas are generated based on the size, distribution density and mutual distance of the suspected defect regions. High-resolution local images are acquired for each key detection area, and these high-resolution local images are input into a pre-trained defect detection model to obtain defect candidate information within each key detection area. Regional feature analysis is performed on the defect candidate information. Within the defect candidate information region, boundary candidate pixels are screened based on gradient magnitude. The boundary region range is determined by connected component analysis. The position of the boundary contour is corrected using the second derivative matrix to obtain the boundary-corrected regional defect candidate result. Multi-scale consistency judgment and regional weight fusion are performed on the boundary-corrected regional defect candidate results in each key detection area to output the final detection result of wafer surface defects.
2. The wafer surface defect detection method according to claim 1, characterized in that, The original surface image undergoes scale normalization and grayscale consistency processing, including: Obtain the grayscale value of each pixel in the original surface image. The original surface image is scaled according to a preset reference scale; Calculate the average gray level of the entire image based on the scaled image. With gray standard deviation ,in: The grayscale values of each pixel are consistent according to a preset grayscale mapping function, so that the corrected pixel grayscale values are consistent. satisfy: The image after scale normalization and grayscale consistency correction is used as a standard wafer image for subsequent extraction of suspected defect areas.
3. The wafer surface defect detection method according to claim 2, characterized in that, Low-resolution global scan processing includes: The standard wafer image is downsampled to obtain a low-resolution wafer image for global scanning; Calculate the gradient magnitude of pixels on a low-resolution wafer image. ,in: gradient magnitude With preset gradient threshold Compare and select the one that satisfies The pixels are used as gradient candidate pixels; Connectivity analysis is performed based on gradient candidate pixels to form several connected regions, and the area of each connected region is calculated. ; When the area of the connected region When the corresponding connected region is identified as a suspected defect region, it is added to the suspected defect region set. This is the preset area threshold.
4. The wafer surface defect detection method according to claim 2, characterized in that, Spatial correlation analysis of suspected defect areas includes: Calculate each suspected defect region in the suspected defect region set. Geometric center coordinates With area ; Based on any two suspected defect areas , Calculate the distance between regions using the center coordinates ,in: For each suspected defect area Calculate the regional density index ,in: in This is a spatial distance threshold parameter; When suspected defect area Regional density index When this occurs, it is merged with adjacent suspected defect areas that meet the distance criteria to form the same key inspection area; in, The preset threshold for determining regional density.
5. The wafer surface defect detection method according to claim 4, characterized in that, Acquiring high-resolution local images of key detection areas includes: The mapping position of the key detection area in the standard wafer image is determined based on its position coordinates in the low-resolution wafer image. Let the scaling ratio between the low-resolution image and the standard wafer image be . Then the center coordinates of the key detection area satisfy: The pixel coordinates of the key detection area in the high-resolution wafer image. The pixel coordinates of the key detection area in the low-resolution wafer image; Centered on the mapped location, a local area of a preset size is cropped from the standard wafer image to form a high-resolution local image; Each high-resolution local image is used as an independent detection input for subsequent acquisition of defect candidate information.
6. The wafer surface defect detection method according to claim 4 or 5, characterized in that, The output of the defect detection model for high-resolution local images includes: Several candidate defect regions are generated in each high-resolution local image, and a corresponding detection confidence level is assigned to each candidate defect region. ; Detection confidence satisfy: in This represents the feature representations extracted by the defect detection model at different scales or levels. Let i be the feature mapping function for the i-th defect candidate; The results, which include the location, scale information, and detection confidence of the defect candidate region, are used as defect candidate information.
7. The wafer surface defect detection method according to claim 3, characterized in that, Regional feature analysis includes: Recalculate the gradient magnitude within the region corresponding to the defect candidate information. Filter to meet The pixels are used as boundary candidate pixels; in The threshold for filtering local boundaries; Connectivity analysis is performed based on boundary candidate pixels to determine the range of boundary connected regions, and connected regions with an area smaller than a preset threshold are removed. Calculate the second derivative matrix within the defined boundary connected region. ,in: in, Represents image grayscale The second-order change in the x-direction, Represents image grayscale The second-order change in the y-direction, Represents image grayscale The mixed second-order change in the x and y directions; based on The eigenvalue distribution is used to correct the boundary contour position, generating regional defect candidate results after boundary correction.
8. The wafer surface defect detection method according to claim 6, characterized in that, Multi-scale consistency judgment includes: Multiple judgments were made on the candidate results of the same region-level defects based on different scale features, resulting in multiple sets of judgment values. ; Calculate the defect consistency score based on the number of judgment values K. ,in: when At that time, retain the corresponding regional-level defect candidate results; when When this happens, the corresponding regional-level defect candidate results are removed; in, This is the defect determination threshold used in the multi-scale consistency judgment stage.
9. The wafer surface defect detection method according to claim 2, characterized in that, Regional weight fusion includes: Calculate the regional weighting coefficient for each key detection area. ,in: in This indicates the number of regional-level defect candidates within the key detection area. This represents the candidate defect density within the i-th key detection area. Indicates the area of key testing zones; Based on regional weight coefficients The retained regional-level defect candidate results are weighted and fused to obtain the fused defect judgment result.
10. A wafer surface defect detection system for implementing the wafer surface defect detection method as described in claim 1, characterized in that, The system includes: The image acquisition and preprocessing module is configured to acquire the original surface image of the wafer to be inspected, perform scale normalization and grayscale consistency processing on the original surface image, and generate a standard wafer image. The global scanning and suspected defect extraction module is connected to the image acquisition and preprocessing module. It is configured to perform low-resolution global scanning processing based on standard wafer images, calculate image gradient information, and extract a set of suspected defect regions accordingly. The spatial correlation and key detection area generation module is connected to the global scanning and suspected defect extraction module. It is configured to perform spatial correlation analysis on suspected defect areas in the suspected defect area set and generate several key detection areas based on the size information, distribution density and mutual distance relationship of the suspected defect areas. The high-resolution local image acquisition module is connected to the spatial association and key detection region generation module and is configured to acquire corresponding high-resolution local images for each key detection region. The defect candidate information acquisition module is connected to the high-resolution local image acquisition module and is configured to input the high-resolution local image into the pre-trained defect detection model to obtain defect candidate information in each key detection area. The regional feature parsing and boundary correction module is connected to the defect candidate information acquisition module. It is configured to perform regional feature parsing on the defect candidate information, correct the boundary contour of the defect candidate region, and generate regional defect candidate results with boundary correction. The multi-scale consistency judgment and result fusion module is connected to the regional feature analysis and boundary correction module. It is configured to perform multi-scale consistency judgment and regional weight fusion on the regional defect candidate results after boundary correction in each key detection area, and output the final detection result of wafer surface defects.