MEF-YOLOv8-based foreign matter detection method and system for power transmission line in complex environment

By improving the MEF-YOLOv8 model and combining Mosaic-9 data augmentation, the EMA module, and the Focal-EIOU loss function, the accuracy and robustness issues of foreign object detection in transmission lines under complex environments are solved, achieving efficient and accurate foreign object detection and adapting to real-time inspections in complex environments.

CN121190938APending Publication Date: 2025-12-23XINJIANG INST OF ENG
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511268547.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing foreign object detection technologies for power transmission lines suffer from low accuracy and insufficient environmental adaptability in complex environments. In particular, the model feature extraction capability is significantly reduced in adverse weather conditions such as rain, fog, and low light, leading to missed detections and false detections, which makes it difficult to meet the needs of real-time inspection.

Method used

We adopted a MEF-YOLOv8-based approach and improved the model's feature capture capability and detection robustness for foreign objects through triple improvements including Mosaic-9 data augmentation, EMA module, and Focal-EIOU loss function. These improvements included dataset construction and augmentation, EMA module integration and backbone network improvement, and Focal-EIOU loss function integration.

Benefits of technology

It significantly improves the detection accuracy and robustness of the model in complex environments, reduces the false negative rate, meets the high precision and high efficiency requirements of UAV inspection, and provides technical support for the safe operation and maintenance of smart grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190938A_ABST
    Figure CN121190938A_ABST
Patent Text Reader

Abstract

The invention provides a power transmission line foreign matter detection method in a complex environment based on MEF-YOLOv8, and relates to the technical field of power transmission line intelligent detection.The method comprises the steps that firstly, a foreign matter image data set comprising bird nests, garbage, kite and balloons is constructed, the data set is expanded and enhanced through the Mosaic-9 data enhancement technology, and the foreign matter image data set is obtained; a LabelImg tool is adopted to carry out detection frame labeling on the data set, and the generalization ability of the model is improved; secondly, an efficient multi-scale attention (EMA) module is integrated into a C2f structure of a YOLOv8 backbone network, and pixel-level enhancement of multi-scale foreign matter features is achieved through feature grouping, parallel sub-network processing and cross-space learning; then, a Focal-EIOU loss function is integrated into the YOLOv8 model, and the training process is optimized through EIOU loss item calculation, a Focal weight adjustment mechanism and hyper-parameter lambda fusion; and finally, training and testing the improved YOLOv8 model, and outputting a detection result. According to the method, the detection precision and robustness of the foreign matters of the power transmission line in a complex environment are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power transmission line target detection, and particularly relates to a power transmission line foreign matter detection method and system based on MEF-YOLOv8 in complex environment. BACKGROUND

[0002] As the core infrastructure of the power system, the safe and stable operation of the power transmission line is directly related to the reliability of the power grid. However, under the influence of natural weather (such as heavy snow, strong wind), bird activity and human factors, the power transmission line often has foreign matters such as bird nests, plastic garbage and balloons attached. These foreign matters are easy to cause line short circuit, fire and other accidents, which seriously threaten the safety of the power system. The traditional manual inspection method has been gradually replaced by unmanned aerial vehicles and outdoor cameras and other automated technologies, but how to efficiently identify foreign matters in complex environments is still a technical problem to be solved.

[0003] Current power transmission line foreign matter detection mainly relies on two types of models: two-stage models (such as R-CNN, Faster R-CNN, Mask R-CNN), which have improved accuracy through pre-training networks and multi-scale feature fusion, but have the defects of high computational complexity and poor real-time performance, making it difficult to meet the real-time inspection requirements; single-stage models (such as SSD, YOLO series) have advantages in detection speed, but existing improved methods still have limitations, such as rain, fog, and dark light interference leading to a decrease in image quality, which significantly reduces the model's feature extraction capability; the irregular shape and large scale difference of foreign matter targets make them easily confused with similar background objects, leading to missed detection and false detection; the detection robustness is insufficient in the environment of occluded targets and small-scale foreign matters. It is particularly noteworthy that the existing adverse weather needs further study on the attenuation effect on image quality, and the calculation in this environment relies on a large amount of computing resources; in addition, in complex environments, the model's feature representation ability and detection accuracy need to be further strengthened and optimized to balance the dual demands of speed and accuracy. SUMMARY

