Wafer defect detection method and device based on lightweight target detection model

By improving the YOLOv8 network and combining structural re-parameterization technology, the problem of false positives and missed detections in MiniLED wafer defect detection has been solved, the detection accuracy and speed have been improved, and the industrial real-time detection needs have been met.

CN118334032BActive Publication Date: 2024-08-27HUAQIAO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410765185.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-08-27
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Existing Mini LED wafer defect detection methods have problems with false positives or missed detections when processing large-scale data and complex defect conditions. Moreover, their computational complexity and running speed are limited, making it difficult to meet the needs of real-time detection.

Method used

A wafer defect detection method based on a lightweight target detection model is adopted. By improving the YOLOv8 network, a multi-branch cross-layer aggregation module and a multi-branch cross-layer aggregation feature pyramid network are designed, combined with structural re-parameterization and local network gradient multiplexing technology, to reduce Compute volume and enhance feature extraction capabilities.

Benefits of technology

It improves the accuracy and speed of defect detection, reduces the amount and complexity of model parameters, meets the real-time requirements of industrial detection, and achieves efficient identification of complex defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334032B
    Figure CN118334032B
Patent Text Reader

Abstract

The invention discloses a wafer defect detection method and device based on a lightweight target detection model, which relates to the field of target detection, and comprises: constructing a wafer defect detection model and training it to obtain a trained wafer defect detection model, wherein the wafer defect detection model comprises a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network and a partial convolution detection head network, wherein the multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace a C2F module with an MBGB module on the basis of a feature extraction network and a path aggregation network of a YOLOv8 network, and replace a CBS module after the C2F module with a downsampling module, wherein the partial convolution detection head network replaces the first CBS module of a regression head and a classification head with a Pconv module on the basis of a detection head network of a YOLOv8 network; and the preprocessed wafer image is input into the trained wafer defect detection model to obtain a defect detection result, thereby solving the problems of large calculation amount and low accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection, and in particular to a wafer defect detection method and device based on a lightweight target detection model. Background Art

[0002] In recent years, with the rise of MiniLED technology, its application prospects in display screens, lighting systems and other fields are broad. However, common defects in the production process of MiniLED wafers, such as scratches and blistering, have a direct impact on product quality and performance. Traditional defect detection methods often rely on manual visual inspection or traditional rule-based machine learning algorithms, but have limitations in processing large-scale data and complex defect situations. In recent years, defect detection models based on deep learning technology have made significant progress, but their computational complexity and running speed are still limited.

[0003] The introduction of lightweight neural network technology provides a new solution for MiniLED wafer defect detection. It has a simple structure, fewer parameters, and fast running speed. It has good applicability on embedded devices with limited computing resources and can meet the needs of real-time detection. Although lightweight neural networks have advantages on resource-constrained embedded devices, existing models often perform poorly when faced with complex defect images, and are prone to false alarms or missed detections. Summary of the invention

[0004] The purpose of this application is to propose a wafer defect detection method and device based on a lightweight target detection model to address the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a wafer defect detection method based on a lightweight target detection model, comprising the following steps:

[0006] Acquire a wafer image, preprocess the wafer image, and obtain a preprocessed wafer image;

[0007] A wafer defect detection model based on an improved YOLOv8 network is constructed and trained to obtain a trained wafer defect detection model. The wafer defect detection model includes a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network, and a partial convolutional detection head network. The multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace the C2F module with a multi-branch cross-layer aggregation module on the basis of the feature extraction network of the YOLOv8 network and the path aggregation network with the feature pyramid network, and replace the CBS module after the C2F module with a downsampling module. The partial convolutional detection head network replaces the first CBS module of the regression head and the classification head with a Pconv module on the basis of the detection head network of the YOLOv8 network.

[0008] The preprocessed wafer image is input into the trained wafer defect detection model to obtain the defect detection result.

