Template matching method of semiconductor image and related device

By constructing a deep learning image segmentation model and template matching algorithm based on the U-Net architecture, the accuracy and interpretability issues of semiconductor image template matching methods in complex scenarios are solved, achieving high-precision image registration and reducing noise interference.

CN122289741APending Publication Date: 2026-06-26DONGFANG JINGYUAN ELECTRON LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGFANG JINGYUAN ELECTRON LTD
Filing Date
2026-03-27
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing semiconductor image template matching methods are prone to accuracy issues in complex scenarios, and deep learning-based methods lack interpretability and fail to meet high reliability requirements.

Method used

A deep learning-based image segmentation model is used to segment the template image and the image to be matched. An encoder and decoder with a U-Net architecture are constructed to extract multi-level image features. A template matching algorithm is used to determine the mask matching position, and Fourier transform is combined to optimize the matching accuracy.

Benefits of technology

It improves the adaptability to diverse image scenes, enhances the interpretability of the algorithm, improves the matching accuracy between the template mask image and the mask image to be matched, reduces the amount of computation and reduces noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289741A_ABST
    Figure CN122289741A_ABST
Patent Text Reader

Abstract

This invention provides a template matching method and related equipment for semiconductor images. The template matching method includes obtaining a template image and a matching image, wherein both the template image and the matching image are wafer images; performing image segmentation on the template image and the matching image using a deep learning-based image segmentation model to obtain a template mask image corresponding to the template image and a matching mask image corresponding to the matching image; and using a template matching algorithm to determine the mask matching position of the template mask image in the matching mask image. This template matching method achieves mask images with good edge features while maintaining strong algorithm interpretability, improving the adaptability to diverse image scenes and increasing the matching accuracy between the template mask image and the matching mask image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semiconductor technology, and in particular to a template matching method and related equipment for semiconductor images. Background Technology

[0002] In fields such as integrated circuit manufacturing and semiconductor measurement, image template matching technology is the core support for achieving equipment calibration and precise positioning of measurement points. Its performance directly affects the yield control and testing efficiency of semiconductor components.

[0003] Currently, image template matching methods are generally classified into four categories: correlation-based matching methods, feature-based matching methods, edge-based matching methods, and deep learning-based matching methods. Each category has significant technical limitations, making it difficult to meet the high-precision matching requirements of complex scenarios. Among them, the three traditional matching methods based on correlation, features, and edges are limited by their dependence on image features. Under complex and variable conditions such as fluctuating illumination intensity, scarce texture information, and blurred contour features, they struggle to comprehensively cover the feature dimensions of various images, leading to decreased matching accuracy due to interference. While deep learning-based matching methods possess autonomous feature extraction capabilities and can adapt to diverse image scenarios, their model training relies on large-scale labeled data, resulting in high data acquisition costs and difficulties. Furthermore, they suffer from insufficient algorithm interpretability; when matching results deviate, it is impossible to effectively trace the root cause of the error, limiting their application in scenarios with high reliability requirements. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a template matching method and related device for semiconductor images that overcomes or at least partially solves the above problems, so as to solve the problem of poor interpretability of deep learning-based matching methods and achieve the purpose of improving the matching accuracy of semiconductor images.

[0005] Specifically, according to one aspect of the present invention, a template matching method for a semiconductor image is provided, comprising:

[0006] Obtain a template image and a matching image, wherein the template image and the matching image are wafer images;

[0007] The template image and the image to be matched are segmented using a deep learning-based image segmentation model to obtain a template mask image corresponding to the template image and a matching mask image corresponding to the image to be matched.

[0008] The template matching algorithm is used to determine the mask matching position of the template mask image in the mask image to be matched.

[0009] Optionally, the training method for the image segmentation model includes:

[0010] Acquire training data for model training. The training data includes a training set and a validation set. The training set includes multiple sample images, and the validation set includes sample mask images obtained by image segmentation of pattern regions in the sample images.

[0011] A deep learning model is constructed, and the deep learning model is trained using the training data to obtain the image segmentation model.

[0012] Optionally, the image segmentation model adopts a U-Net architecture, which includes an encoder and a decoder;

