Mini-led defect detection method and device based on high-frequency feature enhancement and semantic gating

By improving the YOLOv8n model and adopting high-frequency enhancement and semantic gating mechanisms, the problems of high-frequency detail loss and insufficient category discrimination in mini-LED defect detection are solved, thereby improving the accuracy and robustness of detection.

CN123161024APending Publication Date: 2026-11-24HUAQIAO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611669258.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-27
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies for mini-LED defect detection suffer from the loss of high-frequency detail information at the micron level and insufficient ability to distinguish defect categories, resulting in high false negative and high false positive rates.

Method used

A wafer-level mini-LED chip defect detection model based on improved YOLOv8n is adopted. The C2f module of the backbone network is replaced with a high-frequency enhancement network module, the SPPF module at the end is replaced with a scale-adaptive spatial pyramid pooling module, and a semantically gated C2f module is used in the neck network. The detection capability is improved through high-frequency feature enhancement and semantic gating mechanisms.

Benefits of technology

It effectively solves the problem of losing details of tiny targets, improves defect recall, reduces classification error rate, and enhances detection accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123161024A_ABST
    Figure CN123161024A_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for mini-LED defect detection based on high-frequency feature enhancement and semantic gating, relating to the field of image processing. The method includes: constructing and training a wafer-level mini-LED chip defect detection model based on an improved YOLOv8n, resulting in a trained wafer-level mini-LED chip defect detection model. Based on the YOLOv8n model, the wafer-level mini-LED chip defect detection model replaces each C2f module in the backbone network with a high-frequency enhancement network module, replaces the SPPF module at the end of the backbone network with a scale-adaptive spatial pyramid pooling module, and replaces each C2f module in the neck network with a semantically gating C2f module. A high-resolution microscopic image of the region of the wafer-level mini-LED chip to be detected is acquired and input into the trained wafer-level mini-LED chip defect detection model to obtain the corresponding defect detection result. This invention solves the problem of loss of detail in small targets in deep image features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and specifically to a method and apparatus for detecting defects in mini-LEDs based on high-frequency feature enhancement and semantic gating. Background Technology

[0002] As the core light-emitting device of next-generation high-end display technology, mini-LEDs are typically manufactured through mass transfer and packaging on wafers. A single wafer integrates tens of thousands to hundreds of thousands of micron-sized LED chips, with each chip typically ranging from 100μm to 300μm in size. During wafer fabrication, various microscopic defects are inevitably generated due to mass transfer precision deviations, uneven soldering materials, or environmental particulate contamination, including pollution, cracks, breaks, and no-dies. These micron-sized defects directly affect the brightness, uniformity, and yield of subsequent display modules; a missed defect in a single chip can lead to the scrapping of the entire wafer.

[0003] In current industrial quality inspection scenarios, wafer-level mini-LED defect detection faces two major technological bottlenecks:

[0004] (1) High-frequency detail information such as edge, brightness, and texture of micron-level chips is rapidly lost during continuous downsampling of the CNN backbone network, resulting in extremely weak response of small targets in deep feature maps and a high false negative rate.

[0005] (2) Defects such as contamination, cracks, and breakage are similar in shape to the highly reflective background of the metal substrate in the spatial domain, which can easily lead to confusion. The ability to distinguish defect categories is insufficient, resulting in a high false detection rate.

[0006] Some YOLOv8-based improvement schemes have introduced attention mechanisms or improved feature pyramids, but none of them have solved the problem of high-frequency detail loss from the source of the frequency domain, nor do they have a fine-grained feature recalibration mechanism for easily confused categories. Summary of the Invention

[0007] The purpose of this application is to propose a method and device for detecting mini-LED defects based on high-frequency feature enhancement and semantic gating, which addresses the aforementioned technical problems.

[0008] In a first aspect, the present invention provides a method for detecting defects in mini-LEDs based on high-frequency feature enhancement and semantic gating, comprising the following steps:

[0009] A wafer-level mini-LED chip defect detection model based on an improved YOLOv8n was constructed and trained, resulting in a trained wafer-level mini-LED chip defect detection model. Based on the YOLOv8n model, each C2f module in the backbone network was replaced with a high-frequency enhancement network module, the SPPF module at the end of the backbone network was replaced with a scale-adaptive spatial pyramid pooling module, and each C2f module in the neck network was replaced with a semantically gated C2f module. The scale-adaptive spatial pyramid pooling module includes a sequentially connected eighth convolutional layer and multi-scale... The network consists of a large pooling unit, a scale weight generation unit, a weighted fusion unit, a residual protection unit, a third concatenation layer, and an output convolutional unit. The scale weight generation unit comprises a third global average pooling layer, a fourth concatenation layer, a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapped convolutional layer, and a Sigmoid function layer, connected in sequence. The high-frequency enhancement bottleneck module used in the high-frequency enhancement network module comprises a high-frequency feature generator, a feature fusion unit, and channel and spatial branches set in parallel between the high-frequency feature generator and the feature fusion unit, connected in sequence. The semantic gated C2f module comprises a feature extraction branch and a gated weight generation branch set in parallel.

[0010] A high-resolution microscopic image of the wafer-level mini-LED chip region to be inspected is acquired and input into a trained wafer-level mini-LED chip defect detection model to obtain the corresponding defect detection results.

[0011] Preferably, the high-frequency enhancement network module includes a first convolutional layer, a channel splitting unit, a high-frequency bottleneck layer, a channel concatenation unit, and a second convolutional layer connected in sequence. The high-frequency bottleneck layer includes n cascaded high-frequency enhancement bottleneck modules. The input features of the high-frequency enhancement network module pass through the first convolutional layer to obtain the output features of the first convolutional layer. The channel splitting unit splits the output features of the first convolutional layer into first branch features and second branch features along the channel dimension. The second branch features are input to the high-frequency bottleneck layer and pass through the n cascaded high-frequency enhancement bottleneck modules in sequence to obtain the output features of each high-frequency enhancement bottleneck module. The first branch features, the second branch features, and the output features of each high-frequency enhancement bottleneck module are concatenated along the channel dimension by the channel concatenation unit and then passed through the second convolutional layer to obtain the output features of the high-frequency enhancement network module.