[0009] Preferably, the multi-branch cross-layer aggregation module includes a first CBS layer, a dimension splitting layer, a first residual multi-branch layer, a second CBS layer, a second residual multi-branch layer, a third CBS layer, a splicing layer and a fourth CBS layer connected in sequence. The input features of the multi-branch cross-layer aggregation module pass through the first CBS layer to obtain the first feature. The dimension splitting layer divides the first feature into the second feature and the third feature in half according to the channel. The third feature passes through the first residual multi-branch layer and the second CBS layer to obtain the fourth feature. The fourth feature passes through the second residual multi-branch layer and the third CBS layer to obtain the fifth feature. The second feature, the third feature, the fourth feature and the fifth feature are dimensionally merged through the splicing layer to obtain the output feature of the multi-branch cross-layer aggregation module.

[0010] Preferably, the first residual multi-branch layer and the second residual multi-branch layer both adopt the RMB structure. The RMB structure adopts the structure reparameterization technology and has different structures at different stages. In the training stage, the calculation process is as follows:

[0011] ;

[0012] In the inference phase, the calculation process is as follows:

[0013] ;

[0014] Among them, CBS(•) represents the function corresponding to the CBS structure, It is the input feature map of RMB structure; , , , It is the intermediate feature map of RMB structure; It is the output feature map of RMB structure; Represents the function corresponding to the batch normalization layer; represents the silu activation function; Avg is the average pooling operation; Represents a convolution layer with a convolution kernel size of 1×1; Represents a convolution layer with a convolution kernel size of k×k; Concat is a dimension merging operation; It is a convolutional layer with a kernel size of k×k after the structure is re-parameterized.

[0015] Preferably, the first CBS layer, the second CBS layer, the third CBS layer and the fourth CBS layer all adopt a CBS structure, and the CBS structure includes a convolution layer with a convolution kernel size of 3×3, a batch normalization layer and a silu activation function layer connected in sequence.

[0016] Preferably, the Pconv module is used to perform a convolution operation on a portion of the channels of the input features of the Pconv module, and not perform any processing on another portion of the channels.

[0017] Preferably, the preprocessing method includes adjusting the size of the wafer image, image normalization, channel adjustment and image filling.

[0018] In a second aspect, the present invention provides a wafer defect detection device based on a lightweight target detection model, comprising:

[0019] An image acquisition module is configured to acquire a wafer image, preprocess the wafer image, and obtain a preprocessed wafer image;

[0020] A model building module is configured to build and train a wafer defect detection model based on an improved YOLOv8 network to obtain a trained wafer defect detection model, wherein the wafer defect detection model includes a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network, and a partial convolutional detection head network. The multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace the C2F module with a multi-branch cross-layer aggregation module on the basis of the feature extraction network of the YOLOv8 network and the path aggregation network with the feature pyramid network, and replace the CBS module after the C2F module with a downsampling module. The partial convolutional detection head network replaces the first CBS module of the regression head and the classification head with a Pconv module on the basis of the detection head network of the YOLOv8 network.

[0021] The prediction module is configured to input the preprocessed wafer image into the trained wafer defect detection model to obtain a defect detection result.

[0022] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0023] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0024] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] (1) The wafer defect detection method based on the lightweight target detection model proposed in this invention designs an MBGB module by combining the ideas of structural reparameterization and cross-stage local network gradient reuse. The MBGB module achieves higher parameter utilization efficiency by adjusting the gradient propagation path.

[0027] (2) The wafer defect detection method based on the lightweight target detection model proposed in the present invention applies the MBGB module to the feature extraction network of the YOLOv8 network, enriches the gradient flow of the feature extraction network, and reduces the amount of calculation. In addition, based on the MBGB module, a new multi-branch cross-layer aggregation feature pyramid network and a partial convolution detection head network are designed on the basis of the path aggregation network with a feature pyramid network of the YOLOv8 network to enhance the multi-scale fusion of defect features.

