A small defect high-precision detection method based on EMD-YOLO algorithm

CN123015961APending Publication Date: 2026-10-30阳城国际发电有限责任公司 +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611469411.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于EMD-YOLO算法的小型缺陷高精度检测方法,解决现有光伏板红外缺陷检测技术中存在的弱小目标特征表达不足、多尺度特征融合失效、检测头自适应能力弱、检测精度偏低以及模型难以轻量化部署等问题,实现对光伏板红外缺陷的高精度、高效率、高鲁棒性检测

Benefits of technology

(1)检测精度高。通过CkLEG模块的双支路异核结构(边缘感知+高斯平滑)增强弱小缺陷特征表达,有效解决小目标特征退化问题。实验表明,mAP@0.5达94.5%,召回率达92%,热斑等微小缺陷检测精度提升显著;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015961A_ABST
    Figure CN123015961A_ABST
Patent Text Reader

Abstract

The application discloses a small defect high-precision detection method based on an EMD-YOLO algorithm, and belongs to the technical fields of photovoltaic panel defect detection, infrared image processing and deep learning target detection, and the method comprises the following steps: acquiring an infrared image of a photovoltaic panel and performing pretreatment; constructing an EMD-YOLO detection model, embedding a CkLEG feature integration enhancement module, adopting an MSrSF multi-scale self-adjusting semantic fusion module, introducing a DyHead dynamic detection head to realize three-dimensional self-adaptive modeling of scales, spaces and tasks; inputting the pretreated infrared image into the trained EMD-YOLO model, and outputting the category information and position coordinate information of the photovoltaic panel defects after feature enhancement extraction and multi-scale fine fusion. The application can effectively solve the problems of micro defect feature degradation in the infrared image of the photovoltaic panel, multi-scale fusion failure and weak adaptive ability of the detection head, and realizes high-precision real-time detection while ensuring light weight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of photovoltaic panel defect detection, infrared image processing and deep learning target detection technology, and in particular to a high-precision detection method for small defects based on the EMD-YOLO algorithm. Background Technology

[0002] In the actual operation and maintenance of photovoltaic power generation systems, photovoltaic panels are exposed to the outdoor environment for extended periods, making them prone to defects such as hot spots, cracks, vegetation shading, and abnormal cell strings. These defects directly affect the power generation efficiency of the photovoltaic panels and pose safety hazards. Therefore, rapid and accurate detection of photovoltaic panel defects is crucial. Infrared thermal imaging detection, with its advantages of being non-contact, visual, and suitable for large-scale inspections, has become the mainstream technology for photovoltaic panel defect detection.

[0003] In infrared image-based defect detection, single-stage target detection algorithms, represented by the YOLO series, are widely used due to their fast detection speed and convenient deployment. However, they still have significant shortcomings in practical scenarios involving the detection of small infrared defects in photovoltaic panels. Defect targets in photovoltaic panel infrared images are typically small in size, have low contrast, and weak texture information. After multiple downsampling operations by the network, feature degradation and information loss are easily encountered. The shallow feature extraction structure of the traditional YOLO network is insufficient to effectively represent the edge and detail information of such small targets, resulting in insufficient defect perception capabilities of the model.

[0004] Meanwhile, existing networks mostly use the Concat concatenation method for multi-scale feature fusion. This global fusion method introduces a large amount of redundant background information, causing weak defect features to be submerged during the fusion process, making it impossible to achieve accurate feature aggregation. In addition, traditional detection heads have a fixed structure, making it difficult to adapt to differences in scale, spatial location, and between different classification and regression tasks. When faced with photovoltaic panel defect scale differences and complex and variable backgrounds, the detection robustness is poor.

[0005] While some improved models for small target detection have improved detection accuracy to some extent, they significantly increase the number of model parameters and computational load, making it difficult to meet the real-time deployment requirements of scenarios such as UAV inspection and edge computing devices, and difficult to achieve an effective balance between accuracy and lightweight design. Summary of the Invention