[0013] The encoder includes a multi-level downsampling structure, which uses depthwise separable convolution to map the input image in both the spatial and channel dimensions, thereby extracting multi-level image features.

[0014] The decoder includes a multi-level upsampling structure, with each upsampling structure being connected to a corresponding downsampling structure in a skip connection. The upsampling structure is used to fuse the multi-level image features of the encoder and to process the fused features using depthwise separable convolution to obtain a mask image of the input image.

[0015] Optionally, the step of obtaining the sample mask image includes:

[0016] The sample image is divided into multiple pattern categories according to its shape.

[0017] Use pixel labels that correspond one-to-one with the pattern category to mark the pixels within each pattern area;

[0018] The sample image is masked based on the pixel labels to obtain the sample mask image.

[0019] Optionally, the sample image includes a sample template image and a sample image to be matched, wherein the size of the sample template image is smaller than the size of the sample image to be matched; the sample mask image includes a sample template mask image and a sample image to be matched.

[0020] After the step of performing mask transformation on the sample image based on the pixel labels to obtain the sample mask image, the method further includes:

[0021] The pixel values ​​of the sample image and the sample mask image are normalized.

[0022] The sample template image and the sample template mask image are pixel-expanded so that the sample template image, the sample template mask image, the sample image to be matched, and the sample image to be matched have the same size.

[0023] Optionally, after the step of performing image segmentation on the template image and the image to be matched using a deep learning-based image segmentation model to obtain a template mask image corresponding to the template image and a matching mask image corresponding to the image to be matched, the method further includes:

[0024] The template mask image and the mask image to be matched are optimized, including smoothing based on edge blurring operators and / or elimination of isolated pixels based on morphological operators.

[0025] Optionally, determining the mask matching position of the template mask image in the mask image to be matched using a template matching algorithm includes:

[0026] The template mask image is slid across the mask image to be matched, and the cross-correlation coefficient between each sliding window on the template mask image and the mask image to be matched is calculated one by one;

[0027] Select the window with the highest cross-correlation coefficient among the sliding windows, and use the position of the window with the highest cross-correlation coefficient as the mask matching position.

[0028] Optionally, determining the mask matching position of the template mask image in the mask image to be matched using a template matching algorithm includes:

[0029] The spatial domain grayscale distribution of the template mask image and the mask image to be matched is transformed into frequency components in the frequency domain using Fourier transform, thereby obtaining the cross power spectrum of the template mask image and the mask image to be matched.

[0030] The relative displacement between the template mask image and the mask image to be matched is determined based on the peak position of the cross power spectrum, so as to obtain the mask matching position of the template mask image on the mask image to be matched.

[0031] According to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the template matching method for semiconductor images described above.

[0032] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the steps of the template matching method for semiconductor images described above.

[0033] According to another aspect of the present invention, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the template matching method for semiconductor images described above.

[0034] The template matching method for semiconductor images of this invention constructs and uses a deep learning-based image segmentation model to segment template images and images to be matched. This results in mask images with good edge features while maintaining strong algorithm interpretability, thus improving adaptability to diverse image scenes. Furthermore, by using a template matching algorithm to register the template mask image and the mask image to be matched, the matching accuracy between them is improved.

[0035] The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description

[0036] The following sections will describe some specific embodiments of the invention in detail by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:

[0037] Figure 1 This is a schematic flowchart of a template matching method for semiconductor images according to an embodiment of the present invention;

[0038] Figure 2 This is a schematic flowchart illustrating the process of obtaining an image segmentation model using a template matching method according to an embodiment of the present invention.

[0039] Figure 3 This is a schematic flowchart illustrating the process of obtaining a sample mask image using a template matching method according to an embodiment of the present invention.

[0040] Figure 4 This is a schematic diagram of the frame line for pixel annotation of a sample image in a template matching method according to an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of the preprocessing process of a template matching method for sample images and sample mask images according to an embodiment of the present invention.

[0042] Figure 6 This is a schematic diagram of the frame for training an image segmentation model using a template matching method according to an embodiment of the present invention;