[0028] (3) The wafer defect detection method based on the lightweight target detection model proposed in the present invention improves the industrial defect detection accuracy while reducing the number of model parameters and complexity, thereby increasing the detection speed and meeting the real-time requirements of industrial detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 A schematic diagram of a process flow of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0031] Figure 2 A schematic diagram of a labeled wafer image of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0032] Figure 3 A schematic diagram of a wafer defect detection model of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0033] Figure 4 A structural schematic diagram of an MBGB module of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0034] Figure 5 A schematic diagram of an RMB structure in the training phase of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0035] Figure 6A schematic diagram of an RMB structure in the reasoning stage of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0036] Figure 7 A schematic diagram of the structure of a partial convolution detection head network of a wafer defect detection method based on a lightweight target detection model according to an embodiment of the present application;

[0037] Figure 8 This is a diagram showing the detection effect of a wafer defect detection method based on a lightweight target detection model for a mini-LED wafer defect target according to an embodiment of the present application;

[0038] Fig. 9 A schematic diagram of a wafer defect detection device based on a lightweight target detection model according to an embodiment of the present application;

[0039] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] Figure 1 A wafer defect detection method based on a lightweight target detection model provided by an embodiment of the present application is shown, comprising the following steps:

[0042] S1, acquiring a wafer image, and preprocessing the wafer image to obtain a preprocessed wafer image.

[0043] In a specific embodiment, the preprocessing method includes adjusting the size of the wafer image, image normalization, channel adjustment and image filling.

[0044] Specifically, in the training phase, a microscope is used to obtain wafer images and annotate them, such as Figure 2 As shown, the annotation format is txt format. In one embodiment, the wafer image is preprocessed and cleaned, including removing useless defect data, adjusting the size of the wafer image taken by the microscope to 640×640 pixels and rotating it, and adjusting the contrast and other operations to obtain training data. In the inference stage, the size of the wafer image taken by the microscope is adjusted to 640×640 pixels, and image normalization, channel adjustment, image filling and other operations are performed. In other embodiments, the preprocessing process can be adjusted according to actual needs.

[0045] S2, construct and train a wafer defect detection model based on the improved YOLOv8 network to obtain a trained wafer defect detection model. The wafer defect detection model includes a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network and a partial convolutional detection head network. The multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace the C2F module with a multi-branch cross-layer aggregation module on the basis of the feature extraction network of the YOLOv8 network and the path aggregation network with the feature pyramid network, and replace the CBS module after the C2F module with a downsampling module. The partial convolutional detection head network replaces the first CBS module of the regression head and the classification head with a Pconv module on the basis of the detection head network of the YOLOv8 network.

[0046] In a specific embodiment, the multi-branch cross-layer aggregation module includes a first CBS layer, a dimension splitting layer, a first residual multi-branch layer, a second CBS layer, a second residual multi-branch layer, a third CBS layer, a splicing layer and a fourth CBS layer connected in sequence. The input features of the multi-branch cross-layer aggregation module pass through the first CBS layer to obtain the first feature. The dimension splitting layer divides the first feature into the second feature and the third feature in half according to the channel. The third feature passes through the first residual multi-branch layer and the second CBS layer to obtain the fourth feature. The fourth feature passes through the second residual multi-branch layer and the third CBS layer to obtain the fifth feature. The second feature, the third feature, the fourth feature and the fifth feature are dimensionally merged through the splicing layer to obtain the output feature of the multi-branch cross-layer aggregation module.

[0047] Specifically, refer to Figure 3 , the wafer defect detection model based on the improved YOLOv8 network is improved on the basis of the YOLOv8 network. In one embodiment, the wafer defect detection model is improved on the basis of YOLOv8m. In other embodiments, other types of YOLOv8 networks can also be used. The multi-branch cross-layer aggregation (MBGB) module replaces the C2F module, and the CBS module after the C2F module is replaced with a downsampling module, so as to design a lightweight branch cross-layer aggregation feature extraction network (MBGB-net) and an efficient multi-branch cross-layer aggregation feature pyramid network (MBGB-FPN). At the same time, a new lightweight detection head network PConv-HEAD is designed to replace the detection head of YOLOv8m. Therefore, the wafer defect detection model belongs to a lightweight target detection model.