[0006] The purpose of this invention is to provide a high-precision detection method for small defects based on the EMD-YOLO algorithm, which solves the problems of insufficient expression of weak target features, failure of multi-scale feature fusion, weak adaptive capability of detection head, low detection accuracy, and difficulty in lightweight deployment of model in existing photovoltaic panel infrared defect detection technology, so as to achieve high-precision, high-efficiency and high-robust detection of infrared defects in photovoltaic panels.

[0007] To achieve the above objectives, this invention provides a high-precision detection method for small defects based on the EMD-YOLO algorithm, comprising the following steps: Step S1: Acquire an infrared image of the photovoltaic panel and preprocess the infrared image; Step S2: Construct the EMD-YOLO detection model. The EMD-YOLO detection model uses YOLOv12 as the baseline network, embeds the CkLEG feature integration and enhancement module in the C3k2 bottleneck structure, adopts the MSrSF multi-scale self-adjusting semantic fusion module to replace the Concat splicing fusion method, removes the low-resolution detection head in the original network and adds a high-resolution detection head, and introduces the DyHead dynamic detection head. The CkLEG feature integration and enhancement module employs a dual-branch heterogeneous kernel bottleneck structure and a learnable feature gating fusion mechanism to enhance the edge representation and noise suppression capabilities of shallow features for weak defects. The MSrSF multi-scale self-adjusting semantic fusion module generates small target candidate region masks and performs multi-scale feature extraction and pixel-level attention weighting within the candidate regions to achieve region-guided fine-grained feature fusion. The DyHead dynamic detection head performs joint adaptive feature modeling in the scale dimension, spatial dimension, and task dimension. Step S3: Input the preprocessed infrared image into the trained EMD-YOLO detection model. After feature enhancement and extraction by the backbone network and CkLEG module, it is then fused at multiple scales by the MSrSF module. Finally, it is sent to the DyHead dynamic detection head to output the category information and location coordinate information of photovoltaic panel defects.

[0008] Preferably, the CkLEG feature integration and enhancement module includes a parallel edge-aware branch, a Gaussian modeling branch, and a directly connected path, as well as a feature gating fusion module and a channel attention module connected to the output of the three branches; The edge-aware branch uses edge extraction operators to extract horizontal and vertical edge features from the input features; The Gaussian modeling branch uses a Gaussian kernel to smooth the input features in order to suppress high-frequency noise; Directly connected paths are used to preserve the original input features; The feature-gated fusion module performs a weighted summation of the output features of the three branches using learnable fusion weights; The channel attention module adaptively recalibrates the fused features along the channel dimension and outputs an enhanced feature map.

[0009] Preferably, the edge extraction operator is a Scharr filter or a Sobel operator; the Gaussian kernel is a 5×5 Gaussian kernel; and the channel attention module is an efficient channel attention module.

[0010] Preferably, the MSrSF multi-scale self-adjusting semantic fusion module includes a mask extraction block, a multi-scale feature aggregation module, and a pixel-level attention module connected in sequence; The mask extraction block uses shallow high-resolution features to generate a detail mask and deep features to generate a semantic mask. The detail mask and the semantic mask are multiplied to obtain a small target candidate region mask, which is then used to crop the feature map. The multi-scale feature aggregation module performs multi-scale local feature extraction and aggregation within the cropped candidate region; The pixel-level attention module assigns adaptive weights to each pixel in the aggregated feature map in the spatial dimension to highlight features of defective regions and suppress features of background regions.

[0011] Preferably, the multi-scale feature aggregation module uses several parallel depthwise separable dilated convolution branches with different dilation rates to perform multi-scale feature extraction. The output features of each branch are upsampled to ensure consistent spatial resolution before feature aggregation.

[0012] Preferably, the void ratios are 1, 3 and 5.