[0043] Figure 7This is a schematic flowchart illustrating the template matching process of a template mask image and a mask image to be matched according to an embodiment of the present invention.

[0044] Figure 8 This is a schematic flowchart illustrating the template matching process of a template mask image and a mask image to be matched according to another embodiment of the present invention.

[0045] Figure 9 This is a schematic diagram of a computer program product according to an embodiment of the present invention;

[0046] Figure 10 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention; and

[0047] Figure 11 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0048] The purpose of the template matching method for semiconductor images in this embodiment is to solve the problem of poor interpretability of deep learning-based matching methods, thereby improving the matching accuracy of semiconductor images.

[0049] Figure 1 This is a schematic flowchart of a template matching method for semiconductor images according to an embodiment of the present invention. The method generally includes:

[0050] S100, obtain the template image and the image to be matched, where the template image and the image to be matched are wafer images;

[0051] S200: The template image and the image to be matched are segmented by a deep learning-based image segmentation model to obtain the template mask image corresponding to the template image and the image to be matched corresponding to the image to be matched.

[0052] S300 uses a template matching algorithm to determine the mask matching position of the template mask image in the mask image to be matched.

[0053] In this embodiment, the template image and the image to be matched are wafer images obtained by using a measurement and inspection device to acquire the wafer. The measurement and inspection device can be an imaging device based on optical or charged particle beams (e.g., electron beams) to acquire high-precision measured images of the wafer. For example, the template image and the image to be matched can be SEM images obtained by scanning the wafer using a scanning electron microscope. The template image can be a reference image, obtained by scanning the wafer sample with a rigorously calibrated scanning electron microscope. The wafer sample can have multiple reference patterns such as circles, rectangles, and long straight lines, and the reference patterns can be closed shapes.

[0054] The measurement accuracy of scanning electron microscopes (SEMs) decreases after prolonged use, requiring periodic calibration. This involves scanning a wafer sample with the SEM to be calibrated to obtain a matching image. By registering the template image and the matching image and calculating the difference between the corresponding patterns, the measurement error of the SEM can be determined, providing a basis for equipment calibration.

[0055] SEM images are typically grayscale images that contain all the scanning data of the wafer sample's measurement surface. In other words, they include pattern data of all reference patterns on the wafer sample, substrate data of the wafer sample (such as background pattern data), and noise data generated by the scanning electron microscope during the measurement process.

[0056] Since both template images and images to be matched contain massive amounts of data, traditional matching methods based on correlation, features, and edges are limited by their dependence on image features. Under complex and varied conditions such as fluctuating illumination intensity, scarce texture information, and blurred contour features, they struggle to comprehensively cover the feature dimensions of various images, leading to decreased matching accuracy due to interference. While deep learning-based matching methods possess autonomous feature extraction capabilities and can adapt to diverse image scenarios, they typically suffer from insufficient algorithm interpretability. When matching results deviate, they cannot effectively trace the root cause of the error, limiting their application in scenarios with high reliability requirements.

[0057] In this embodiment, the image segmentation model is used to perform image segmentation on the template image and the image to be matched. It extracts the pattern contour of the closed shape in the template image to obtain the template mask image, and extracts the pattern contour in the image to be matched to obtain the mask image to be matched.

[0058] Image segmentation models can be deep learning-based neural network models. Through training, they can have strong automated feature extraction capabilities, are not affected by image lighting, defocus, or other conditions, and extract mask images with good edge features, thus adapting to diverse image scenarios.

[0059] After obtaining the template mask image and the mask image to be matched, existing template matching algorithms or improved template matching algorithms can be used to perform image registration between the template mask image and the mask image to be matched. Compared with the original template image and the mask image to be matched, the template mask image and the mask image to be matched only retain the pattern outline region of the closed shape and are not affected by background and noise. Therefore, the amount of computation in the template matching process can be greatly reduced, and the matching accuracy between the template mask image and the mask image to be matched can be improved.