[0048] Furthermore, the branch cross-layer aggregation feature extraction network (MBGB-net) extracts feature information from wafer images through a multi-branch cross-layer aggregation (MBGB) module and outputs feature maps T1, T2, and T3.

[0049] Specifically, the branch cross-layer aggregation feature extraction network (MBGB-net) includes: the first layer is a CBS module, which uses a convolution layer with 64 channels and a convolution kernel size of 3×3 to perform a convolution operation on the input wafer image, obtains a feature map of 64 channels, and reduces it to half of the original size. The second layer is a CBS module, which uses a convolution layer with 128 channels and a convolution kernel size of 3×3 to further convolve the feature map, obtains a feature map of 128 channels, and reduces it to half of the original size again. The CBS modules all adopt a CBS structure, that is, the batch normalization layer (BN) and the silu activation function layer are connected in sequence after the convolution layer. The third layer is an MBGB module, which fuses feature maps of different scales, and the number of channels is 128. The fourth layer is a downsampling module, which uses 256 channels to perform a convolution operation on the feature map, obtains a feature map of 256 channels, and reduces it to half of the original size again. The fifth layer is the MBGB module, which further fuses the feature map, with a channel number of 256, and outputs the feature map T3. The sixth layer is the downsampling module, which uses 512 channels to perform convolution operations on the feature map T3, obtains a feature map of 512 channels, and reduces it to half of its original size again. The seventh layer is the MBGB module, which further fuses the feature map, with a channel number of 512, and outputs the feature map T2. The eighth layer is the downsampling module, which uses 1024 channels to perform convolution operations on the feature map T2, obtains a feature map of 512 channels, and reduces it to half of its original size again. The ninth layer is the MBGB module, which fuses feature maps of different scales, with a channel number of 1024. The tenth layer is the SPPF module, which uses a spatial pyramid pooling operation of 1024 channels to extract features from different scales, capture the detailed information of the target object at different scales, and outputs the feature map T1.

[0050] like Figure 4 As shown in the figure, the MBGB module enriches the gradient flow by integrating the changes of gradient information from beginning to end into the feature map, which reduces the amount of calculation while ensuring accuracy, making it suitable for running on resource-constrained devices. The specific structure is as follows: The first feature Input features of the MBGB module After the first CBS layer, the first feature After the dimension splitting layer, it is divided into the second feature in half according to the number of channels and the third feature , the third feature After the first residual multi-branch layer and the second CBS layer, the fourth feature is obtained , the fourth characteristic After the second residual multi-branch layer and the third CBS layer, we get Finally, the feature maps containing different information are concatenated through the concatenation layer. , , , After the dimensions are combined, the output features are obtained through the fourth CBS layer. The calculation formula for extracting features from the MBGB module is as follows:

[0051] ;

[0052] ;

[0053] ;

[0054] In the formula, It is the input feature of MBGB module; , , , and It is the intermediate feature map of the MBGB module; is the output feature; concat is the dimension merging operation; chunk is the dimension splitting operation; CBS is the CBS structure, which includes a convolution layer with a convolution kernel size of 3×3, a batch normalization layer (Batch normal) and a silu activation function.

[0055] In a specific embodiment, both the first residual multi-branch layer and the second residual multi-branch layer adopt the RMB structure. The RMB structure adopts the structure reparameterization technology and has different structures at different stages. In the training stage, the calculation process is as follows:

[0056] ;

[0057] In the inference phase, the calculation process is as follows:

[0058] ;

[0059] Among them, CBS(•) represents the function corresponding to the CBS structure, It is the input feature map of RMB structure; , , , It is the intermediate feature map of RMB structure; It is the output feature map of RMB structure; Represents the function corresponding to the batch normalization layer; represents the silu activation function; Avg is the average pooling operation; Represents a convolution layer with a convolution kernel size of 1×1; Represents a convolution layer with a convolution kernel size of k×k; Concat is a dimension merging operation; It is a convolutional layer with a kernel size of k×k after the structure is re-parameterized.