[0013] Preferably, the DyHead dynamic detection head includes a scale-aware attention branch, a spatial-aware attention branch, and a task-aware attention branch; Scale-aware attention branches are used to learn the importance of features at different levels. The spatial awareness attention branch is used to adaptively match changes in the spatial location of the target. The task-aware attention branch is used to adaptively differentiate between classification and regression tasks. The outputs of the three attention branches are weighted and fused with the input features to obtain the final detection result.

[0014] Preferably, the scale-aware attention branch learns the importance of hierarchical features through global average pooling and convolution operations; the spatial-aware attention branch achieves dynamic matching of spatial locations through spatial sampling offset and convolution operations; and the task-aware attention branch achieves differentiated processing for classification and regression tasks through adaptive adjustment of channel dimensions.

[0015] Preferably, in step S2, the training process of the EMD-YOLO detection model uses the photovoltaic panel infrared defect dataset, with the input image size uniformly set to 640×640, and the SGD optimizer is used for training, with 300 training rounds.

[0016] Therefore, the present invention employs the above-mentioned high-precision detection method for small defects based on the EMD-YOLO algorithm, which has the following advantages: (1) High detection accuracy. The dual-branch heterogeneous kernel structure (edge ​​sensing + Gaussian smoothing) of the CkLEG module enhances the expression of weak and small defect features, effectively solving the problem of feature degradation of small targets. Experiments show that the mAP@0.5 reaches 94.5%, the recall rate reaches 92%, and the detection accuracy of small defects such as hot spots is significantly improved; (2) Precise feature fusion. The MSrSF module achieves the transformation from global fusion to region-guided fusion by cropping the background through candidate region masking, extracting multi-scale features through dilated convolution, and pixel-level attention weighting, effectively preventing small target features from being submerged by the background; (3) Strong detection robustness. The DyHead dynamic detection head adopts joint adaptive modeling in three dimensions: scale, space, and task, and adaptively matches the differentiated needs of different scales, positions, and tasks. It has stable detection performance when facing complex backgrounds. (4) Lightweight and real-time. The model has only 2.1M parameters, 13.6GFLOPs of computation, and 417FPS of inference speed. It can be directly deployed on UAVs and edge computing devices to meet the needs of large-scale real-time outdoor inspection.

[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0018] Figure 1 This is an overall flowchart of a high-precision detection method for small defects based on the EMD-YOLO algorithm in an embodiment of the present invention. Figure 2 This is a flowchart illustrating the overall network workflow of the EMD-YOLO algorithm in this embodiment of the invention. Figure 3 This is a flowchart illustrating the workflow of the CkLEG feature integration and enhancement module in this embodiment of the invention. Figure 4 This is a flowchart of the LEG module in an embodiment of the present invention; Figure 5 This is a flowchart of the EGA module in an embodiment of the present invention; Figure 6 This is a flowchart illustrating the workflow of the MSrSF multi-scale self-adjusting semantic fusion module in this embodiment of the invention. Figure 7 This is a flowchart illustrating the process of the ME Block mask extraction block in an embodiment of the present invention. Figure 8 This is a flowchart illustrating the workflow of the MSFA multi-scale feature aggregation module in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0021] Example like Figure 1-8 As shown in the figure, this embodiment proposes a high-precision detection method for small defects based on the EMD-YOLO algorithm. The specific implementation steps are as follows: Step S1: Acquire an infrared image of the photovoltaic panel and preprocess the infrared image; Step S2: Construct the EMD-YOLO detection model. The EMD-YOLO detection model uses YOLOv12 as the baseline network, embeds the CkLEG feature integration and enhancement module in the C3k2 bottleneck structure, adopts the MSrSF multi-scale self-adjusting semantic fusion module to replace the Concat splicing fusion method, removes the low-resolution detection head in the original network and adds a high-resolution detection head, and introduces the DyHead dynamic detection head. The CkLEG feature integration and enhancement module employs a dual-branch heterogeneous kernel bottleneck structure and a learnable feature gating fusion mechanism to enhance the edge representation and noise suppression capabilities of shallow features for weak defects. The MSrSF multi-scale self-adjusting semantic fusion module generates small target candidate region masks and performs multi-scale feature extraction and pixel-level attention weighting within the candidate regions to achieve region-guided fine-grained feature fusion. The DyHead dynamic detection head performs joint adaptive feature modeling in the scale dimension, spatial dimension, and task dimension. Step S3: Input the preprocessed infrared image into the trained EMD-YOLO detection model. After feature enhancement and extraction by the backbone network and CkLEG module, it is then fused at multiple scales by the MSrSF module. Finally, it is sent to the DyHead dynamic detection head to output the category information and location coordinate information of photovoltaic panel defects.