[0012] Preferably, the high-frequency feature generator includes a Fourier transform module, a frequency domain center shift module, a Butterworth high-pass filter, a frequency domain inverse center shift module, and an inverse Fourier transform module connected in sequence. The input features from the high-frequency enhancement bottleneck module are input to the Fourier transform module to perform a two-dimensional Fourier transform, obtaining frequency domain features. These frequency domain features are then input to the frequency domain center shift module to obtain center-shifted frequency domain features. The center-shifted frequency domain features are filtered by the Butterworth high-pass filter to obtain filtered frequency domain features. These filtered frequency domain features are then input to the frequency domain inverse center shift module to obtain inverse center-shifted frequency domain features. Finally, these inverse center-shifted frequency domain features are input to the inverse Fourier transform module to perform a two-dimensional inverse Fourier transform, obtaining high-frequency features. The cutoff frequency of the Butterworth high-pass filter is... The cutoff frequency is a learnable parameter used during model training. Adaptive updates are achieved through gradient backpropagation.

[0013] Preferably, the channel branch includes a first branch and a second branch set in parallel, and a first splicing layer, a first global average pooling layer, a third convolutional layer and a first sigmoid function layer connected in sequence. The first branch includes an adaptive average pooling layer, a fourth convolutional layer and a second sigmoid function layer connected in sequence. The second branch includes an adaptive max pooling layer, a fifth convolutional layer and a third sigmoid function layer connected in sequence. The spatial branch includes a sixth convolutional layer and a fourth sigmoid function layer connected in sequence. The feature fusion unit includes an additive layer and a seventh convolutional layer connected in sequence.

[0014] Preferably, high-frequency features are input into the channel branches, and after passing through the first branch and the second branch respectively, the first intermediate features and the second intermediate features are extracted. The first intermediate features and the second intermediate features are concatenated along the channel dimension through the first concatenation layer to obtain the third intermediate features. The third intermediate features are then passed through the first global average pooling layer, the third convolutional layer and the first sigmoid function layer to obtain the channel weights. The channel weights are weighted with the input features of the high-frequency enhancement bottleneck module to obtain the channel enhancement features.

[0015] High-frequency features are input into the spatial branch and pass through the sixth convolutional layer and the fourth sigmoid function layer to obtain spatial weights. The spatial weights are then weighted with the input features of the high-frequency enhancement bottleneck module to obtain the spatial enhancement features.

[0016] Channel enhancement features and spatial enhancement features are input into the feature fusion unit, then added pixel by pixel through the addition layer, then through the seventh convolutional layer, and finally added to the input features of the high-frequency enhancement bottleneck module to obtain the output features of the high-frequency enhancement bottleneck module.

[0017] Preferably, the feature extraction branch includes a first CBS module, a segmentation unit, a bottleneck layer, a second splicing layer, and a second CBS module connected in sequence, and the bottleneck layer includes a number of residual bottleneck blocks connected in sequence.

[0018] The input features of the semantic gated C2f module are fed into the feature extraction branch. They first pass through the first CBS module to obtain the fourth intermediate feature. The fourth intermediate feature is then divided equally along the channel dimension by the segmentation unit to obtain the fifth and sixth intermediate features. The sixth intermediate feature is then fed into the bottleneck layer and passes through several residual bottleneck blocks to obtain the output features of each residual bottleneck block. The fifth and sixth intermediate features, along with the output features of each residual bottleneck block, are fed into the second concatenation layer and concatenated along the channel dimension to obtain the seventh intermediate feature. The seventh intermediate feature passes through the second CBS module to obtain the semantic features.

[0019] The gated weight generation branch includes a global pooling compression layer, a first linear transformation layer, a SiLU activation function layer, a second linear transformation layer, and a fifth Sigmoid function layer connected in sequence. The global pooling compression layer includes a second global average pooling layer and a third linear transformation layer connected in sequence.

[0020] The input features of the semantically gated C2f module are fed into the gated weight generation branch, where they first undergo global average pooling and mapping after passing through a global pooling compression layer. A global semantic guidance vector of dimension is obtained. This global semantic guidance vector is then input into the first linear transformation layer to obtain... The first feature vector is passed through a SiLU activation function layer to obtain a second feature vector, which is then input into a second linear transformation layer to obtain... The third eigenvector of dimension is passed through the fifth sigmoid function layer to obtain the gate weights, where The dimension representing the gating weights;

[0021] After reshaping the tensor dimension of the gating weights, add them to 1, and then perform a Hadamard product with the semantic features to obtain the output features of the semantic gating C2f module.

[0022] Preferably, the input features of the scale-adaptive spatial pyramid pooling module are passed through the eighth convolutional layer to obtain the output features of the eighth convolutional layer. The output features of the eighth convolutional layer are then input into a multi-scale max pooling unit, which consists of three max pooling layers connected in series, outputting scale features with three different receptive fields. The three scale features are then passed through the third global average pooling layer, concatenated along the channel dimension by the fourth concatenation layer, and then passed through a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapping convolutional layer, and a Sigmoid function layer in sequence to generate scale weights corresponding to the three scale features. The weighted fusion unit sums the three scale features according to the scale weights to obtain the weighted fusion result. The residual protection unit multiplies the weighted fusion result by a learnable scale coefficient to obtain a lightweight increment. The lightweight increment is concatenated with the output features of the eighth convolutional layer along the channel dimension by the third concatenation layer to obtain the concatenated result. The output convolution unit convolves the concatenated result to obtain the output features of the scale-adaptive spatial pyramid pooling module.

[0023] Secondly, the present invention provides a mini-LED defect detection device based on high-frequency feature enhancement and semantic gating, comprising:

[0024] The model building module is configured to construct and train a wafer-level mini-LED chip defect detection model based on an improved YOLOv8n. The trained wafer-level mini-LED chip defect detection model, based on the YOLOv8n model, replaces each C2f module in the backbone network with a high-frequency enhancement network module, replaces the SPPF modules at the ends of the backbone network with scale-adaptive spatial pyramid pooling modules, and replaces each C2f module in the neck network with a semantically gated C2f module. The scale-adaptive spatial pyramid pooling module includes a sequentially connected eighth convolution. The network consists of a multi-scale max pooling unit, a scale weight generation unit, a weighted fusion unit, a residual protection unit, a third concatenation layer, and an output convolutional unit. The scale weight generation unit comprises a third global average pooling layer, a fourth concatenation layer, a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapped convolutional layer, and a Sigmoid function layer connected in sequence. The high-frequency enhancement bottleneck module used in the high-frequency enhancement network module comprises a high-frequency feature generator, a feature fusion unit, and channel and spatial branches set in parallel between the high-frequency feature generator and the feature fusion unit. The semantic gated C2f module comprises a feature extraction branch and a gated weight generation branch set in parallel.