[0060] In a specific embodiment, the first CBS layer, the second CBS layer, the third CBS layer and the fourth CBS layer all adopt a CBS structure, and the CBS structure includes a convolution layer with a convolution kernel size of 3×3, a batch normalization layer and a silu activation function layer connected in sequence.

[0061] Specifically, the residual multi-branch (RMB) structure is a module that uses the structure reparameterization technology and has different structures at different stages. In the training stage, for example Figure 5 As shown in the figure, there is a main branch and four sub-branches. The four sub-branches are 1×1 convolution branch; 1×1 - K×K convolution branch; 1×1 - average pooling branch; K×K convolution branch. Each branch operation has a different receptive field and computational complexity, which can greatly enrich the feature space of the entire module. In the inference stage, Figure 6 As shown in the figure, the four sub-branches are merged into the main branch, and each RMB structure in the MBGB module is converted into a K×K convolution with a nonlinear activation function, which can greatly reduce the space complexity and computational complexity of the entire module.

[0062] The structural reparameterization technology is mainly reflected in the M3 feature map. The mathematical relationship of the M3 feature map from the training stage to the inference stage is transformed as follows:

[0063] :

[0064] ;

[0065] ;

[0066] Batch Normal represents the batch normalization operation. The specific process is: by normalizing the input data of each batch to have zero mean and unit variance, the impact of changes in input data on the training process is reduced.

[0067] Will Substitute into In , we can get the following formula:

[0068] ;

[0069] ;

[0070] In the formula, is the weight of the convolutional module, are input features, is the mean of the input features, is the variance of the input feature, is the minimum value to prevent zero-point division. is the scale parameter of the input feature, is the shift parameter of the input feature, is the output feature during inference, is the output feature during training.

[0071] : Simply set the convolution kernel pad to 1 to achieve 0 padding.

[0072] : Average pooling is to calculate the mean of all elements within a kernel window, which can be represented by a convolutional layer, where the weight of each position in the convolution kernel is set to the inverse of the number of window elements: ( is the height of the convolution kernel, is the width of the convolution kernel). The weighted result of all elements in the entire window is the average.

[0073] :

[0074] ;

[0075] ;

[0076] ;

[0077] In the formula, is the weight after the first convolutional layer, is the weight after the second convolutional layer, X is the input parameter, is the output bias after the first convolutional layer, is the output bias after the second convolutional layer, and y is the output after the addition of two convolution operations. is the output after the first convolutional layer, is the output after the second convolutional layer.

[0078] According to the above formula, the calculation formula of the feature map M3 in the training phase can be equivalently converted into the calculation formula of the feature map M3 in the inference phase to complete the process of structural reparameterization.

[0079] Furthermore, a multi-branch cross-layer aggregated feature pyramid network (MBGB-FPN) in the wafer defect detection model is established, such as Figure 3As shown in the figure, in MBGB-FPN, the feature maps T1, T2, and T3 output by MBGB-net are subjected to multi-scale feature fusion by the MBGB module to obtain feature maps R1, R2, and R3.

[0080] The specific fusion process of the multi-branch cross-layer aggregated feature pyramid network (MBGB-FPN) is as follows:

[0081] (a) T1 feature map after upsampling module and T2 feature map Figure 1 The input concatenation layer performs dimension concatenation operation to obtain feature map C2;

[0082] (b) Feature map C2 after MBGB module and upsampling module and T3 feature map Figure 1 The input concatenation layer performs dimension concatenation operation to obtain feature map C3;

[0083] (c) Feature map C2 and C3 after the MBGB module and downsampling module are input into the concatenation layer for dimensional concatenation to obtain feature map C4;

[0084] (d) The feature map T1 and C4 after the MBGB module and the downsampling module are input into the concatenation layer for dimensional concatenation to obtain the feature map C1;

[0085] (e) Feature map R3 is obtained by passing feature map C3 through the MBGB module; feature map R2 is obtained by passing feature map C4 through the MBGB module; feature map R1 is obtained by passing feature map C1 through the MBGB module.