[0004] The present application provides a power transmission line foreign matter detection method and system based on MEF-YOLOv8 in complex environment, aiming at the low recognition accuracy and insufficient environmental adaptability of existing power transmission line foreign matter detection technology in complex environment (such as rain, fog, and dark light). Through the triple improvement of Mosaic-9 data enhancement, EMA module and Focal-EIOU loss function, the model's feature capture ability and detection robustness for bird nests, garbage, balloons and other foreign matters are significantly improved, achieving high-precision detection while ensuring real-time performance.

[0005] To achieve the above purpose, the present application adopts the following technical solutions:

[0006] A method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 includes the following steps:

[0007] S1. Construction and Augmentation of Foreign Object Dataset for Transmission Lines: Construct an original dataset of foreign object images containing bird nests, garbage, kites, and balloons; use Mosaic-9 data augmentation technology to generate new samples through splicing, cropping, and rotation operations to expand the dataset under normal conditions; merge foreign object images under normal conditions to generate foreign object images under various severe weather conditions; use the LabelImg tool to label the location and category of foreign objects; and divide the dataset into training set, validation set, and test set according to proportions.

[0008] S2. Integration of EMA Module and Improvement of Backbone Network: Design an EMA module to realize feature grouping, parallel sub-network processing and cross-spatial learning operations: Divide the input feature map into G groups along the channel dimension, perform bidirectional one-dimensional global average pooling through a 1×1 branch to generate spatial location-related features, generate a spatial attention map through a 3×3 branch, aggregate features using the Sigmoid function and output attention weight map, and replace the Bottleneck of the C2f module in the YOLOv8 backbone network with the EMA module.

[0009] S3. Focal-EIOU Loss Function Ensemble: Define the Focal-EIOU loss function. First, define the EIOU loss function, which includes hyperparameters λ1 and λ2 used to balance the weights of different loss terms, and the IoU loss L. IOU Center point distance loss L center and aspect ratio loss L whr Then, define the Focal loss function: based on the weight factor α. t The focus of positive and negative samples is balanced with the adjustment factor γ; then, the Focal and EIOU loss functions are balanced with the hyperparameter λ; finally, the original YOLOv8 loss function is replaced with Focal-EIOU.

[0010] S4. Model Training and Detection: The improved YOLOv8 model is trained using the training set, the model performance is evaluated using the validation set, and the final test is performed using the test set. The image to be detected is input into the trained model, and the location information, category, and confidence score of the detected target are output.

[0011] Furthermore, the Mosaic-9 data augmentation technology described in step S1 specifically includes: randomly selecting 9 original images, generating sub-images through blurring, color space perturbation, adding noise, occlusion, rotation, scaling, and random cropping; stitching the sub-images together into a new sample using a 3×3 grid, while preserving the coordinate mapping relationship of the original labeled boxes.

[0012] Furthermore, the EMA module in step S2 adopts a multi-branch architecture, where different branches use different receptive ranges to obtain information at different levels and generate more easily distinguishable feature representations. This mainly includes feature grouping, parallel multi-branch networks, cross-spatial interactive learning, and feature enhancement stages. The specific implementation methods for each stage are as follows:

[0013] The feature grouping stage takes the input feature map X∈R C×H×W Divide the feature maps into G groups along the channel dimension: X = [X0, X1, ..., X... i ,…,X G-1 ], where sub-feature maps H and W represent the dimensions in the vertical and horizontal directions, respectively, and C represents the number of channels;

[0014] The parallel multi-scale processing stage includes a two-branch operation: in the 1×1 branch, bidirectional one-dimensional global average pooling is performed on each group of sub-features, let P h and P w Given the feature maps in the horizontal and vertical dimensions, respectively, the output of the 1x1 convolutional branch can be represented as:

[0015]

[0016] Simultaneously, sub-features are processed through 3×3 convolution kernels in the 3×3 branch to capture local spatial correlations;

[0017] In the cross-spatial interaction stage, the 1×1 branch output is multiplied by the 3×3 branch features after Group Normalization, and the pooled output is processed by the Softmax function to generate a spatial attention map with a dimension of 1×H×W.