[0060] On the other hand, image segmentation models are only used for image segmentation of template images and images to be matched, and do not participate in image matching. Therefore, they have strong algorithmic interpretability during training and use. When the prediction results of the image segmentation model do not match expectations, the cause of the prediction error can be easily found through backtracking, allowing for targeted modifications or targeted training, continuously improving the reliability and stability of the image segmentation model.

[0061] The template matching method for semiconductor images in this embodiment constructs and uses a deep learning-based image segmentation model to segment the template image and the image to be matched. With strong algorithm interpretability, it obtains a mask image with good edge features, improving the adaptability to diverse image scenes. By using a template matching algorithm to register the template mask image and the image to be matched, the matching accuracy between them is improved.

[0062] In some embodiments of the template matching method of the present invention, such as Figure 2 As shown, the training methods for image segmentation models include:

[0063] S211, Obtain training data for model training. The training data includes a training set and a validation set. The training set includes multiple sample images, and the validation set includes sample mask images obtained by image segmentation of pattern regions in the sample images.

[0064] S213, Construct a deep learning model and train the deep learning model using training data to obtain an image segmentation model.

[0065] This embodiment is used to construct and train an image segmentation model based on a deep learning model. The training process may include four stages: data labeling, data format conversion, model training and parameter optimization, and saving the optimal model parameters. These are described below.

[0066] The data labeling stage is primarily used to acquire training data. Training data may include a training set, a validation set, and potentially a test set. The training set may include multiple sample images, such as sample template images and sample images to be matched. The validation set may include multiple sample mask images, such as sample template mask images obtained by image segmentation of sample template images, and sample match mask images obtained by image segmentation of sample images to be matched.

[0067] In some embodiments, such as Figure 3 As shown, the steps for obtaining sample mask images during the data labeling stage include:

[0068] S221, divide multiple pattern regions of the sample image into multiple pattern categories according to their shapes;

[0069] S223, use pixel labels that correspond one-to-one with the pattern category to mark the pixels in each pattern area;

[0070] S225, perform mask transformation on the sample image based on pixel labels to obtain the sample mask image.

[0071] Taking a sample image as an example, a labeling tool can be used to mark the pattern areas in the sample template image. First, according to the different pattern categories, the pixels of the sample template image are divided into different pattern areas. Pattern categories can include rectangular patterns, circular patterns, long straight line patterns, etc.

[0072] Please see Figure 4 , Figure 4 This is a schematic diagram of the frame line for pixel annotation of a sample image according to one embodiment. Figure 4 Each square in the diagram represents a pixel in the sample image. When labeling, an integer sequence can be used to label the pixels in the patterned regions of the sample template image. For example, integer 1 can be used as the pixel label to label pixels within a rectangular pattern, integer 2 as the pixel label to label pixels within a circular pattern, and integer 3 as the pixel label to label pixels within a long straight line pattern.

[0073] It is important to understand that wafer samples typically incorporate multiple reference patterns of different shapes and arrangements, enabling the assessment of scanning electron microscope (SEM) measurement errors from multiple dimensions. This embodiment, by labeling pixels in pattern regions of different shapes according to pattern categories and using them as corresponding mask patterns, restricts image segmentation to specific pattern categories. This reduces the complexity and computational load of the image segmentation model, thereby improving the accuracy of image segmentation.

[0074] Next, the labeled sample template image is converted into a mask image (i.e., a sample template mask image). In this process, the pixel labels in the sample template image are used as the corresponding pixel values, and the pixel values ​​of pixels without labels are set to 0. The size of the sample template mask image is the same as that of the original sample template image, and the sample template mask image can be saved in formats such as bmp or png.

[0075] Similarly, the sample images to be matched can be labeled to obtain the corresponding sample mask images to be matched. The size of the sample mask images to be matched is also the same as the size of the original sample images to be matched.

[0076] Next, we move on to the data format conversion stage, where the training and validation sets are preprocessed to improve data accuracy and meet the input requirements of deep learning models.

[0077] In some embodiments, such as Figure 5 As shown, the preprocessing steps for the sample image and sample mask image data during the data format conversion stage include:

[0078] S231, normalize the pixel values ​​of the sample image and the sample mask image;