[0086] The specific mathematical expression is:

[0087] ;

[0088] ;

[0089] ;

[0090] ;

[0091] ;

[0092] In the formula, Concat represents the dimension concatenation operation corresponding to the concatenation layer. Indicates the upsampling operation corresponding to the upsampling module, It represents the downsampling operation corresponding to the downsampling module, and EBGB represents the function corresponding to the EBGB module.

[0093] In a specific embodiment, the Pconv module is used to perform a convolution operation on a portion of the channels of the input features of the Pconv module, and not perform any processing on another portion of the channels.

[0094] Specifically, refer to Figure 7 , the PConv module replaces the first CBS module of the detection head network of the traditional YOLOv8 network. The PConv module in the PConv-HEAD detection head only needs to apply conventional convolution on some input channels to extract spatial features, and the remaining channels are not processed. The feature maps R1, R2, and R3 after MBGB-FPN are respectively input into the detection head network to identify and locate defects of different categories; using the redundancy of the input feature map, the convolution operation is performed on some channels to further optimize the cost while keeping other channels unchanged. The classification branch is trained using the BCE loss function, and the regression branch is trained using the Distribution Focal loss function and the CIOU loss function.

[0095] The wafer defect detection model is trained using the Adaw optimizer with a learning rate of 0.001. The training data is divided into a training set, a validation set, and a test set according to the set ratio. The wafer images in the training set are input into the wafer defect detection model, and the trained wafer defect detection model is deployed and applied to realize the detection of mini-LED wafer defects, such as Figure 8 shown.

[0096] Next, we conduct an ablation experiment on the wafer defect detection model, analyze and count the wafer defect detection results, and understand the performance advantages of the high-real-time lightweight network for Mini-LED wafer defect detection. The results are shown in Table 1.

[0097] Table 1 Comparison of module ablation experiment results:

[0098]

[0099] When MBGB-net is added to the baseline network, mAP50 and mAP50:95 are improved by 1.9% and 2.9% respectively, using only 72% of the parameters and 65.6% of the computation of the baseline, and the frame rate is improved by 59% compared to the baseline.

[0100] When MBGB-FPN is added to the baseline network, mAP50 and mAP50:95 are increased by 1.2% and 1.1% respectively, and the frame rate is increased by 97.6% compared to the baseline, using only 47% of the parameters and 44.9% of the computational effort of the baseline. Compared with the method of only replacing MBGB-net, the number of parameters is reduced by 34.5%, the computational effort is reduced by 31.6%, and the frame rate is increased by 38.6%.

[0101] When PConv-HEAD is added to the baseline network, mAP50 and mAP50:95 are improved by 1.9% and 2.0% respectively, and the frame rate is improved by 136.7 compared with the baseline, using only 36.1% of the parameters and 27.4% of the computation of the baseline. Compared with the method of only replacing MBGB-net and MBGB-FPN, the number of parameters is reduced by 38.7%, the amount of computation is reduced by 47.15%, and the frame rate is improved by 39.1.

[0102] The above ablation experiments verify that the performance of the wafer defect detection model proposed in the embodiment of the present application is superior.

[0103] S3, inputting the preprocessed wafer image into the trained wafer defect detection model to obtain a defect detection result.

[0104] Specifically, in the inference stage, the preprocessed wafer image is passed through a trained wafer defect detection model to predict defect detection results, which include defect category and defect location.

[0105] Furthermore, the wafer defect detection method based on the lightweight target detection model proposed in the embodiment of the present application is compared with nine most advanced mini-LED wafer defect detection methods. The results are shown in Table 2. The wafer defect detection model of the embodiment of the present application is represented by MBGB-Detector, and the mAP50% of MBGB-Detector is 87.2%, which is the highest among all methods. At the same time, the parameter amount and calculation amount are 9.3M and 21.6G respectively, which are the lowest among all methods. The detection frame rate reaches 345.4 pictures per second. The wafer defect detection method based on the lightweight target detection model proposed in the embodiment of the present application improves the accuracy of industrial defect detection while reducing the parameter amount and complexity of the model, improving the detection speed, and meeting the real-time requirements of industrial detection.