[0018] In the feature enhancement stage, the spatial attention maps of the two branches are fused and normalized by the Sigmoid function to generate the final attention weight map. The original feature map is multiplied element-wise with the weight map to output the enhanced feature map.

[0019] Furthermore, the Focal-EIOU loss function described in step S3 is defined as follows:

[0020] L Focal-EIOU =L Focal +λL EIOU

[0021] In the formula, L EIOU L represents the EIOU loss function; Focal λ represents the Focal loss function; λ is a hyperparameter used to balance the weights of the Focal and EIOU loss functions.

[0022] The EIOU loss function expression is as follows:

[0023] L EIOU =L IOU +λ1L center +λ2L whr

[0024] In the formula, λ1 and λ2 are hyperparameters used to balance the weights of different loss terms, and L IOU It is IoU loss, L center It is the center point distance loss, L whr This refers to aspect ratio loss, and the specific calculation formulas for each loss are as follows:

[0025]

[0026] In the formula, IOU = |A∩B| / |A∪B|, N is the sample size, and d i D is the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. i It is half the diagonal length of the actual bounding box, w i and h i It predicts the width and height of the bounding box. and These are the width and height of the actual bounding box;

[0027] The Focal loss function expression is as follows:

[0028] FL(p t )=-α t (1-p t ) γ log(p t )

[0029] In the formula, α t It is a weighting factor that balances positive and negative samples. Different α values ​​can be set for positive and negative samples respectively. t It is the model's predicted probability that a sample belongs to a certain class. For positive samples, p t It is the probability that the model predicts it as a positive sample; for negative samples, p t It is the probability that the model predicts it to be a negative sample. γ is an adjustment factor used to reduce the focus on easily classified samples and increase the focus on difficult-to-classify samples.

[0030] Furthermore, in the model training and detection process described in step S4, the collected dataset contains 5900 images, including various labels such as bird nests, garbage, kites and balloons, and the ratio of the training set, validation set and test set is 6:3:1.

[0031] Furthermore, in the model training and detection process described in step S4, several key performance indicators were used to evaluate the effectiveness of the model in the object detection task: precision P, recall R, mean precision AP, mean average, and precision mAP. The specific calculation formulas for these indicators are as follows:

[0032]

[0033] In the formula, TP is the number of samples correctly predicted as positive, FP is the number of samples incorrectly predicted as positive, FN is the number of samples incorrectly predicted as negative, and R... k Let P be the recall rate at the k-th confidence threshold. k For the precision at the k-th recall rate, AP i Let be the average precision of the i-th type of foreign object.

[0034] A foreign object detection system for transmission lines in complex environments based on MEF-YOLOv8 is characterized by comprising a dataset acquisition module, a dataset adjustment module, a dataset annotation module, a modeling module, a training module, and a prediction module, as well as a memory and a processor. The memory stores a program running on the processor, and when the processor runs the program, it executes the steps of the foreign object detection method for transmission lines in complex environments based on MEF-YOLOv8 described above.

[0035] A computer-readable storage medium storing computer instructions thereon, characterized in that, when the computer instructions are executed, they perform the steps of the method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 as described above.

[0036] Invention Effects

[0037] To enhance adaptability to complex environments, this method generates multi-scale, multi-background composite training samples using the Mosaic-9 data augmentation method, significantly improving the model's generalization ability to adverse weather conditions such as rain, fog, and low light, thus solving the feature extraction failure problem caused by environmental interference in traditional methods. Secondly, by embedding an efficient EMA module into the backbone network, cross-channel interaction and dynamic allocation of pixel-level feature weights are achieved, improving the model's feature utilization rate for small foreign objects and irregular targets, and reducing the false negative rate. Finally, the Focal-EIOU loss function is used to replace the original CIOU loss, and the focus mechanism adjusts the weights of easy and difficult samples, effectively solving the problems of false detection of similar backgrounds and false negative detection of blurred targets in complex environments, and improving the average accuracy of foreign object detection. This invention significantly improves the detection reliability in complex scenarios while maintaining the real-time detection speed of YOLOv8, meeting the dual requirements of high accuracy and high efficiency for UAV inspection, and providing core technical support for the safe operation and maintenance of smart grids. Attached Figure Description