[0079] S233, perform pixel expansion on the sample template image and the sample template mask image so that the sample template image, the sample template mask image, the sample image to be matched, and the sample image to be matched have the same size.

[0080] Specifically, the data of all sample images and sample mask images can be normalized by calculating the standard deviation and variance of the images, so that the pixel values ​​are within the range of [0,1].

[0081] It's important to understand that the size of the sample template image is typically smaller than the size of the sample image to be matched, and the size of the sample template mask image is also smaller than the size of the sample image to be matched. However, current mainstream deep learning models usually require the input images to have the same size (i.e., the length and width of the images are the same). Therefore, after normalizing the pixel values ​​of the sample image and the sample mask image, further processing is needed to ensure that the sample template image, sample template mask image, sample image to be matched, and sample image to be matched all have the same size.

[0082] For example, the bilinear interpolation algorithm can be used to pixel-expand the sample template image and sample template mask image, so that the sample template image and sample template mask image are enlarged to the same size as the sample template mask image and the sample mask image to be matched. The bilinear interpolation algorithm estimates the values ​​of unknown points by performing linear interpolation in two directions sequentially. The algorithm calculation process is relatively simple, and the enlarged image has good smoothness characteristics, which is especially suitable for the enlargement of the sample template image and sample template mask image in this embodiment.

[0083] Next, we move on to the model training and parameter optimization phase.

[0084] Traditional image segmentation algorithms typically use low-level image features (such as color, texture, and edges), which have significant limitations when applied to semiconductor SEM images. The main reason is that semiconductor SEM images contain many types of noise, and fixed algorithms cannot cover the needs of new application scenarios in real time. For example, some images exhibit significant brightness variations over a large area due to uneven electron dosing; using a single threshold will prevent the algorithm from completely segmenting the patterned regions. Deep learning algorithms, on the other hand, are highly robust to noise interference. Based on learning from existing noisy samples, neural networks can accurately extract patterned regions, thus avoiding the noise sensitivity of traditional methods.

[0085] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the frame of an image segmentation model training according to an embodiment. The input to the image segmentation model 410 is a sample image (including a sample image to be matched 401 and a sample template image 403 obtained by pixel expansion of the original sample template image 402). The output of the image segmentation model 410 is a mask image (including a mask image 421 to be matched corresponding to the sample image to be matched 401 and a template mask image 422 corresponding to the sample template image 403). Each time the image segmentation model 410 outputs the mask image 421 to be matched and the template mask image 422, it compares them with the sample mask image 431 to be matched and the sample template mask image 432 in the validation set, respectively. Based on the comparison results, the network parameters of the image segmentation model are adjusted, and the mask image 421 to be matched and the template mask image 422 are regenerated.

[0086] The mask images (mask image to be matched 421, template mask image 422) are the image segmentation results predicted by the image segmentation model 410, and their format is consistent with the sample mask images (sample mask image to be matched 431, sample template mask image 432). Since the mask images are the results predicted by the model, their content differs slightly from the sample template mask images. The purpose of the image segmentation model 410 is to make the mask images predicted by the model close to the sample mask images. Generally, the closer the pixel values ​​of the mask image are to the sample mask image, the more the predicted result matches the true value, and the higher the prediction accuracy of the model.

[0087] In some embodiments, such as Figure 6As shown, the image segmentation model 410 adopts the U-Net architecture, which includes an encoder 411 and a decoder 412. The core idea of ​​the image segmentation model 410 is to extract multi-level image features through the encoder 411, and then gradually restore spatial details and complete pixel-level classification through the decoder 412. The encoder 411 encodes the image, extracts deep features of the image, and simplifies the image features layer by layer. The decoder 412 fuses the deep features of the image generated by the encoder 411 and generates a mask map corresponding to the image.

[0088] Specifically, the encoder can use a ConvNeXt-based network model, including a multi-level downsampling structure, where each level progressively reduces spatial resolution and increases the number of channels. The encoder can use depthwise separable convolutions instead of standard convolutions, mapping the spatial and channel dimensions separately and combining the results to improve the network's representational ability in the channel dimension. The encoder can employ the GELU activation function and channel normalization methods to improve training stability. The encoder's output is a multi-layered image feature set; the upper layer features reflect local features such as edges and textures, while the lower layer features reflect the categories of objects in the image, encompassing the overall features of the image.