[0106] Table 2 Comparison of experimental results of the method of the embodiment of the present application and the advanced method:

[0107]

[0108] The above steps S1-S3 do not necessarily represent the order between the steps, but are step symbol representations, and the order between the steps can be adjusted.

[0109] Further references Fig. 9 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a wafer defect detection device based on a lightweight target detection model. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0110] The embodiment of the present application provides a wafer defect detection device based on a lightweight target detection model, including:

[0111] The image acquisition module 1 is configured to acquire a wafer image, preprocess the wafer image, and obtain a preprocessed wafer image;

[0112] Model building module 2 is configured to build and train a wafer defect detection model based on an improved YOLOv8 network to obtain a trained wafer defect detection model, wherein the wafer defect detection model includes a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network, and a partial convolution detection head network. The multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace the C2F module with a multi-branch cross-layer aggregation module on the basis of the feature extraction network of the YOLOv8 network and the path aggregation network with the feature pyramid network, and replace the CBS module after the C2F module with a downsampling module. The partial convolution detection head network replaces the first CBS module of the regression head and the classification head with a Pconv module on the basis of the detection head network of the YOLOv8 network.

[0113] The prediction module 3 is configured to input the preprocessed wafer image into the trained wafer defect detection model to obtain a defect detection result.

[0114] Fig.10 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Fig.10 As shown, the electronic device of this embodiment includes: a processor 1001 and a memory 1002; wherein the memory 1002 is used to store computer-executable instructions; the processor 1001 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description in the above method embodiment.

[0115] Optionally, the memory 1002 may be independent or integrated with the processor 1001 .

[0116] When the memory 1002 is independently provided, the electronic device further includes a bus 1003 for connecting the memory 1002 and the processor 1001 .

[0117] An embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the above method is implemented.

[0118] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the above method is implemented.

[0119] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0120] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0121] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0122] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0123] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0124] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0125] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0126] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0127] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0128] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A wafer defect detection method based on a lightweight target detection model, characterized in that: The following steps are involved: Acquire a wafer image, and preprocess the wafer image to obtain a preprocessed wafer image; A wafer defect detection model based on an improved YOLOv8 network is constructed and trained to obtain a trained wafer defect detection model, wherein the wafer defect detection model includes a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network and a partial convolution detection head network, wherein the multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace the C2F module with a multi-branch cross-layer aggregation module based on the feature extraction network of the YOLOv8 network and the path aggregation network with a feature pyramid network, wherein the multi-branch cross-layer aggregation module includes a first CBS layer, a dimension splitting layer, a first residual multi-branch layer, a second CBS layer, a second residual multi-branch layer, a third CBS layer, a splicing layer and a fourth CBS layer connected in sequence , the input features of the multi-branch cross-layer aggregation module are passed through the first CBS layer to obtain the first feature, the dimension splitting layer divides the first feature into the second feature and the third feature according to the channel, the third feature is passed through the first residual multi-branch layer and the second CBS layer to obtain the fourth feature, the fourth feature is passed through the second residual multi-branch layer and the third CBS layer to obtain the fifth feature, the second feature, the third feature, the fourth feature and the fifth feature are dimensionally merged through the splicing layer to obtain the output feature of the multi-branch cross-layer aggregation module; the first residual multi-branch layer and the second residual multi-branch layer both adopt the RMB structure, the RMB structure adopts the structure reparameterization technology, and has different structures at different stages. In the training stage, its calculation process is as follows: ; In the inference phase, the calculation process is as follows: ; Among them, CBS(•) represents the function corresponding to the CBS structure, It is the input feature map of RMB structure; , , , It is the intermediate feature map of RMB structure; is the output feature map of the RMB structure; BN(•) represents the function corresponding to the batch normalization layer; silu{•} represents the silu activation function; Avg is the average pooling operation; Represents a convolution layer with a convolution kernel size of 1×1; Represents a convolution layer with a convolution kernel size of k×k; Concat is a dimension merging operation; It is a convolution layer with a convolution kernel size of k×k after structural reparameterization, and the CBS module after the C2F module is replaced by a downsampling module. The partial convolution detection head network replaces the first CBS module of the regression head and the classification head with a Pconv module based on the detection head network of the YOLOv8 network; The preprocessed wafer image is input into the trained wafer defect detection model to obtain a defect detection result.