[0022] The CkLEG feature integration and enhancement module includes a parallel edge-aware branch, a Gaussian modeling branch, and a directly connected path, as well as a feature-gated fusion module and a channel attention module connected to the outputs of the three branches. The edge-aware branch uses an edge extraction operator to extract horizontal and vertical edge features from the input features. The edge extraction operator is either a Scharr filter or a Sobel operator. The Gaussian kernel is a 5×5 Gaussian kernel. The Gaussian modeling branch uses a Gaussian kernel to smooth the input features to suppress high-frequency noise. The directly connected path is used to preserve the original input features. The feature-gated fusion module performs a weighted summation of the output features of the three branches using learnable fusion weights. The channel attention module adaptively recalibrates the fused features in the channel dimension and outputs an enhanced feature map. The channel attention module is an efficient channel attention module.

[0023] The MSrSF multi-scale self-adjusting semantic fusion module includes a mask extraction block, a multi-scale feature aggregation module, and a pixel-level attention module connected in sequence. The mask extraction block generates a detail mask using shallow high-resolution features and a semantic mask using deep features. The detail mask and the semantic mask are multiplied to obtain a small target candidate region mask, which is then used to crop the feature map. The multi-scale feature aggregation module performs multi-scale local feature extraction and aggregation within the cropped candidate region. The pixel-level attention module assigns adaptive weights to each pixel in the aggregated feature map in the spatial dimension to highlight defect region features and suppress background region features.

[0024] The multi-scale feature aggregation module uses several parallel depthwise separable dilated convolutional branches with different dilation rates (1, 3 and 5 respectively) to extract features at multiple scales. The output features of each branch are upsampled to ensure consistent spatial resolution before feature aggregation.

[0025] The DyHead dynamic detection head includes a scale-aware attention branch, a spatial-aware attention branch, and a task-aware attention branch. The scale-aware attention branch is used to learn the importance of features at different levels. The spatial-aware attention branch is used to adaptively match the spatial position changes of the target. The task-aware attention branch is used to adaptively adapt the differences between classification and regression tasks. The outputs of the three attention branches are weighted and fused with the input features to obtain the final detection result.

[0026] The scale-aware attention branch learns the importance of hierarchical features through global average pooling and convolution operations; the spatial-aware attention branch achieves dynamic matching of spatial locations through spatial sampling offset and convolution operations; and the task-aware attention branch achieves differentiated processing for classification and regression tasks through adaptive adjustment of channel dimensions.

[0027] The training process of the EMD-YOLO detection model uses the photovoltaic panel infrared defect dataset, with the input image size uniformly set to 640×640. The SGD optimizer is used for training, and the training rounds are 300.

[0028] One specific implementation method is as follows: I. Model Building: This invention utilizes the PyTorch deep learning framework to construct the EMD-YOLO model. First, the basic network of the model is built, using YOLOv12n as the baseline model. The specific construction steps are as follows: (I) Embedding and implementing the CkLEG module: like Figure 3 As shown, the original network C3k2 bottleneck structure is replaced with an enhanced structure embedding the CkLEG module. The specific implementation of the CkLEG module is as follows: The input feature map is first subjected to a 1×1 convolution to adjust the number of channels, and then divided into three paths before entering the dual-branch heterogeneous bottleneck structure.