[0089] The decoder can use a network model based on UpperNet, including multi-level upsampling structures. Each upsampling layer is connected to its corresponding downsampling layer by skip connections. It fuses image features from each layer of the encoder through a layer-by-layer feature concatenation method. Since the feature dimensions of each layer are inconsistent, the decoder first unifies the feature dimensions, for example, by using 1×1 convolutions to expand the dimensions of each layer to the same size. During feature concatenation, the decoder can use bilinear interpolation to expand the feature size, ensuring that the feature sizes of different layers are consistent. When the feature dimensions and sizes of each layer are consistent, all feature vectors are superimposed at the dimensional level to obtain the fused feature representation.

[0090] The decoder can use depthwise separable convolutions to further process the fused features to obtain the final predicted mask image. For example, a 3×3 depthwise convolution is first used to reduce the dimensionality of the fused features and further extract spatial features, and then a 1×1 pointwise convolution is used to reduce the feature dimension to a preset dimension. The preset feature dimension is the number of pattern categories or the number of pixel labels.

[0091] During training, a loss function can be established between the predicted mask image and the sample mask image. This loss function can be represented using a general segmentation network loss function; for example, the prediction loss function for a single sample... It can be represented as:

[0092]

[0093] in, Represents a set of image categories. The predicted mask image is the first one. In the layer The element (pixel value) corresponding to the position. The sample mask image represents the first In the layer The element corresponding to the position; This represents a minimum value and is used to prevent division by zero errors.

[0094] For example, the overall loss function of the model The average of the loss functions for all samples:

[0095]

[0096] Where B represents the total sample size. Indicates the first The loss per sample.

[0097] In some embodiments, training, validation, and test sets can be set in the training data, and the training data can be split. For example, the training, validation, and test sets can be divided in a 3:1:1 ratio. The dynamic optimizer Adam is used to optimize the model, setting appropriate learning rate and momentum decay parameters. During training, the training set is used to optimize the network parameters, the validation set is used to determine the optimal network parameters, and the test set is used to validate the final results. The optimal network parameters are serialized and stored as a parameter file, which is used for mask image prediction in the subsequent matching process.

[0098] In some embodiments of the template matching method of the present invention, after the step of performing image segmentation on the template image and the image to be matched using a deep learning-based image segmentation model to obtain the template mask image corresponding to the template image and the image to be matched corresponding to the image to be matched, the method further includes:

[0099] The template mask image and the mask image to be matched are optimized. The optimization process includes smoothing based on edge blurring operators and / or elimination of isolated pixels based on morphological operators.

[0100] Image segmentation models may produce jagged edges in the mask images obtained from image segmentation, and some regions may have independent pixels. These defects may affect the accuracy of subsequent template matching.

[0101] In this embodiment, an edge blurring operator is used to smooth the image and remove abnormal points on the edges. The edge blurring operator can be, for example, Gaussian filtering, median filtering, or diffusion filtering; no specific limitation is made here.

[0102] In this embodiment, morphological operators are used to eliminate individual pixels. Morphological operators can include, for example, erosion algorithms, dilation algorithms, hole-filling algorithms, etc., and are not limited here.

[0103] In some embodiments of the template matching method of the present invention, such as Figure 7 As shown, the template matching algorithm is used to determine the mask matching position of the template mask image in the mask image to be matched, including:

[0104] S311, slide the template mask image on the mask image to be matched, and calculate the cross-correlation coefficient of each sliding window on the template mask image and the mask image to be matched one by one;

[0105] S313, select the one with the highest cross-correlation coefficient among all sliding windows, and use the position of the one with the highest cross-correlation coefficient as the mask matching position.

[0106] Compared to template matching using the original image, template matching using a mask image involves only the patterned region and is not affected by background noise, resulting in higher template matching accuracy.

[0107] In this embodiment, the template matching method uses a method for calculating mask pixel similarity, such as a method based on cross-correlation coefficients.