2. The wafer defect detection method based on a lightweight target detection model according to claim 1, characterized in that: The first CBS layer, the second CBS layer, the third CBS layer and the fourth CBS layer all adopt a CBS structure, and the CBS structure includes a convolution layer with a convolution kernel size of 3×3, a batch normalization layer and a silu activation function layer connected in sequence.

3. The wafer defect detection method based on a lightweight target detection model according to claim 1, characterized in that: The Pconv module is used to perform a convolution operation on a portion of the channels of the input features of the Pconv module, and not perform any processing on another portion of the channels.

4. The wafer defect detection method based on a lightweight target detection model according to claim 1, characterized in that: The preprocessing method includes adjusting the size of the wafer image, image normalization, channel adjustment and image filling.

5. A wafer defect detection device based on a lightweight target detection model, characterized in that: include: An image acquisition module is configured to acquire a wafer image and preprocess the wafer image to obtain a preprocessed wafer image; The model building module is configured to build and train a wafer defect detection model based on an improved YOLOv8 network to obtain a trained wafer defect detection model, wherein the wafer defect detection model includes a multi-branch cross-layer aggregation feature extraction network, a multi-branch cross-layer aggregation feature pyramid network and a partial convolution detection head network, wherein the multi-branch cross-layer aggregation feature extraction network and the multi-branch cross-layer aggregation feature pyramid network replace the C2F module with a multi-branch cross-layer aggregation module based on the feature extraction network of the YOLOv8 network and the path aggregation network with the feature pyramid network, wherein the multi-branch cross-layer aggregation module includes a first CBS layer, a dimension splitting layer, a first residual multi-branch layer, a second CBS layer, a second residual multi-branch layer, a third CBS layer, a splicing layer and a third CBS layer connected in sequence. Four CBS layers, the input features of the multi-branch cross-layer aggregation module are passed through the first CBS layer to obtain the first feature, the dimension splitting layer divides the first feature into the second feature and the third feature in half according to the channel, the third feature is passed through the first residual multi-branch layer and the second CBS layer to obtain the fourth feature, the fourth feature is passed through the second residual multi-branch layer and the third CBS layer to obtain the fifth feature, the second feature, the third feature, the fourth feature and the fifth feature are dimensionally merged through the splicing layer to obtain the output feature of the multi-branch cross-layer aggregation module; the first residual multi-branch layer and the second residual multi-branch layer both adopt the RMB structure, the RMB structure adopts the structure reparameterization technology, and has different structures at different stages. In the training stage, its calculation process is as follows: ; In the inference phase, the calculation process is as follows: ; Among them, CBS(•) represents the function corresponding to the CBS structure, It is the input feature map of RMB structure; , , , It is the intermediate feature map of RMB structure; is the output feature map of the RMB structure; BN(•) represents the function corresponding to the batch normalization layer; silu{•} represents the silu activation function; Avg is the average pooling operation; Represents a convolution layer with a convolution kernel size of 1×1; Represents a convolution layer with a convolution kernel size of k×k; Concat is a dimension merging operation; It is a convolution layer with a convolution kernel size of k×k after structural reparameterization, and the CBS module after the C2F module is replaced by a downsampling module. The partial convolution detection head network replaces the first CBS module of the regression head and the classification head with a Pconv module based on the detection head network of the YOLOv8 network; The preprocessed wafer image is input into the trained wafer defect detection model to obtain a defect detection result.

6. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.