[0025] The detection module is configured to acquire high-resolution microscopic images of the wafer-level mini-LED chip region to be inspected and input them into a trained wafer-level mini-LED chip defect detection model to obtain the corresponding defect detection results.

[0026] Thirdly, the present invention provides an electronic device including one or more processors; and 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 as described in any implementation of the first aspect.

[0027] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.

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

[0029] (1) The mini-LED defect detection method based on high frequency feature enhancement and semantic gating mentioned in this invention replaces each C2f module of the backbone network of the YOLOv8n model with a high frequency enhancement network module. The high frequency feature generator in the high frequency enhancement network module adopts a Butterworth high-pass filter to continuously purify the high frequency information of chip edge and brightness texture from the frequency domain source, effectively solving the problem of loss of small target details in deep features and improving the recall rate of small defects such as pollution, cracks, and damage.

[0030] (2) This invention replaces the SPPF module at the end of the backbone network with a scale-adaptive spatial pyramid pooling module, uses learnable scale weights to adaptively weight and fuse pooling features of different receptive fields, and uses learnable residual protection coefficients to concatenate the fusion result as a lightweight increment with the original features. This enhances the multi-scale feature expression capability while preserving the original semantic information and avoiding a decrease in recall, and controls the amount of computation.

[0031] (3) The mini-LED defect detection method based on high frequency feature enhancement and semantic gating mentioned in this invention replaces the C2f module of the neck network of the YOLOv8n model with the semantic gating C2f module, performs differential enhancement on the feature channels with discriminative power, and keeps the original features unchanged on the feature channels with weaker discriminative power, thereby weakening the feature differences between highly reflective metal substrates and easily confused defects, and reducing the classification errors between contamination and damage, and between normal and slight contamination.

[0032] (4) The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating mentioned in this invention improves the accuracy and robustness of wafer-level mini-LED chip defect detection without significantly increasing the number of model parameters through the synergistic effect of the high-frequency enhancement network module, the semantic gating C2f module and the scale-adaptive spatial pyramid pooling module. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart illustrating the mini-LED defect detection method based on high-frequency feature enhancement and semantic gating, as an embodiment of this application.

[0035] Figure 2 This is a schematic diagram of the structure of a wafer-level mini-LED chip defect detection model based on a mini-LED defect detection method using high-frequency feature enhancement and semantic gating, as an embodiment of this application.

[0036] Figure 3 This is a schematic diagram of the high-frequency enhancement network module of the mini-LED defect detection method based on high-frequency feature enhancement and semantic gating, which is an embodiment of this application.

[0037] Figure 4 This is a schematic diagram of the high-frequency enhancement bottleneck module of the mini-LED defect detection method based on high-frequency feature enhancement and semantic gating, which is an embodiment of this application.

[0038] Figure 5 This is a schematic diagram of the semantic gate C2f module of the mini-LED defect detection method based on high-frequency feature enhancement and semantic gate, which is an embodiment of this application.

[0039] Figure 6 This is a schematic diagram of the scale-adaptive spatial pyramid pooling module of the mini-LED defect detection method based on high-frequency feature enhancement and semantic gating, as an embodiment of this application.

[0040] Figure 7 This is a schematic diagram of a mini-LED defect detection device based on high-frequency feature enhancement and semantic gating, according to an embodiment of this application.

[0041] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0043] Figure 1 This application illustrates an embodiment of a mini-LED defect detection method based on high-frequency feature enhancement and semantic gating, comprising the following steps:

[0044] S1. Construct and train a wafer-level mini-LED chip defect detection model based on the improved YOLOv8n. The trained wafer-level mini-LED chip defect detection model is obtained by replacing each C2f module in the backbone network with a high-frequency enhancement network module, replacing the SPPF module at the end of the backbone network with a scale-adaptive spatial pyramid pooling module, and replacing each C2f module in the neck network with a semantically gated C2f module. The scale-adaptive spatial pyramid pooling module includes a sequentially connected eighth convolutional layer, multi-scale... The network consists of a maximum pooling unit, a scale weight generation unit, a weighted fusion unit, a residual protection unit, a third concatenation layer, and an output convolutional unit. The scale weight generation unit includes a third global average pooling layer, a fourth concatenation layer, a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapping convolutional layer, and a Sigmoid function layer connected in sequence. The high-frequency enhancement bottleneck module used in the high-frequency enhancement network module includes a high-frequency feature generator, a feature fusion unit, and channel and spatial branches set in parallel between the high-frequency feature generator and the feature fusion unit. The semantic gated C2f module includes a feature extraction branch and a gated weight generation branch set in parallel.

[0045] In a specific embodiment, the high-frequency enhancement network module includes a first convolutional layer, a channel splitting unit, a high-frequency bottleneck layer, a channel splicing unit, and a second convolutional layer connected in sequence. The high-frequency bottleneck layer includes n cascaded high-frequency enhancement bottleneck modules. The input features of the high-frequency enhancement network module pass through the first convolutional layer to obtain the output features of the first convolutional layer. The channel splitting unit splits the output features of the first convolutional layer into first branch features and second branch features along the channel dimension. The second branch features are input to the high-frequency bottleneck layer and pass through the n cascaded high-frequency enhancement bottleneck modules in sequence to obtain the output features of each high-frequency enhancement bottleneck module. The first branch features, the second branch features, and the output features of each high-frequency enhancement bottleneck module are spliced ​​along the channel dimension by the channel splicing unit and then passed through the second convolutional layer to obtain the output features of the high-frequency enhancement network module.

[0046] For details, please refer to Figure 2The wafer-level mini-LED chip defect detection model based on the improved YOLOv8n provided in the embodiments of this application is an improvement on the existing standard YOLOv8n model. Each C2f module in the backbone network of the existing standard YOLOv8n model is replaced with a high frequency enhancement network module (HFE-net), the SPPF module at the end of the backbone network is replaced with a scale-adaptive spatial pyramid pooling module (SA-SPPF), and each C2f module in the neck network of the existing standard YOLOv8n model is replaced with a semantically gating C2f module (SG-C2f), while other structures remain unchanged.