[0038] To more clearly illustrate the technical solution 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.

[0039] Figure 1 This is a flowchart of a foreign object detection method for transmission lines in complex environments based on MEF-YOLOv8, as described in this invention.

[0040] Figure 2 This is a schematic diagram of Mosaic-9 in this invention;

[0041] Figure 3 This is a diagram of the EMA network structure in this invention;

[0042] Figure 4 This is a structural diagram of the MEF-YOLOv8 model in this invention;

[0043] Figure 5 This is a loss curve of the MEF-YOLOv8 model in this invention; Detailed Implementation

[0044] To make the structure and advantages of the present invention clearer, the structure of the present invention will now be further described in conjunction with the accompanying drawings.

[0045] In this embodiment, the present invention proposes a method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8. The flowchart of this method is as follows: Figure 1 As shown, it includes the following steps:

[0046] S1. Construction and Augmentation of Foreign Object Dataset for Transmission Lines: This section constructs an original dataset of images of foreign objects including bird nests, trash, kites, and balloons. In this example, the Mosaic-9 augmentation method is used, the principle of which is as follows... Figure 2 As shown, this method is used to optimize the original YOLOv8 Mosaic-4 enhancement method. Mosaic-9 randomly selects 9 images and uses enhancement techniques such as stitching, cropping, and rotation to stitch different images together. An image dataset is built using existing detection images and public datasets, and various scenarios (such as foggy weather and rainstorm) are simulated through noisy blurring technology to diversify the dataset. The detection boxes of the dataset are labeled using the LabelImg tool. A training set, a validation set, and a test set are built in a ratio of 6:3:1.

[0047] S2. Embed the EMA module into the C2f structure of YOLOv8 to solve problems such as false detection and missed detection that are prone to occur during the detection process.

[0048] In this example, the overall structure of the EMA is as follows: Figure 3 As shown, it mainly includes feature grouping, parallel multi-branch network, cross-space interactive learning, and feature enhancement stages. In the EMA module, the feature grouping stage takes the input feature map X∈R C×H×W Divide the feature maps into G groups along the channel dimension: X = [X0, X1, ..., X... i ,…,X G-1 ], where sub-feature maps H and W represent the dimensions in the vertical and horizontal directions, respectively, and C represents the number of channels.

[0049] The parallel multi-scale processing stage includes a two-branch operation, which uses convolutional kernels of different sizes to input G groups of sub-feature maps into two parallel sub-networks. The first sub-network is a 1×1 branch containing two parallel paths, performing one-dimensional global average pooling on the feature information in the horizontal and vertical dimensions respectively, thereby establishing the connection between channel and spatial location information and decomposing two different feature maps representing different spatial directions. Let P... h and P w Given the feature maps in the horizontal and vertical dimensions, respectively, the output of the 1x1 convolutional branch can be represented as:

[0050]

[0051] Simultaneously, sub-features are processed through 3×3 convolution kernels in the 3×3 branch to capture local spatial correlations;

[0052] The cross-space learning method comprehensively considers the information of all pixel-level features in the branches, and uses the Sigmoid function to aggregate and normalize the features extracted from different branches to obtain the final attention weight map.

[0053] S3. Use Focal-EIOU as an alternative to CIOU. Focal-EIOU combines EIOU and Focal loss functions to address the class imbalance problem while improving the accuracy of object detection.

[0054] In this example, Focal-EIOU combines the EIOU and Focal loss functions to address the class imbalance problem while improving the accuracy of object detection.

[0055] The definition of Focal-EIOU Loss is as follows:

[0056] L Focal-EIOU =L Focal +λLEIOU

[0057] In the formula, L EIOU L represents the EIOU loss function; Focal λ represents the Focal loss function; λ is a hyperparameter used to balance the weights of the Focal and EIOU loss functions.

[0058] The EIOU loss function expression is as follows:

[0059] L EIOU =L IOU +λ1L center +λ2L whr

[0060] In the formula, λ1 and λ2 are hyperparameters used to balance the weights of different loss terms, and L IOU It is IoU loss, L center It is the center point distance loss, L whr This refers to aspect ratio loss, and the specific calculation formulas for each loss are as follows:

[0061]

[0062] In the formula, IOU = |A∩B| / |A∪B|, N is the sample size, and d i D is the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. i It is half the diagonal length of the actual bounding box, w i and h i It predicts the width and height of the bounding box. and These are the width and height of the actual bounding box.

[0063] The Focal loss function expression is as follows:

[0064] FL(p t )=-α t (1-p t ) γ log(p t )

[0065] In the formula, α t It is a weighting factor that balances positive and negative samples; different α values ​​can be set for positive and negative samples respectively. t It is the model's predicted probability that a sample belongs to a certain class. For positive samples, p t It is the probability that the model predicts it as a positive sample; for negative samples, p t It represents the probability that the model predicts it to be a negative sample. γ is a modulating factor used to reduce the focus on easily classified samples and increase the focus on difficult-to-classify samples.

[0066] The overall architecture of the MEF-YOLOv8 model is as follows: Figure 4 As shown, the YOLOv8 network consists of four parts: Input, Backbone, Neck, and Head. The YOLOv8 network structure is similar to other algorithms in the YOLO series. Due to the variable target scale and indistinct features in the foreign object dataset for power transmission lines, the network's detection performance is affected. To address these issues, this paper proposes the MEF-YOLOv8 foreign object detection model for power transmission lines. This network improves in three key aspects to enhance detection accuracy and efficiency.

[0067] The YOLOv8 network structure described herein utilizes YOLO, a single-stage object detection model that directly predicts the location and category of an object through regression, characterized by high efficiency and speed. YOLOv8 is a relatively new algorithm in the YOLO series, incorporating key innovations from previous generations to achieve a good balance between speed and accuracy. Based on model width and depth, YOLOv8 provides five versions: n, s, m, l, and x. YOLOv8n is the lightest network structure among them, exhibiting fast detection speed and making it highly suitable for real-time foreign object detection on power transmission lines. Therefore, this invention selects YOLOv8n as the baseline model, maintaining high detection accuracy and speed while avoiding high computational memory costs.

[0068] The input end adopts the same architecture as YOLOv7, but replaces the Mosic-4 data augmentation method with Mosic-9. The nine input images are randomly stacked to increase the amount of data and thus increase the batch size.

[0069] The backbone network, referencing the YOLOv7 Extended-ELAN design, introduces an EMA module into the YOLOv8 backbone network to enhance channel description capabilities and pixel-level attention allocation. After each convolutional module, the EMA modules are merged by reshaping a portion of the channels into batch dimensions. This design divides the input feature map into 128 sub-feature groups, each capable of learning different semantics. Weight descriptors are extracted through three parallel paths, the feature maps are grouped, and cross-dimensional interactions using 1×1 and 3×3 branches are used to aggregate and capture pixel-level pairwise relationships. This design, through feature grouping and a multi-scale structure, enhances the model's ability to distinguish targets from backgrounds in complex environments and reduces false detections.

[0070] The prediction head adopts a mainstream decoupled head structure. To address the class imbalance problem and improve the accuracy and speed of object detection, Focal-EIOU is introduced as the regression loss function. The Focal-EIOU loss function further improves the regression accuracy and convergence speed of the model by introducing a weighting mechanism for easy and difficult samples and a more refined measure of bounding box similarity.

[0071] This example uses several key performance indicators: precision (P), recall (R), mean precision (AP), mean average, and precision (mAP). The specific formulas for calculating these indicators are as follows:

[0072]

[0073] In the formula, TP is the number of samples correctly predicted as positive, FP is the number of samples incorrectly predicted as positive, FN is the number of samples incorrectly predicted as negative, and R... k Let P be the recall rate at the k-th confidence threshold. k For the precision at the k-th recall rate, AP i Let be the average precision of the i-th type of foreign object.

[0074] In this example, using the same hyperparameters and training process, the Mosic-9 data augmentation method, EMA, and Focal-EIOU loss function were added in sequence. The ablation experiment results are shown in Table 1.

[0075] Table 1 Ablation Experiment

[0076]