[0029] The first path is the edge-sensing branch, which uses a Scharr filter to extract and normalize horizontal and vertical edge features. The horizontal convolution kernel of the Scharr filter... and vertical convolution kernel They are respectively: ; ; For the input feature map Horizontal edge features and vertical edge features Obtained through convolution operations respectively: ; ; in, This represents a convolution operation. After concatenating the horizontal and vertical edge features along the channel dimension, and then performing batch normalization, the edge enhancement features are obtained. .

[0030] The second path is the Gaussian modeling branch, which uses a 5×5 Gaussian kernel depthwise separable convolution to achieve smooth feature modeling. (Gaussian kernel) Defined as: ; in, The pixel coordinates within the kernel. In this embodiment, the standard deviation parameter is used. Set the value to 1.0. Perform a depthwise separable convolution on the input feature map and a Gaussian kernel to obtain Gaussian smoothed features. .

[0031] The third path is a direct connection, preserving the original input features. .

[0032] The three output features are fed into the EGA module for learnable selection and fusion. For example... Figure 5 As shown, the EGA module first performs global average pooling on the three features to obtain three global feature description vectors. After concatenation, these vectors are passed through a fully connected layer and a Softmax function to generate three fusion weights. , , ,satisfy The fusion process is represented as: ; The fused features are then weighted using ECA channel attention to generate channel weights. The implementation of ECA channel attention is as follows: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] Global average pooling is performed to obtain channel-dimensional feature vectors, which are then processed by one-dimensional convolution (with a kernel size of 3) and a sigmoid activation function to generate channel weights. ,Will and Element-wise multiplication outputs the enhanced feature map. : ; ; in Indicates global average pooling. Represents one-dimensional convolution. This represents the Sigmoid activation function. This indicates element-wise multiplication.

[0033] (II) Embedded Implementation of MSrSF Module: like Figure 6 As shown, the Concat feature fusion method in PANet is replaced with the MSrSF multi-scale self-adjusting semantic fusion module. The specific implementation of the MSrSF module is as follows: First, the shallow high-resolution features of the network and deep features Enter ME Block. For example... Figure 7 As shown, ME Block Minute masks are generated by convolution and double upsampling. ,right Semantic masks are generated by convolution and double upsampling. : ; ; in This indicates a convolution plus interpolation upsampling operation. This represents the Sigmoid activation function. Multiplying the two results in the small target candidate region mask. : ; use The multi-layer feature maps that need to be fused are cropped into regions, and the resulting local features are sent to the MSFA module.

[0034] like Figure 8 As shown, the MSFA module uses three parallel depthwise separable dilated convolutional branches with dilation rates of 1, 3 and 5 to extract features at multiple scales. The output features of each branch are upsampled to ensure consistent spatial resolution before feature aggregation.

[0035] The aggregated features are then processed by pixel-level attention (PA) to generate spatial weights. The PA module generates a spatial weight map by performing a 1×1 convolution and a sigmoid activation function on the aggregated feature map. The weight value of each pixel in the weight map is adaptively calculated based on the local context information of that pixel location. The spatial weight map is then multiplied element-wise with the aggregated feature map to achieve refined feature fusion in local regions, effectively highlighting defective areas and suppressing background interference.

[0036] (III) Implementation of embedding the DyHead dynamic detection head: Remove the low-resolution detector head (corresponding to a feature map size of 20×20) from the original network, add a high-resolution detection branch (detector head corresponding to a feature map size of 80×80), and replace all detector heads with the DyHead dynamic detector head structure.

[0037] The specific implementation of the DyHead dynamic detection head is as follows: attention weights are calculated for the input feature tensor in the scale dimension, spatial dimension, and task dimension, respectively.

[0038] Scale-aware attention learns the importance of features at different levels through global average pooling and 1×1 convolution. Specifically, global average pooling is performed on the feature maps of layer S to obtain S global feature vectors, which are then used to generate scale attention weights through 1×1 convolution and the Softmax function.