[0108] Specifically, a sliding method is used to find the optimal matching position. The template mask image slides across the mask image to be matched. For example, starting from the top left corner, it slides horizontally first. After reaching the right end, the position of the mask image drops one row and returns to the left end of the mask image to be matched, then slides to the right again. Each time the position changes, the sliding windows of the template mask image and the mask image to be matched are cross-correlation coefficients calculated. After the calculation is completed, the coordinates corresponding to the highest cross-correlation coefficient are selected as the optimal matching position.

[0109] For example, cross-relationship number The calculation formula is:

[0110]

[0111] in, , There are two images. , This represents the average pixel value of the two images.

[0112] In some embodiments of the template matching method of the present invention, such as Figure 8 As shown, the template matching algorithm is used to determine the mask matching position of the template mask image in the mask image to be matched, including:

[0113] S321, Fourier transform is used to convert the spatial domain gray-level distribution of the template mask image and the mask image to be matched into frequency components in the frequency domain, so as to obtain the cross power spectrum of the template mask image and the mask image to be matched.

[0114] S323, determine the relative displacement of the template mask image and the mask image to be matched based on the peak position of the cross power spectrum, so as to obtain the mask matching position of the template mask image on the mask image to be matched.

[0115] In this embodiment, the template matching method adopts the phase correlation correction calculation method. Its calculation principle is to use the Fourier transform method to calculate the cross power spectrum of the template mask image and the mask image to be matched in the frequency domain, and finally find the relative displacement of the two images.

[0116] For example, cross power spectrum The calculation formula is:

[0117]

[0118] in, , There are two images. It is the Fourier transform function. For Hadama accumulation, Indicates complex conjugation.

[0119] The flowchart provided in this embodiment is not intended to indicate that the operations of the method will be performed in any particular order, or that all operations of the method are included in every case. Furthermore, the method may include additional operations. Within the scope of the technical concept provided by the method in this embodiment, additional variations can be made to the above method.

[0120] It should be understood that in some embodiments, the components may be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods may be implemented using software or firmware stored in memory and executed by a suitable instruction execution system.

[0121] This invention also provides a computer program product 10, a computer-readable storage medium 20, and a computer device 30. Figure 9 This is a schematic diagram of a computer program product 10 according to an embodiment of the present invention. Figure 10 This is a schematic diagram of a computer-readable storage medium 20 according to an embodiment of the present invention. Figure 11This is a schematic diagram of a computer device 30 according to an embodiment of the present invention. The computer program product 10 includes a computer program 11, which, when executed by the processor 32, implements the steps of the template matching method for semiconductor images described above. A computer-readable storage medium 20 stores the computer program 11 thereon, which, when executed by the processor 32, implements the steps of the template matching method for semiconductor images described above. The computer device 30 may include a memory 31, a processor 32, and the computer program 11 stored in the memory 31 and running on the processor 32.

[0122] The computer program 11 used to perform the operations of this invention may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages ​​and procedural programming languages. The computer program 11 may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, to perform aspects of this invention, electronic circuits, including, for example, programmable logic circuits, Field-Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), may execute computer-readable program instructions to personalize the electronic circuits by utilizing state information from computer-readable program instructions.

[0123] For the purposes of this embodiment, computer program product 10 is a related product that includes computer program 11.

[0124] For the purposes of this embodiment, the computer-readable storage medium 20 is a tangible device capable of holding and storing a computer program 11. It can be any device capable of containing, storing, communicating, propagating, or transmitting the computer program 11 for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable storage medium 20 include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical encoding device, and any suitable combination thereof.

[0125] Computer device 30 can be, for example, a server, desktop computer, laptop computer, tablet computer, or smartphone. In some examples, computer device 30 can be a cloud computing node. Computer device 30 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer device 30 can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can reside on local or remote computing system storage media, including storage devices.

[0126] Computer device 30 may include a processor 32 adapted to execute stored instructions and a memory 31 that provides temporary storage space for the operation of said instructions during operation. The processor 32 may be a single-core processor, a multi-core processor, a computing cluster, or any other configuration. The memory 31 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.