[0047] Furthermore, in the embodiments of this application, the high-frequency enhancement network module consists of a first convolutional layer, a channel splitting unit, a high-frequency bottleneck layer, a channel splicing unit, and a second convolutional layer. The high-frequency bottleneck layer is composed of n cascaded high-frequency enhancement bottleneck modules. Each high-frequency enhancement bottleneck module (HFE-Bottleneck) consists of a high-frequency feature generator, a channel path (CP), a spatial path (SP), and a feature fusion unit, with the channel path and spatial path arranged in parallel between the high-frequency feature generator and the feature fusion unit. The input features of the high-frequency enhancement bottleneck module first pass through the high-frequency feature generator to generate corresponding high-frequency features. These high-frequency features are then input to the channel path and spatial path for feature enhancement, extracting channel-enhanced features and spatial-enhanced features. These channel-enhanced features and spatial-enhanced features are then input to the feature fusion unit for feature fusion, yielding the output features of the high-frequency enhancement bottleneck module. The semantic gating C2f module contains two parallel branches: a feature extraction branch and a gating weight generation branch. The input features of the semantic gated C2f module are processed through a feature extraction branch and a gate weight generation branch to extract semantic features and gate weights. The semantic features and gate weights are then fused to obtain the output features of the semantic gated C2f module.

[0048] The following details the structure of the high-frequency enhancement bottleneck module, the semantic gating C2f module, and the scale-adaptive spatial pyramid pooling module.

[0049] In a specific embodiment, the high-frequency feature generator includes a Fourier transform module, a frequency domain center shift module, a Butterworth high-pass filter, a frequency domain inverse center shift module, and an inverse Fourier transform module connected in sequence. The input features from the high-frequency enhancement bottleneck module are input to the Fourier transform module to perform a two-dimensional Fourier transform, obtaining frequency domain features. These frequency domain features are then input to the frequency domain center shift module to obtain center-shifted frequency domain features. The center-shifted frequency domain features are filtered by the Butterworth high-pass filter to obtain filtered frequency domain features. These filtered frequency domain features are then input to the frequency domain inverse center shift module to obtain inverse center-shifted frequency domain features. Finally, these inverse center-shifted frequency domain features are input to the inverse Fourier transform module to perform a two-dimensional inverse Fourier transform, obtaining high-frequency features. The cutoff frequency of the Butterworth high-pass filter is... For learnable parameters, the cutoff frequency during model training Adaptive updates are achieved through gradient backpropagation.

[0050] For details, please refer to Figure 3 The high-frequency feature generator in the embodiments of this application consists of a Fourier transform module, a frequency domain center shift module, a Butterworth high-pass filter, a frequency domain inverse center shift module, and an inverse Fourier transform module. The Butterworth high-pass filter can perform high-frequency purification of the feature map in the frequency domain. The processing flow of the high-frequency feature generator is as follows:

[0051] Input characteristics of the high-frequency enhancement bottleneck module A two-dimensional Fourier transform is performed, and the frequency domain center shift is applied to the transform result to obtain the center-shifted frequency domain features. These features are then filtered using a Butterworth high-pass filter to obtain the filtered frequency domain features. Next, an inverse center shift is performed on the filtered frequency domain features to obtain the inverse center-shifted frequency domain features. Finally, a two-dimensional inverse Fourier transform is performed on the inverse center-shifted frequency domain features to restore them to the spatial domain, yielding the high-frequency features. The specific formula is as follows:

[0052] ;

[0053] in, and These are the two-dimensional Fourier transform and the inverse two-dimensional Fourier transform, respectively. and These correspond to frequency domain center shift and frequency domain inverse center shift operations, respectively. Let be the transfer function of the Butterworth high-pass filter. Let x be the coordinates of the input feature x of the high-frequency enhancement bottleneck module after undergoing a two-dimensional Fourier transform in the frequency domain grid. The formula is as follows:

[0054] ;

[0055] ;

[0056] in, Represents coordinate points The Euclidean distance to the center of the frequency domain; The cutoff frequency is set to an initial value in one embodiment. ; This represents the filter order, where n is a preset fixed value that does not participate in parameter updates during training. In one embodiment, n = .

[0057] In a specific embodiment, the channel branch includes a first branch and a second branch set in parallel, and a first splicing layer, a first global average pooling layer, a third convolutional layer and a first sigmoid function layer connected in sequence. The first branch includes an adaptive average pooling layer, a fourth convolutional layer and a second sigmoid function layer connected in sequence. The second branch includes an adaptive max pooling layer, a fifth convolutional layer and a third sigmoid function layer connected in sequence. The spatial branch includes a sixth convolutional layer and a fourth sigmoid function layer connected in sequence. The feature fusion unit includes an additive layer and a seventh convolutional layer connected in sequence.

[0058] In a specific embodiment, high-frequency features are input to the channel branch and pass through the first branch and the second branch respectively to extract the first intermediate feature and the second intermediate feature. The first intermediate feature and the second intermediate feature are concatenated along the channel dimension through the first concatenation layer to obtain the third intermediate feature. The third intermediate feature passes through the first global average pooling layer, the third convolutional layer and the first sigmoid function layer in sequence to obtain the channel weights. The channel weights are weighted with the input features of the high-frequency enhancement bottleneck module to obtain the channel enhancement features.

[0059] High-frequency features are input into the spatial branch and pass through the sixth convolutional layer and the fourth sigmoid function layer to obtain spatial weights. The spatial weights are then weighted with the input features of the high-frequency enhancement bottleneck module to obtain the spatial enhancement features.

[0060] Channel enhancement features and spatial enhancement features are input into the feature fusion unit, then added pixel by pixel through the addition layer, then through the seventh convolutional layer, and finally added to the input features of the high-frequency enhancement bottleneck module to obtain the output features of the high-frequency enhancement bottleneck module.

[0061] Specifically, such as Figure 4As shown, in the embodiments of this application, the channel branch consists of a first branch, a second branch, a first concatenation layer, a first global average pooling layer, a third convolutional layer, and a first sigmoid function layer. The first and second branches are configured in parallel. The first branch consists of an adaptive average pooling layer, a fourth convolutional layer, and a second sigmoid function layer. The second branch consists of an adaptive max pooling layer, a fifth convolutional layer, and a third sigmoid function layer connected sequentially. The output size of both the adaptive average pooling layer and the adaptive max pooling layer is 16×16. The two branches extract the first and second intermediate features, respectively. In one example, the third, fourth, and fifth convolutional layers all use a 1×1 convolutional kernel, as shown in the following equation:

[0062] ;

[0063] ;

[0064] in, and These represent the first intermediate feature and the second intermediate feature, respectively. and These represent the adaptive average pooling operation with an output size of 16×16 and the adaptive max pooling operation with an output size of 16×16, respectively. For a convolution operation with a 1×1 kernel, This is the Sigmoid function.

[0065] The first and second intermediate features are concatenated by the first concatenation layer to obtain the third intermediate feature. The third intermediate feature then passes through the first global average pooling layer, the third convolutional layer, and the first sigmoid function layer to obtain the channel weights. Finally, the channel weights are weighted with the input features of the high-frequency enhancement bottleneck module. The weighting here uses the Hadamard product to obtain the channel enhancement features, as shown in the following formula:

[0066] ;

[0067] ;

[0068] ;

[0069] in, This is a splicing operation along the channel dimension. For Hadama accumulation, For channel weights, Enhance channel features.

[0070] In the embodiments of this application, the spatial branch is composed of a sixth convolutional layer and a fourth sigmoid function layer. The sixth convolutional layer also uses a 1×1 convolution operation. This spatial branch is used to learn the spatial region where the mini-LED chip is located and suppress background interference from the highly reflective metal substrate. The high-frequency features are sequentially passed through the sixth convolutional layer and the fourth sigmoid function layer to obtain spatial weights. These spatial weights are then weighted with the input features of the high-frequency enhancement bottleneck module to obtain the spatial enhancement features, as shown in the following formula:

[0071] ;

[0072] ;

[0073] in, Indicates spatial weights, This represents spatially enhanced features.

[0074] Furthermore, the feature fusion unit consists of an additive layer and a seventh convolutional layer. In one example, the seventh convolutional layer uses a 3×3 convolutional kernel. The channel enhancement features and spatial enhancement features are input into the feature fusion unit, first added element-wise, then passed through the seventh convolutional layer, and finally residually connected with the input features of the high-frequency enhancement bottleneck module to obtain the output features of the high-frequency enhancement bottleneck module, as shown in the following formula:

[0075] ;

[0076] in, This indicates the output characteristics of the high-frequency enhancement bottleneck module. This is a convolution operation with a 3×3 kernel.

[0077] In a specific embodiment, the feature extraction branch includes a first CBS module, a segmentation unit, a bottleneck layer, a second splicing layer, and a second CBS module connected in sequence, and the bottleneck layer includes a plurality of residual bottleneck blocks connected in sequence.

[0078] The input features of the semantic gated C2f module are fed into the feature extraction branch. They first pass through the first CBS module to obtain the fourth intermediate feature. The fourth intermediate feature is then divided equally along the channel dimension by the segmentation unit to obtain the fifth and sixth intermediate features. The sixth intermediate feature is then fed into the bottleneck layer and passes through several residual bottleneck blocks to obtain the output features of each residual bottleneck block. The fifth and sixth intermediate features, along with the output features of each residual bottleneck block, are fed into the second concatenation layer and concatenated along the channel dimension to obtain the seventh intermediate feature. The seventh intermediate feature passes through the second CBS module to obtain the semantic features.

[0079] The gated weight generation branch includes a global pooling compression layer, a first linear transformation layer, a SiLU activation function layer, a second linear transformation layer, and a fifth Sigmoid function layer connected in sequence. The global pooling compression layer includes a second global average pooling layer and a third linear transformation layer connected in sequence.

[0080] The input features of the semantically gated C2f module are fed into the gated weight generation branch, where they first undergo global average pooling and mapping after passing through a global pooling compression layer. A global semantic guidance vector of dimension is obtained. This global semantic guidance vector is then input into the first linear transformation layer to obtain... The first feature vector is passed through a SiLU activation function layer to obtain a second feature vector, which is then input into a second linear transformation layer to obtain... The third eigenvector of dimension is passed through the fifth sigmoid function layer to obtain the gate weights, where The dimension representing the gating weights;

[0081] After reshaping the tensor dimension of the gating weights, add them to 1, and then perform a Hadamard product with the semantic features to obtain the output features of the semantic gating C2f module.

[0082] For details, please refer to Figure 5 In the semantic gating C2f module, the input features of the semantic gating C2f module are respectively input into the parallel feature extraction branch and the gating weight generation branch to extract semantic features and gating weights, respectively. The feature extraction branch consists of a first CBS module, a segmentation unit, a bottleneck layer, a second concatenation layer and a second CBS module. The first CBS module and the second CBS module both adopt the CBS structure, that is, they adopt a combination of operations including convolution, batch normalization and SiLU activation function. The bottleneck layer contains l residual bottleneck blocks in series. In one example, l=2.

[0083] In the feature extraction branch, the input features of the semantically gated C2f module are first input into the first CBS module to obtain the fourth intermediate feature. Then, the segmentation unit divides the fourth intermediate feature equally along the channel dimension to obtain the fifth and sixth intermediate features. The sixth intermediate feature is then input into the bottleneck layer, passing through l concatenated residual bottleneck blocks to obtain the output features of each residual bottleneck block. The fifth intermediate feature, the sixth intermediate feature, and the output features of each residual bottleneck block are then concatenated along the channel dimension by the second concatenation layer to obtain the seventh intermediate feature. The seventh intermediate feature is then passed through the second CBS module to obtain the semantic features.

[0084] Furthermore, the gated weight generation branch consists of a global pooling compression layer, a first linear transformation layer, a SiLU activation function layer, a second linear transformation layer, and a fifth Sigmoid function layer. The global pooling compression layer consists of a second global average pooling layer and a third linear transformation layer.