[0039] Spatial awareness attention achieves spatial sampling shift through deformable convolution, enabling the sampling points of the convolution kernel to shift according to the actual shape and position of the target, thus adaptively matching the spatial position changes of the target.

[0040] Task-aware attention achieves differentiated processing for classification and regression tasks by adaptively adjusting the channel dimension.

[0041] After fusing 3D attention, the output is the classification confidence and bounding box regression results.

[0042] II. Model Training: The model was trained using the IRT-PV photovoltaic infrared defect dataset and the IRSTD-1K infrared small target dataset. The training parameters were set as follows: The input image size was uniformly set to 640×640; the batch size was set to 16; the number of training rounds was set to 300; the optimizer was SGD, the momentum was set to 0.937, and the weight decay was set to 0.0005; the initial learning rate was set to 0.01, and the cosine annealing learning rate decay strategy was adopted; the other hyperparameters followed the default settings of YOLOv12.

[0043] During training, Mosaic and MixUp data augmentation strategies were used to improve the model's generalization ability.

[0044] III. Model Evaluation: The model evaluation uses the following metrics: mAP@0.5 (mean precision when the IoU threshold is 0.5), precision, recall, FPS (frames per second), number of parameters, and GFLOPs (gigabytes of computation).

[0045] In one embodiment of the present invention, the model was evaluated on a self-built IRT-PV photovoltaic infrared defect dataset. The model achieved an mAP@0.5 of 94.5%, a recall of 92%, 2.1M model parameters, a computational cost of 13.6 GFLOPs, and an inference speed of 417 FPS. It also maintained stable detection performance on the IRSTD-1K infrared weak target public dataset.

[0046] IV. Photovoltaic panel infrared defect detection process: In actual testing scenarios, drones equipped with infrared thermal imaging cameras are used to collect infrared images of photovoltaic panels.

[0047] The acquired infrared images are preprocessed and then input into the trained EMD-YOLO detection model. Image preprocessing includes: normalizing the infrared image size to 640×640, normalizing the pixel values ​​(dividing by 255), and using median filtering to remove noise.

[0048] The model inference process is as follows: The infrared image is first processed by a backbone network (containing a CkLEG module) to extract enhanced multi-scale features. Specifically, the shallow high-resolution features are enhanced for edge enhancement and noise suppression through the CkLEG module, effectively preserving the detailed information of small defects.

[0049] Then, the enhanced multi-scale features are subjected to region-guided fine-grained fusion via the MSrSF module. Specifically, MEBlock generates a mask for candidate regions of small targets, uses the mask to crop the background region, performs MSFA multi-scale feature aggregation only on potential defect regions, and then performs pixel-level attention weighting via PA to achieve fine-grained fusion.

[0050] Finally, the fused features are fed into the DyHead dynamic detection head, and after being weighted by scale, space, and task-specific 3D attention, the class confidence and bounding box coordinates of each defect target are output. .

[0051] The test results are displayed in real time through the result output unit, and the types of defects such as hot spot defects, fragmentation defects, plant shading defects, and abnormal battery string defects are labeled.

[0052] V. Alternative Implementation Plan: In the above embodiments, the Scharr operator can be replaced with the Sobel operator, the Gaussian kernel can be replaced with the mean filter kernel, and the parallel dilated convolution can be replaced with ordinary convolution with different kernel sizes (such as 3×3, 5×5, 7×7). These replacement schemes can also achieve the purpose of the invention and should be regarded as equivalent implementation schemes of the invention.