[0127] Computer device 30 may also include a network adapter / interface and an input / output (I / O) interface. The I / O interface allows external devices that can be connected to the computer device to input and output data. The network adapter / interface provides communication between the computer device and a network, typically represented as a communication network.

[0128] Therefore, those skilled in the art should recognize that although numerous exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications conforming to the principles of the present invention can be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Thus, the scope of the present invention should be understood and construed as covering all such other variations or modifications.

Claims

1. A template matching method for semiconductor images, characterized in that, include: Obtain a template image and a matching image, wherein the template image and the matching image are wafer images; The template image and the image to be matched are segmented using a deep learning-based image segmentation model to obtain a template mask image corresponding to the template image and a matching mask image corresponding to the image to be matched. The template matching algorithm is used to determine the mask matching position of the template mask image in the mask image to be matched.

2. The template matching method according to claim 1, characterized in that, The training method for the image segmentation model includes: Acquire training data for model training. The training data includes a training set and a validation set. The training set includes multiple sample images, and the validation set includes sample mask images obtained by image segmentation of pattern regions in the sample images. A deep learning model is constructed, and the deep learning model is trained using the training data to obtain the image segmentation model.

3. The template matching method according to claim 2, characterized in that, The image segmentation model adopts the U-Net architecture, which includes an encoder and a decoder. The encoder includes a multi-level downsampling structure, which uses depthwise separable convolution to map the input image in both the spatial and channel dimensions, thereby extracting multi-level image features. The decoder includes a multi-level upsampling structure, with each upsampling structure being connected to a corresponding downsampling structure in a skip connection. The upsampling structure is used to fuse the multi-level image features of the encoder and to process the fused features using depthwise separable convolution to obtain a mask image of the input image.

4. The template matching method according to claim 2, characterized in that, The steps for obtaining the sample mask image include: The sample image is divided into multiple pattern categories according to its shape. Use pixel labels that correspond one-to-one with the pattern category to mark the pixels within each pattern area; The sample image is masked based on the pixel labels to obtain the sample mask image.

5. The template matching method according to claim 4, characterized by, The sample image includes a sample template image and a sample image to be matched, wherein the size of the sample template image is smaller than the size of the sample image to be matched; the sample mask image includes a sample template mask image and a sample image to be matched. and After the step of performing mask transformation on the sample image based on the pixel labels to obtain the sample mask image, the method further includes: The pixel values ​​of the sample image and the sample mask image are normalized. The sample template image and the sample template mask image are pixel-expanded so that the sample template image, the sample template mask image, the sample image to be matched, and the sample image to be matched have the same size.

6. The template matching method according to claim 1, characterized in that, After the step of performing image segmentation on the template image and the image to be matched using a deep learning-based image segmentation model to obtain the template mask image corresponding to the template image and the matching mask image corresponding to the image to be matched, the method further includes: The template mask image and the mask image to be matched are optimized, including smoothing based on edge blurring operators and / or elimination of isolated pixels based on morphological operators.

7. The template matching method according to claim 1, characterized in that, The step of using a template matching algorithm to determine the mask matching position of the template mask image in the mask image to be matched includes: The template mask image is slid across the mask image to be matched, and the cross-correlation coefficient between each sliding window on the template mask image and the mask image to be matched is calculated one by one; Select the window with the highest cross-correlation coefficient among the sliding windows, and use the position of the window with the highest cross-correlation coefficient as the mask matching position.

8. The template matching method according to claim 1, characterized in that, The step of using a template matching algorithm to determine the mask matching position of the template mask image in the mask image to be matched includes: The spatial domain grayscale distribution of the template mask image and the mask image to be matched is transformed into frequency components in the frequency domain using Fourier transform, thereby obtaining the cross power spectrum of the template mask image and the mask image to be matched. The relative displacement between the template mask image and the mask image to be matched is determined based on the peak position of the cross power spectrum, so as to obtain the mask matching position of the template mask image on the mask image to be matched.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the template matching method according to any one of claims 1 to 8.

10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the template matching method according to any one of claims 1 to 8.