[0085] In the gated weight generation branch, the input features of the semantically gated C2f module are first fed into the global pooling compression layer, then sequentially pass through the second global average pooling layer and the third linear transformation layer to perform global average pooling operations and map to obtain the weights. A global semantic guidance vector of dimension, in one embodiment, These correspond to four types of defects: contamination, cracks, breakage, and missing chips. The global semantic guidance vector undergoes dimensionality reduction adjustment through the first linear transformation layer to obtain... The first eigenvector of dimension 1 is passed through a SiLU activation function layer to obtain a second eigenvector. This second eigenvector is then passed through a second linear transformation layer for dimension upscaling adjustment. The third eigenvector of the dimension is passed through the fifth sigmoid function layer to obtain the gate weights. For the dimension of the gating weights, in one example, Finally, the gating weights are adjusted by tensor dimension reshaping, and then weighted channel-wise with the semantic features to obtain the output features of the semantically gating C2f module, as shown in the following equation:

[0086] ;

[0087] ;

[0088] ;

[0089] ;

[0090] ;

[0091] ;

[0092] in, This represents a linear transformation operation. for A global semantic guide vector of dimension. Number of defect categories; The SiLU activation function is used. These are the first eigenvector, the second eigenvector, and the third eigenvector, respectively, where m represents the gating weight. This indicates tensor dimension reshaping. These are the output features of the semantically gating C2f module.

[0093] The semantic gating C2f module utilizes a gating mechanism to differentially enhance the feature channels of high-confidence categories while preserving the original features, and keeps the feature channels of low-confidence categories unchanged. This weakens the feature differences between easily confused defects and improves classification accuracy.

[0094] In a specific embodiment, the input features of the scale-adaptive spatial pyramid pooling module are passed through the eighth convolutional layer to obtain the output features of the eighth convolutional layer. The output features of the eighth convolutional layer are then input into a multi-scale max pooling unit, which includes three max pooling layers connected in series, outputting scale features with three different receptive fields. The three scale features are then passed through the third global average pooling layer, concatenated along the channel dimension by the fourth concatenation layer, and then passed through a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapping convolutional layer, and a Sigmoid function layer in sequence to generate scale weights corresponding to the three scale features. The weighted fusion unit sums the three scale features according to the scale weights to obtain the weighted fusion result. The residual protection unit multiplies the weighted fusion result by a learnable scale coefficient to obtain a lightweight increment. The lightweight increment is concatenated with the output features of the eighth convolutional layer along the channel dimension by the third concatenation layer to obtain the concatenated result. The output convolution unit convolves the concatenated result to obtain the output features of the scale-adaptive spatial pyramid pooling module.

[0095] For details, please refer to Figure 6 Through the processing of the scale-adaptive spatial pyramid pooling module (SA-SPPF) mentioned above, the number of channels is first compressed by half through the eighth convolutional layer. After multi-scale pooling and weighted fusion, the two channels are spliced ​​together. Compared with the original SPPF's four-way splicing, the splicing dimension is halved, and the overall computation is lower.

[0096] In the training process of the wafer-level mini-LED chip defect detection model, high-resolution microscopic images of the mini-LED chip region on the wafer are first collected. These microscopic images are then preprocessed to obtain preprocessed images. The preprocessing process includes applying mosaic enhancement, mixup enhancement, random perturbation, and HSV augmentation to the images. Training data is constructed using the preprocessed images and their corresponding defect categories. This training data is then used to train the wafer-level mini-LED chip defect detection model, resulting in the trained wafer-level mini-LED chip defect detection model.

[0097] During training, the Adam optimizer was used with a learning rate of 0.001. The wafer-level mini-LED chip defect detection model described above was compared with the original YOLOv8n baseline model on a wafer dataset. Evaluation metrics included precision (P), recall (R), F1 score, mAP50-95, inference time, and frame rate.

[0098] Table 1. Performance comparison results of the model of this invention and the baseline model:

[0099] Model Name Accuracy Recall rate F1 mAP50-95 Inference time (ms) Frame rate (FPS) Baseline 0.927 0.911 0.918930359 0.725 1.1 909.09 YOLOv8n+HFE 0.919 0.908 0.913466886 0.73 2.1 476.19 YOLOv8n+HFE+SG 0.92 0.912 0.915982533 0.736 2.6 384.62 YOLOv8n+HFE+SG+SA-SPPF 0.928 0.92 0.923982684 0.743 1.6 625

[0100] As shown in Table 1, the experimental results show that when the high-frequency enhancement network module is introduced alone, the model's mAP50-95 increases from 0.725 to 0.730, which confirms the key role of the high-frequency enhancement network module in refining high-frequency details in the frequency domain and enhancing the ability to locate micron-level defects. After further introducing the semantic gated C2f module, the recall rate rises from 0.908 to 0.912 and exceeds the baseline level, and the mAP50-95 increases to 0.736, fully demonstrating the significant synergistic effect between the high-frequency enhancement network module and the semantic gated C2f module. When the high-frequency enhancement network module, the semantic gated C2f module, and the scale-adaptive spatial pyramid pooling module are all integrated in synergy, the model's mAP50-95 reaches 0.743, which is 1.8 percentage points higher than the baseline model, the recall rate increases from 0.911 to 0.920, and the inference time is reduced from 2.6ms to 1.6ms. This performance breakthrough can effectively improve the accuracy and real-time performance of wafer-level mini-LED chip defect detection in industrial online quality inspection scenarios.

[0101] Specifically, after deploying the trained wafer-level mini-LED chip defect detection model, a high-resolution microscopic image of the area of ​​the mini-LED chip to be detected can be input into the trained wafer-level mini-LED chip defect detection model. Multi-scale image features are extracted by the backbone network, and these multi-scale image features are then fused by the neck network to obtain multi-scale fused features. These multi-scale fused features are then passed through the detection head network to obtain the corresponding defect detection results. The defect detection results are the defect category and location information of each mini-LED chip on the wafer.

[0102] The data mentioned in the embodiments of this application were all obtained in a legal and compliant manner, and their application scenarios are also legal and compliant.

[0103] Further reference Figure 7As an implementation of the methods shown in the above figures, this application provides an embodiment of a mini-LED defect detection device based on high-frequency feature enhancement and semantic gating. This device embodiment is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0104] This application provides a mini-LED defect detection device based on high-frequency feature enhancement and semantic gating, including:

[0105] Model building module 1 is configured to build and train a wafer-level mini-LED chip defect detection model based on an improved YOLOv8n, resulting in a trained wafer-level mini-LED chip defect detection model. This model, based on the YOLOv8n model, replaces each C2f module in the backbone network with a high-frequency enhancement network module, replaces the SPPF modules at the ends of the backbone network with scale-adaptive spatial pyramid pooling modules, and replaces each C2f module in the neck network with a semantically gated C2f module. The scale-adaptive spatial pyramid pooling module includes sequentially connected eighth convolutions. The network consists of a multi-scale max pooling unit, a scale weight generation unit, a weighted fusion unit, a residual protection unit, a third concatenation layer, and an output convolutional unit. The scale weight generation unit comprises a third global average pooling layer, a fourth concatenation layer, a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapped convolutional layer, and a Sigmoid function layer connected in sequence. The high-frequency enhancement bottleneck module used in the high-frequency enhancement network module comprises a high-frequency feature generator, a feature fusion unit, and channel and spatial branches set in parallel between the high-frequency feature generator and the feature fusion unit. The semantic gated C2f module comprises a feature extraction branch and a gated weight generation branch set in parallel.

[0106] The detection module 2 is configured to acquire a high-resolution microscopic image of the wafer-level mini-LED chip region to be detected and input it into the trained wafer-level mini-LED chip defect detection model to obtain the corresponding defect detection result.

[0107] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. For example... Figure 8 As shown, the electronic device of this embodiment includes a processor 801 and a memory 802; wherein the memory 802 is used to store computer execution instructions; and the processor 801 is used to execute the computer execution 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 descriptions in the foregoing method embodiments.

[0108] Alternatively, the memory 802 can be either standalone or integrated with the processor 801.

[0109] When the memory 802 is set up independently, the electronic device also includes a bus 803 for connecting the memory 802 and the processor 801.

[0110] This invention also provides a computer storage medium storing computer execution instructions, which, when executed by processor 801, implement the above method.

[0111] This invention also provides a computer program product, including a computer program that, when executed by a processor 801, implements the above-described method.

[0112] In the embodiments provided by this 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 merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

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

[0114] Furthermore, the functional modules in the various embodiments of this invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit formed by the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0115] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor 801 to execute some steps of the methods of the various embodiments of this application.

[0116] It should be understood that the processor 801 described above can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor, or the processor 801 can be any conventional processor 801. The steps of the method disclosed in this invention can be directly manifested as the hardware processor 801 executing the steps, or as a combination of hardware and software modules within the processor 801 executing the steps.

[0117] The memory 802 may include high-speed RAM memory, and may also include non-volatile memory NVM, such as at least one disk storage device, and may also be a USB flash drive, portable hard drive, read-only memory, disk or optical disc, etc.

[0118] Bus 803 can be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 803 can be divided into address bus, data bus, control bus, etc. For ease of illustration, the bus 803 in the accompanying drawings of this application is not limited to only one bus 803 or one type of bus 803.

[0119] The aforementioned storage medium can be implemented from 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 storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0120] An exemplary storage medium is coupled to a processor 801, enabling the processor 801 to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor 801. The processor 801 and the storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor 801 and the storage medium can exist as discrete components in an electronic device or a host device.

[0121] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions 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 mini-LED defect detection method based on high-frequency feature enhancement and semantic gating, characterized in that, Includes the following steps: A wafer-level mini-LED chip defect detection model based on an improved YOLOv8n was constructed and trained to obtain the trained wafer-level mini-LED chip defect detection model. This model, based on the YOLOv8n model, replaces each C2f module in the backbone network with a high-frequency enhancement network module, replaces the SPPF module at the end of the backbone network with a scale-adaptive spatial pyramid pooling module, and replaces each C2f module in the neck network with a semantically gated C2f module. The scale-adaptive spatial pyramid pooling module includes a sequentially connected eighth convolutional layer and a multi-scale max pooling layer. The network consists of a unit, a scale weight generation unit, a weighted fusion unit, a residual protection unit, a third concatenation layer, and an output convolution unit. The scale weight generation unit comprises a third global average pooling layer, a fourth concatenation layer, a dimensionality reduction convolutional layer, a SiLU activation function layer, a mapped convolutional layer, and a Sigmoid function layer connected in sequence. The high-frequency enhancement bottleneck module used in the high-frequency enhancement network module comprises a high-frequency feature generator, a feature fusion unit, and channel branches and spatial branches set in parallel between the high-frequency feature generator and the feature fusion unit. The semantic gated C2f module includes a feature extraction branch and a gated weight generation branch set in parallel. A high-resolution microscopic image of the wafer-level mini-LED chip region to be detected is acquired and input into the trained wafer-level mini-LED chip defect detection model to obtain the corresponding defect detection result.

2. The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating according to claim 1, wherein, The high-frequency enhancement network module includes a first convolutional layer, a channel splitting unit, a high-frequency bottleneck layer, a channel concatenation unit, and a second convolutional layer connected in sequence. The high-frequency bottleneck layer includes n cascaded high-frequency enhancement bottleneck modules. The input features of the high-frequency enhancement network module pass through the first convolutional layer to obtain the output features of the first convolutional layer. The channel splitting unit splits the output features of the first convolutional layer into a first branch feature and a second branch feature along the channel dimension. The second branch feature is input to the high-frequency bottleneck layer and passes through the n cascaded high-frequency enhancement bottleneck modules in sequence to obtain the output features of each high-frequency enhancement bottleneck module. The first branch feature, the second branch feature, and the output features of each high-frequency enhancement bottleneck module are concatenated along the channel dimension by the channel concatenation unit and then passed through the second convolutional layer to obtain the output features of the high-frequency enhancement network module.

3. The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating according to claim 1, characterized in that, The high-frequency feature generator comprises a Fourier transform module, a frequency domain center shift module, a Butterworth high-pass filter, a frequency domain inverse center shift module, and an inverse Fourier transform module connected in sequence. The input features of the high-frequency enhancement bottleneck module are input to the Fourier transform module to perform a two-dimensional Fourier transform, obtaining frequency domain features. These frequency domain features are then input to the frequency domain center shift module to obtain center-shifted frequency domain features. The center-shifted frequency domain features are filtered by the Butterworth high-pass filter to obtain filtered frequency domain features. These filtered frequency domain features are then input to the frequency domain inverse center shift module to obtain inverse center-shifted frequency domain features. Finally, these inverse center-shifted frequency domain features are input to the inverse Fourier transform module to perform a two-dimensional inverse Fourier transform, obtaining high-frequency features. The cutoff frequency of the Butterworth high-pass filter is... The cutoff frequency is a learnable parameter used during model training. Adaptive updates are achieved through gradient backpropagation.