[0077] Experiments show that the MEF-YOLOv8 detection model developed in this paper achieves P, R, and mAP@0.5 values ​​of 0.937, 0.989, and 0.990, respectively. These results represent improvements of 5.0%, 6.1%, and 4.9% over the baseline, indicating that the improved modules of the MEF-YOLOv8 detection model are effective in detecting foreign objects on transmission lines.

[0078] YOLOv6, YOLOv7, and YOLOv8 were trained on the constructed transmission line foreign object dataset using the same hyperparameters and tested on edge segment devices. The AP comparison results of different models are shown in Table 2.

[0079] Table 2 Comparison of AP results for different models

[0080]

[0081] Experiments show that, compared to the YOLOv8n model, MEF-YOLOv8 improves the AP values ​​for bird nest and kite detection by 0.091 and 0.043, respectively. Furthermore, compared to YOLOv5, YOLOv6, and YOLOv7, MEF-YOLOv8 significantly improves the mean accuracy (mAP@0.5) across all categories, achieving an overall improvement of approximately 0.053, reaching a high level of 0.990. This fully demonstrates the effectiveness of the proposed MEF-YOLOv8 method in foreign object detection tasks.

[0082] In this example, the loss function curve of MEF-YOLOv8 during training is as follows: Figure 5 As shown, the loss function represents the degree of difference between the model's predicted values ​​and the true values. The smaller the loss function, the better the model's robustness, and the more adaptable the algorithm is to changes in the data. With the increase in the number of iterations during training, the loss rates of the three loss functions in MAE-YOLOv8 decrease sharply, eventually stabilizing and converging.

[0083] The above are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited to the above embodiments.

[0084] All technical solutions falling within the scope of this invention are protected by this invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of this invention should be considered within the scope of protection of this invention.

Claims

1. A method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8, characterized in that, Includes the following steps: S1. Construction and Augmentation of Foreign Object Dataset for Transmission Lines: Construct an original dataset of foreign object images containing bird nests, garbage, kites, and balloons; use Mosaic-9 data augmentation technology to generate new samples through splicing, cropping, and rotation operations to expand the dataset under normal conditions; merge foreign object images under normal conditions to generate foreign object images under various severe weather conditions; use the LabelImg tool to label the location and category of foreign objects; and divide the dataset into training set, validation set, and test set according to proportions. S2. Integration of EMA Module and Improvement of Backbone Network: Design an EMA module to realize feature grouping, parallel sub-network processing and cross-spatial learning operations: Divide the input feature map into G groups along the channel dimension, perform bidirectional one-dimensional global average pooling through a 1×1 branch to generate spatial location-related features, generate a spatial attention map through a 3×3 branch, aggregate features using the Sigmoid function and output attention weight map, and replace the Bottleneck of the C2f module in the YOLOv8 backbone network with the EMA module. S3. Focal-EIOU Loss Function Ensemble: Define the Focal-EIOU loss function. First, define the EIOU loss function, which includes hyperparameters λ1 and λ2 used to balance the weights of different loss terms, and the IoU loss L. IOU Center point distance loss L center and aspect ratio loss L whr Then, define the Focal loss function: based on the weight factor α. t The focus of positive and negative samples is balanced with the adjustment factor γ; then, the Focal and EIOU loss functions are balanced with the hyperparameter λ; finally, the original YOLOv8 loss function is replaced with Focal-EIOU. S4. Model Training and Detection: The improved YOLOv8 model is trained using the training set, the model performance is evaluated using the validation set, and the final test is performed using the test set. The image to be detected is input into the trained model, and the location information, category, and confidence score of the detected target are output.

2. The method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 according to claim 1, characterized in that, The Mosaic-9 data augmentation technique described in step S1 specifically includes: randomly selecting 9 original images, generating sub-images through blurring, color space perturbation, adding noise, occlusion, rotation, scaling, and random cropping; stitching the sub-images together in a 3×3 grid to form new samples, while preserving the coordinate mapping relationship of the original labeled boxes.