[0053] 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A high-precision detection method for small defects based on the EMD-YOLO algorithm, characterized in that, Includes the following steps: Step S1: Acquire an infrared image of the photovoltaic panel and preprocess the infrared image; Step S2: Construct the EMD-YOLO detection model. The EMD-YOLO detection model uses YOLOv12 as the baseline network, embeds the CkLEG feature integration and enhancement module in the C3k2 bottleneck structure, adopts the MSrSF multi-scale self-adjusting semantic fusion module to replace the Concat splicing fusion method, removes the low-resolution detection head in the original network and adds a high-resolution detection head, and introduces the DyHead dynamic detection head. The CkLEG feature integration and enhancement module employs a dual-branch heterogeneous kernel bottleneck structure and a learnable feature gating fusion mechanism to enhance the edge representation and noise suppression capabilities of shallow features for weak defects. The MSrSF multi-scale self-adjusting semantic fusion module generates small target candidate region masks and performs multi-scale feature extraction and pixel-level attention weighting within the candidate regions to achieve region-guided fine-grained feature fusion. The DyHead dynamic detection head performs joint adaptive feature modeling in the scale dimension, spatial dimension, and task dimension. Step S3: Input the preprocessed infrared image into the trained EMD-YOLO detection model. After feature enhancement and extraction by the backbone network and CkLEG module, it is then fused at multiple scales by the MSrSF module. Finally, it is sent to the DyHead dynamic detection head to output the category information and location coordinate information of photovoltaic panel defects.

2. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 1, characterized in that: The CkLEG feature integration and enhancement module includes a parallel edge-aware branch, a Gaussian modeling branch, and a direct-connect path, as well as a feature-gated fusion module and a channel attention module connected to the outputs of the three branches; The edge-aware branch uses edge extraction operators to extract horizontal and vertical edge features from the input features; The Gaussian modeling branch uses a Gaussian kernel to smooth the input features in order to suppress high-frequency noise; Directly connected paths are used to preserve the original input features; The feature-gated fusion module performs a weighted summation of the output features of the three branches using learnable fusion weights; The channel attention module adaptively recalibrates the fused features along the channel dimension and outputs an enhanced feature map.

3. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 2, characterized in that: The edge extraction operator is a Scharr filter or a Sobel operator; the Gaussian kernel is a 5×5 Gaussian kernel; and the channel attention module is an efficient channel attention module.

4. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 1, characterized in that: The MSrSF multi-scale self-adjusting semantic fusion module includes a mask extraction block, a multi-scale feature aggregation module, and a pixel-level attention module connected in sequence. The mask extraction block uses shallow high-resolution features to generate a detail mask and deep features to generate a semantic mask. The detail mask and the semantic mask are multiplied to obtain a small target candidate region mask, which is then used to crop the feature map. The multi-scale feature aggregation module performs multi-scale local feature extraction and aggregation within the cropped candidate region; The pixel-level attention module assigns adaptive weights to each pixel in the aggregated feature map in the spatial dimension to highlight features of defective regions and suppress features of background regions.

5. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 4, characterized in that: The multi-scale feature aggregation module uses several parallel depthwise separable dilated convolution branches with different dilation rates to extract features at multiple scales. The output features of each branch are upsampled to ensure consistent spatial resolution before feature aggregation.

6. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 5, characterized in that: The void ratios were 1, 3, and 5, respectively.

7. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 1, characterized in that: The DyHead dynamic detection head includes a scale-aware attention branch, a spatial-aware attention branch, and a task-aware attention branch. Scale-aware attention branches are used to learn the importance of features at different levels. The spatial awareness attention branch is used to adaptively match changes in the spatial location of the target. The task-aware attention branch is used to adaptively differentiate between classification and regression tasks. The outputs of the three attention branches are weighted and fused with the input features to obtain the final detection result.

8. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 7, characterized in that: The scale-aware attention branch learns the importance of hierarchical features through global average pooling and convolution operations; the spatial-aware attention branch achieves dynamic matching of spatial locations through spatial sampling offset and convolution operations; and the task-aware attention branch achieves differentiated processing for classification and regression tasks through adaptive adjustment of channel dimensions.

9. The high-precision detection method for small defects based on the EMD-YOLO algorithm according to claim 1, characterized in that: In step S2, the training process of the EMD-YOLO detection model uses the photovoltaic panel infrared defect dataset, with the input image size uniformly set to 640×640. The SGD optimizer is used for training, and the number of training rounds is 300.