4. The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating according to claim 3, characterized in that, The channel branch includes a first branch and a second branch arranged in parallel, and a first splicing layer, a first global average pooling layer, a third convolutional layer, and a first sigmoid function layer connected in sequence. The first branch includes an adaptive average pooling layer, a fourth convolutional layer, and a second sigmoid function layer connected in sequence. The second branch includes an adaptive max pooling layer, a fifth convolutional layer, and a third sigmoid function layer connected in sequence. The spatial branch includes a sixth convolutional layer and a fourth sigmoid function layer connected in sequence. The feature fusion unit includes an additive layer and a seventh convolutional layer connected in sequence.

5. The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating according to claim 4, characterized in that, The high-frequency features are input to the channel branches, and after passing through the first branch and the second branch respectively, the first intermediate features and the second intermediate features are extracted. The first intermediate features and the second intermediate features are concatenated along the channel dimension through the first concatenation layer to obtain the third intermediate features. The third intermediate features are then passed through the first global average pooling layer, the third convolutional layer, and the first sigmoid function layer in sequence to obtain the channel weights. The channel weights are weighted with the input features of the high-frequency enhancement bottleneck module to obtain the channel enhancement features. The high-frequency features are input into the spatial branch and pass through the sixth convolutional layer and the fourth sigmoid function layer in sequence to obtain spatial weights; the spatial weights are weighted with the input features of the high-frequency enhancement bottleneck module to obtain spatial enhancement features; The channel enhancement features and spatial enhancement features are input to the feature fusion unit, added pixel by pixel through the addition layer, then passed through the seventh convolutional layer, and finally added to the input features of the high-frequency enhancement bottleneck module to obtain the output features of the high-frequency enhancement bottleneck module.

6. The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating according to claim 1, characterized in that, The feature extraction branch includes a first CBS module, a segmentation unit, a bottleneck layer, a second splicing layer, and a second CBS module connected in sequence. The bottleneck layer includes a number of residual bottleneck blocks connected in sequence. The input features of the semantic gated C2f module are input into the feature extraction branch. They first pass through the first CBS module to obtain a fourth intermediate feature. This fourth intermediate feature is then divided equally along the channel dimension by the segmentation unit to obtain a fifth and a sixth intermediate feature. The sixth intermediate feature is input into the bottleneck layer, passing through several residual bottleneck blocks to obtain the output feature of each residual bottleneck block. The fifth and sixth intermediate features, along with the output features of each residual bottleneck block, are input into the second concatenation layer and concatenated along the channel dimension to obtain a seventh intermediate feature. This seventh intermediate feature then passes through the second CBS module to obtain the semantic feature. The gated weight generation branch includes a global pooling compression layer, a first linear transformation layer, a SiLU activation function layer, a second linear transformation layer, and a fifth Sigmoid function layer connected in sequence. The global pooling compression layer includes a second global average pooling layer and a third linear transformation layer connected in sequence. The input features of the semantic gated C2f module are fed into the gated weight generation branch, first undergoing global average pooling and mapping through the global pooling compression layer to obtain... A global semantic guidance vector of dimension is obtained, and the global semantic guidance vector is input into the first linear transformation layer to obtain... The first feature vector is passed through the SiLU activation function layer to obtain the second feature vector, which is then input into the second linear transformation layer to obtain... The third feature vector of dimension is passed through the fifth sigmoid function layer to obtain the gate weights, where The dimension representing the gating weights; The gating weights are reshaped into tensors and added to 1, then multiplied by the semantic features to obtain the output features of the semantic gating C2f module.

7. The mini-LED defect detection method based on high-frequency feature enhancement and semantic gating according to claim 1, characterized in that, The input features of the scale-adaptive spatial pyramid pooling module are passed through the eighth convolutional layer to obtain the output features of the eighth convolutional layer. The output features of the eighth convolutional layer are input into the multi-scale max pooling unit. The multi-scale max pooling unit includes three max pooling layers connected in series and outputs scale features with three different receptive fields. The three scale features are respectively processed by the third global average pooling layer, concatenated along the channel dimension by the fourth concatenation layer, and then sequentially passed through the dimensionality reduction convolutional layer, SiLU activation function layer, mapping convolutional layer, and Sigmoid function layer to generate scale weights corresponding to the three scale features. The weighted fusion unit sums the three scale features according to the scale weights to obtain the weighted fusion result. The residual protection unit multiplies the weighted fusion result by a learnable scale coefficient to obtain a lightweight increment. The lightweight increment is concatenated along the channel dimension by the third concatenation layer with the output feature of the eighth convolutional layer to obtain the concatenated result. The output convolutional unit convolves the concatenated result to obtain the output feature of the scale-adaptive spatial pyramid pooling module.

8. A mini-LED defect detection device based on high-frequency feature enhancement and semantic gating, characterized in that, include: The model building module is configured to construct and train a wafer-level mini-LED chip defect detection model based on an improved YOLOv8n, resulting in a trained wafer-level mini-LED chip defect detection model. This model, based on the YOLOv8n model, replaces each C2f module in the backbone network with a high-frequency enhancement network module, replaces the SPPF module at the end of the backbone network with a scale-adaptive spatial pyramid pooling module, and replaces each C2f module in the neck network with a semantically gated C2f module. The scale-adaptive spatial pyramid pooling module includes a sequentially connected eighth convolutional layer, multiple... The network comprises a scale-max pooling unit, a scale-weight generation unit, a weighted fusion unit, a residual protection unit, a third concatenation layer, and an output convolutional unit. The scale-weight generation unit includes a third global average pooling layer, a fourth concatenation layer, a dimensionality-reducing convolutional layer, a SiLU activation function layer, a mapped convolutional layer, and a Sigmoid function layer connected in sequence. The high-frequency enhancement bottleneck module used in the high-frequency enhancement network module includes a high-frequency feature generator, a feature fusion unit, and channel branches and spatial branches set in parallel between the high-frequency feature generator and the feature fusion unit. The semantic gated C2f module includes a feature extraction branch and a gated weight generation branch set in parallel. The detection module is configured to acquire a high-resolution microscopic image of the wafer-level mini-LED chip region to be detected and input it into the trained wafer-level mini-LED chip defect detection model to obtain the corresponding defect detection result.

9. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, characterized in that, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-7.