3. The method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 according to claim 1, characterized in that, The EMA module described in step S2 adopts a multi-branch architecture, where different branches use different receptive ranges to obtain information at different levels and generate more easily distinguishable feature representations. This mainly includes feature grouping, parallel multi-branch networks, cross-spatial interactive learning, and feature enhancement stages. The specific implementation methods for each stage are as follows: The feature grouping stage takes the input feature map X∈R C×H×W Divide the feature maps into G groups along the channel dimension: X = [X0, X1, ..., X... i ,…,X G-1 ], where sub-feature maps H and W represent the dimensions in the vertical and horizontal directions, respectively, and C represents the number of channels; The parallel multi-scale processing stage includes a two-branch operation: in the 1×1 branch, bidirectional one-dimensional global average pooling is performed on each group of sub-features, let P h and P w Given the feature maps in the horizontal and vertical dimensions, respectively, the output of the 1x1 convolutional branch is represented as follows: Simultaneously, sub-features are processed through 3×3 convolution kernels in the 3×3 branch to capture local spatial correlations; In the cross-spatial interaction stage, the 1×1 branch output is multiplied by the 3×3 branch features after Group Normalization, and the pooled output is processed by the Softmax function to generate a spatial attention map with a dimension of 1×H×W. In the feature enhancement stage, the spatial attention maps of the two branches are fused and normalized by the Sigmoid function to generate the final attention weight map. The original feature map is multiplied element-wise with the weight map to output the enhanced feature map.

4. The method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 according to claim 1, characterized in that, The Focal-EIOU loss function mentioned in step S3 is defined as follows: THE Focal-EIOU =L Focal +λL EIOU In the formula, L EIOU L represents the EIOU loss function; Focal λ represents the Focal loss function; λ is a hyperparameter used to balance the weights of the Focal and EIOU loss functions. The EIOU loss function expression is as follows: L EIOU =L IOU +λ1L center +λ2L whr In the formula, λ1 and λ2 are hyperparameters used to balance the weights of different loss terms, and L IOU It is IoU loss, L center It is the center point distance loss, L whr This refers to aspect ratio loss, and the specific calculation formulas for each loss are as follows: In the formula, IOU = |A∩B| / |A∪B|, N is the sample size, and d i D is the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. i It is half the diagonal length of the actual bounding box, w i and h i It predicts the width and height of the bounding box. and These are the width and height of the actual bounding box; The Focal loss function expression is as follows: FL(p t )=-a t (1-p t ) γ log(p t ) In the formula, α t It is a weighting factor that balances positive and negative samples, with different α values ​​set for positive and negative samples respectively, p t It is the model's predicted probability that a sample belongs to a certain class. For positive samples, p t It is the probability that the model predicts it as a positive sample; for negative samples, p t It is the probability that the model predicts it to be a negative sample. γ is an adjustment factor used to reduce the focus on easily classified samples and increase the focus on difficult-to-classify samples.

5. The method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 according to claim 1, characterized in that, In the model training and detection process described in step S4, the collected dataset contains 5900 images, including various labels such as bird nests, garbage, kites and balloons. The ratio of the training set, validation set and test set is 6:3:

1.

6. The method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 according to claim 1, characterized in that, In the model training and detection process described in step S4, several key performance indicators were used to evaluate the effectiveness of the model in the object detection task: precision P, recall R, mean precision AP, mean average, and precision mAP. The specific calculation formulas for these indicators are as follows: In the formula, TP is the number of samples correctly predicted as positive, FP is the number of samples incorrectly predicted as positive, FN is the number of samples incorrectly predicted as negative, and R... k Let P be the recall rate at the k-th confidence threshold. k For the precision at the k-th recall rate, AP i Let be the average precision of the i-th type of foreign object.

7. A foreign object detection system for transmission lines in complex environments based on MEF-YOLOv8, characterized in that, The method includes a dataset acquisition module, a dataset adjustment module, a dataset annotation module, a modeling module, a training module, and a prediction module, as well as a memory and a processor. The memory stores a program that runs on the processor. When the processor runs the program, it executes the steps of the method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8 as described in any one of claims 1-6.

8. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed, they perform the steps of the method for detecting foreign objects in transmission lines under complex environments based on MEF-YOLOv8, as described in any one of claims 1-6.

Citation Information

Cited By

  • Bird species fine-grained intelligent identification method and system oriented to complex background

    CN122289808A