Foreign object detection method for power transmission line based on fusion of edge perception and multi-scale feature fusion

By improving the AEFE, MRFAGF, and MSCF modules, the problems of blurred edge features, background noise interference, and scale inconsistency in foreign object detection of transmission lines have been solved, achieving high-precision and real-time foreign object detection.

CN122368765APending Publication Date: 2026-07-10NORTH CHINA ELECTRIC POWER UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTH CHINA ELECTRIC POWER UNIV
Filing Date
2026-04-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing deep learning-based methods for detecting foreign objects in power transmission lines struggle to accurately delineate the edges of foreign objects in complex backgrounds, resulting in missed or false detections. Furthermore, they cannot effectively suppress background noise or adapt to inconsistencies in the size of foreign objects.

Method used

The model is improved by employing an adaptive edge feature enhancement module (AEFE), a multi-receptive field attention-gated fusion module (MRFAGF), and a multi-scale cascaded fusion module (MSCF). Through multi-directional edge gradient extraction, directional attention mechanism, multi-scale feature aggregation, and cross-layer feature alignment, the detection accuracy and environmental adaptability are enhanced.

Benefits of technology

It improves the accuracy and adaptability of foreign object detection in power transmission lines, enhances the ability to capture the edges of foreign objects, suppresses background noise interference, and adapts to the detection needs of foreign objects of different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122368765A_ABST
    Figure CN122368765A_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting foreign objects on power transmission lines that integrates edge perception and multi-scale feature fusion. The method includes the following steps: scaling and normalizing images to obtain batch tensor data; the backbone network performs spatial compression and channel expansion of features through hierarchical convolutional downsampling, extracts multi-directional edge gradients in parallel using multi-directional Sobel convolutional kernels, filters effective edge information through directional attention mechanisms, and achieves dynamic balance between edge features and semantic features through dual-branch gating fusion to generate a multi-scale basic feature map; the neck network transforms the multi-scale basic feature map into a multi-scale fused feature map through dynamic alignment, background noise suppression, and multi-scale feature aggregation; and the head network obtains the detection result by performing target detection and redundant box filtering on the multi-scale fused feature map. This invention improves the detection accuracy and environmental adaptability for various types of foreign objects on power transmission lines while maintaining real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power transmission line operation and maintenance technology, and in particular to a method for detecting foreign objects in power transmission lines that integrates edge perception and multi-scale feature fusion. Background Technology

[0002] As a core infrastructure for national energy security and the stable operation of the social economy, the reliability of power supply directly affects the order of national production and life. Transmission lines, as key carriers of cross-regional power transmission, are constantly growing in scale with the continuous expansion of power grid construction. Because these lines are widely distributed in unstructured and complex environments such as mountains, forests, urban and rural building complexes, and major transportation routes, their operation faces a severe risk of foreign object intrusion.

[0003] Foreign object suspension and intrusion are significant contributing factors to short circuits, discharges, and even tripping faults in transmission lines. Specifically, lightweight foreign objects such as kites and plastic films can easily become entangled in conductors under wind force, causing phase-to-phase short circuits; bird nests built near pole insulators may lead to grounding faults; and excessive vegetation growth can cause line-to-ground discharges. These foreign object hazards not only threaten the reliability of the power grid but also easily trigger serious secondary disasters such as forest fires. Therefore, achieving rapid and accurate detection of foreign objects in transmission lines is an urgent requirement for modern power system operation and maintenance.

[0004] Traditional inspection methods primarily rely on manual on-site observation or data collection by drones followed by manual interpretation. However, given the ever-expanding scale of the power grid, manual inspection methods suffer from limitations such as low efficiency, high cost, and high false negative rates. Especially in scenarios with cluttered backgrounds and where foreign objects have highly similar textures to the background, manual inspection struggles to maintain high-precision judgment over extended periods. With the evolution of computer vision technology, deep learning-based object detection models have been increasingly applied to intelligent drone inspections. By constructing convolutional neural networks to automatically extract foreign object features, the automation level of inspections is improved.

[0005] Existing deep learning-based foreign object detection methods still have the following problems: (1) Lack of edge feature capture capability: The background of power transmission line inspection scenarios is extremely complex, including dense textures of forest vegetation, metal frames of towers, and light and shadow changes of clouds in the sky. Existing deep learning models are prone to losing high-frequency components containing key information such as the outline of foreign objects and texture details during downsampling. This makes it difficult for the model to accurately delineate the rigid edges or irregular folds of foreign objects in complex texture backgrounds, thus causing missed detections or false detections due to blurred edges of foreign objects.

[0006] (2) Noise interference from unstructured background: In unstructured inspection environments, the features of foreign objects on transmission lines are often highly similar to the background environment (such as vegetation and buildings). Traditional feature fusion strategies are mostly static linear superposition, which makes it difficult to achieve dynamic alignment of deep and shallow features. This makes it impossible for the model to effectively suppress invalid background noise, and the discrimination accuracy decreases when faced with foreign objects that are highly similar to the background.

[0007] (3) Dramatic inconsistency in the scale of foreign objects: Due to the varying shooting altitude of the drone, the different top-down perspectives, and the differences in the physical size of the foreign objects themselves, the pixel ratio of foreign objects in the image fluctuates greatly. Existing convolutional units usually use a fixed receptive field, making it difficult to simultaneously capture the details of small distant targets and perceive the integrity of large nearby targets within a single computational unit. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a method for detecting foreign objects in transmission lines that integrates edge perception and multi-scale feature fusion, which can overcome the shortcomings of the prior art and improve the detection accuracy and environmental adaptability of various types of foreign objects in transmission lines while maintaining real-time performance.

[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows.

[0010] A method for detecting foreign objects in power transmission lines that integrates edge sensing and multi-scale feature fusion includes the following steps: The original images of the transmission lines are scaled and normalized to obtain batch tensor data, which is then fed into the backbone network. The backbone network achieves spatial compression and channel expansion of features through hierarchical convolutional downsampling, parallel extraction of multi-directional edge gradients through multi-directional Sobel convolutional kernel groups, adaptive selection of effective edge information through directional attention mechanism, and finally dynamic balance between edge features and semantic features through dual-branch gating fusion to generate multi-scale basic feature maps. The neck network transforms multi-scale basic feature maps into multi-scale fused feature maps through dynamic alignment of cross-layer features, background noise suppression, and multi-scale feature aggregation. The head network performs object detection and redundant box filtering on multi-scale fused feature maps to obtain detection results.

[0011] Preferably, the original image of the transmission line is an RGB three-channel original image with constant resolution, which includes information on foreign objects such as balloons, kites, bird nests, garbage, and vegetation intrusion, as well as background information on mountains, towers, and the sky.

[0012] Preferably, the backbone network obtains a shallow basic feature map at the P2 scale through hierarchical convolutional downsampling; the shallow basic feature map at the P2 scale is enhanced for edge features by the C3k2_AEFE module, and then downsampled through convolutional layers to obtain an edge-enhanced feature map at the P3 scale; the edge-enhanced feature map at the P3 scale is enhanced for edge features by the C3k2_AEFE module, and then downsampled through convolutional layers to obtain an edge-enhanced feature map at the P4 scale; the edge-enhanced feature map at the P4 scale is used to extract deep semantic features through two layers of C3k2 modules, downsampled through two layers of convolutional layers, subjected to multi-scale max pooling operation by the SPPF module, and then adaptively enhanced by the aggregated features through the C2PSA module using a spatial attention mechanism to obtain a deep aggregated feature map at the P5 scale.

[0013] Preferably, the Bottleneck module in the C3k2 module is replaced with the AEFE module to obtain the C3k2_AEFE module. The C3k2_AEFE module includes Sobel convolution kernel groups in four directions: 0°, 45°, 90°, and 135°. It achieves parallel extraction of multi-directional edge gradients from the shallow basic feature map at the P2 scale through grouped convolution. , where F in Input feature map to the module, W sobel The input consists of four-way Sobel convolution kernels stacked with fixed weights, where C is the number of input channels, and the output is a multi-directional edge feature map. Effective edge information is adaptively filtered through a directional attention mechanism. First, an adaptive average pooling process is used to obtain a global direction descriptor. Then, two layers of 1×1 convolutions and a softmax function are used to generate a direction weight vector α. The weighted edge features are... In the formula Let α be the edge feature map in the i-th direction. i The corresponding directional importance weights and satisfying Dynamic balance between edge features and semantic features is achieved through dual-branch gating fusion. The method for generating the gating weight graph is as follows: ,in, The features extracted from the semantic branch, where σ is the sigmoid activation function, are fused and then concatenated through channels and weighted, before being output as the final edge enhancement features via residual links. .

[0014] Preferably, the Sobel kernel group includes convolution kernels. , , , K1 represents the 0° convolution kernel, used to extract vertical edges; K2 represents the 45° convolution kernel, used to extract edges along the 135° direction; K3 represents the 90° convolution kernel, used to extract horizontal edges; and K4 represents the 135° convolution kernel, used to extract edges along the 45° direction.

[0015] Preferably, the neck network performs nearest-neighbor upsampling on the P5-scale deep aggregated feature map, concatenates it with the P4-scale base feature map along the channel dimension, and then feeds it into the CSP_MSCF module. A receptive field pyramid is constructed through progressive receptive field expansion, concatenating features of different scales along the channel dimension. Channel number is compressed through convolution and residual connections are introduced to aggregate multi-scale features. Gradient propagation is optimized through CSP's dual-path splitting, performing multi-scale feature aggregation and background noise suppression to obtain the P4 fused feature map. The P4 fused feature map is then upsampled by nearest neighbors and fed together with the P3-scale base feature map into the MRFAGF module. Channel alignment is used to increase the number of channels in the shallow P3 feature map. Multi-receptive field features are extracted through parallel multi-scale dilated convolution. After concatenation of features from each branch, they are filtered by a dual attention mechanism of channel and space. Finally, dynamic alignment and enhancement of deep and shallow features are achieved through complementary cross-gating fusion to obtain fused features. These features are then refined by the C3k2 module to obtain the P3 fused feature map. The P3 fused feature map is downsampled and concatenated with the P4 fused feature map in the channel dimension. It is then fed into the CSP_MSCF module to complete multi-scale feature aggregation, resulting in the P4 secondary fused feature map. The P4 secondary fused feature map is downsampled and fed into the MRFAGF module with the P5 scale basic feature map to complete feature fusion and enhancement. After refinement by the C3k2 module, the P5 fused feature map is obtained.

[0016] As a preferred embodiment, the CSP_MSCF module is formed by fusing the MSCF module and the CSP module, and is used to replace the feature extraction method of single convolutional kernel or parallel multi-scale convolution in the fusion network. The CSP_MSCF module adopts a cascaded splitting strategy with progressive receptive field expansion and combines deep convolution and residual connection mechanism. The input of the CSP_MSCF module is the basic feature map of the neck network after upsampling or downsampling and feature concatenation, and the output is the enhanced feature map after multi-scale information aggregation, which is consistent with the dimension of the input feature map. The CSP_MSCF module has a cascaded architecture of feature splitting layer, deep convolutional layer and further splitting layer. It performs channel concatenation and cross-channel information interaction on the features retained in the cascaded splitting process and the output features of deep convolution, and introduces residual connection mechanism to enhance feature reuse and gradient propagation.

[0017] Preferably, the input to the MRFAGF module is a set of deep and shallow feature pairs to be fused in the neck network, with the shallow features... Contains high-frequency spatial details and deep features Including high-level semantic information; the MRFAGF module first performs channel adaptive alignment processing, first determining whether the number of channels of the input deep and shallow features is consistent. If they are inconsistent, the shallow features are convolved together. The number of channels is adaptively increased to match the depth features. If the number of input feature channels is consistent, then the identity mapping is performed directly; then... and The system concatenates the features along the channel dimension to obtain a concatenated feature map. Parallel multi-scale dilated feature extraction is then performed on this concatenated feature map. The concatenated feature map is fed into parallel dilated convolution branches with different dilation rates. The output feature map of each dilated convolution branch has its channel count evenly distributed across the total number of channels. Finally, the results of each branch are concatenated along the channel dimension to obtain a multi-receptive-field fused feature map. The MRFAGF module first applies a channel attention mechanism to the concatenated feature map, generating a channel attention weight map. This strengthens the channel feature responses related to foreign objects through channel-wise weighting, while suppressing invalid channel features corresponding to background textures. Then, a spatial attention mechanism is applied to generate a spatial attention weight map. This focuses on the spatial region where the foreign object is located through pixel-wise weighting. After double attention filtering, an attention-enhanced feature map is obtained. The MRFAGF module restores the channel count of the attention-enhanced feature map to the concatenated dimension through convolution, and then generates a global gating weight map G through Sigmoid activation. G is then evenly divided into shallow gating weights according to the number of channels. and deep gating weights Then, a two-way cross-gating operation is performed: on the one hand, deep features are... and Pixel-wise multiplication is performed to superimpose the weighted deep semantic features onto the channel-aligned shallow features. shallow fusion features were obtained. On the one hand, it assigns category semantics to shallow detail features; on the other hand, it aligns the shallow features after channel alignment. and Pixel-by-pixel multiplication adds the weighted shallow detail features to the deep features. Deep fusion features were obtained. This corrects the positioning error accumulated in deep networks due to continuous downsampling; finally, it... and By concatenating the features along the channel dimension, the final output feature map of the MRFAGF module is obtained.

[0018] Preferably, the head network employs a Task-Aligned dynamic label allocation strategy, based on the joint quality of the classification score s and the Iou prediction value u. Weights are assigned to positive and negative samples, where α and β are balancing coefficients. Then, the center point coordinates and width / height of the target are directly predicted through a convolutional layer. The regression accuracy of the bounding box is optimized using CIoU loss combined with DFL distribution loss. The CIoU loss is calculated as follows: ,in For the predicted bounding box b and the ground truth bounding box The squared Euclidean distance from the center point, c is the length of the diagonal of the minimum bounding rectangle enclosing the two boxes, α is the weighting coefficient, and v is a parameter that measures the consistency of aspect ratio; at the same time, the convolutional layer completes the foreign object category prediction for each candidate detection box, and the classification probability and localization quality are fused to generate a comprehensive confidence score in the range of 0 to 1; finally, non-maximum suppression is used to filter out redundant boxes and retain the detection box with the highest confidence. The result format is [xmin, ymin, xmax, ymax, class, score], which includes the coordinates of the foreign object bounding box, the category number, and the confidence score.

[0019] The beneficial effects of adopting the above technical solution are as follows: To solve the problem of blurred and difficult extraction of foreign object edge features in complex backgrounds of power transmission lines, this invention proposes an Adaptive Edge-FeatureEnhancement Module (AEFE) to replace the Bottleneck module in C3k2, forming the C3k2_AEFE module. This module enhances the model's ability to capture high-frequency geometric contours of targets such as kite outlines and garbage bag folds through multi-directional Sobel gradient convolution, directional attention mechanism, and gated fusion logic. Simultaneously, addressing the challenges of strong background noise interference and semantic misalignment between shallow and deep features during the feature fusion stage, a Multi-Receptive FieldAttention-Gated Fusion Module (MRFAGF) is proposed. This module utilizes multi-scale dilated convolution combined with channel and spatial dual attention and gating mechanisms to effectively suppress invalid background noise such as forests and skies, and achieves adaptive selection of cross-level features. Furthermore, to address the scale inconsistency caused by the varying angles of drone photography and the differences in the physical size of the foreign objects themselves, a Multi-Scale Cascade Fusion Module is proposed. The module (MSCF) inherits the core advantages of feature separation and gradient optimization of Cross Stage Partial Network (CSP). It divides the input features into main paths and residual paths. The main path embeds the MSCF module. By constructing a receptive field pyramid through hierarchical convolutional kernels of different sizes in MSCF, the model's adaptability and accuracy in detecting multi-scale targets are improved. Attached Figure Description

[0020] Figure 1 This is a system structure diagram of the present invention.

[0021] Figure 2 This is a structural diagram of the Adaptive Edge Feature Enhancement Module (AEFE) of the present invention.

[0022] Figure 3 This is a structural diagram of the Multi-Receptive Field Attention Gated Fusion Module (MRFAGF) of the present invention.

[0023] Figure 4 This is a structural diagram of the Multi-Scale Cascaded Fusion Module (MSCF) of the present invention. Detailed Implementation

[0024] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0025] Reference Figure 1 The proposed method for detecting foreign objects in power transmission lines, which integrates edge perception and multi-scale feature fusion, uses YOLO11 as the base network. It constructs an end-to-end foreign object detection architecture through three core improvement modules: Adaptive Edge Feature Enhancement (AEFE), Multi-Receptive Field Attention Gated Fusion (MRFAGF), and Multi-Scale Cascaded Fusion (MSCF). The overall execution flow follows a progressive logic of input image preprocessing → backbone network feature extraction → neck network feature fusion → head network target detection. Data flow is continuous in each stage and feature processing is deepened layer by layer. Finally, it achieves high-precision and real-time detection of foreign objects in power transmission lines in complex inspection scenarios. In the whole process, the feature map dimensions are uniformly represented by batch size B, number of channels C, height H, and width W.

[0026] The model's input consists of RGB three-channel raw images collected by UAVs during power transmission line inspections. These images have variable resolution and contain five types of foreign objects: balloons, kites, bird nests, garbage, and invasive vegetation. They are also superimposed with complex background information such as mountains, towers, and the sky. First, preprocessing is performed: all raw images are uniformly scaled to 640×640 pixels to ensure the consistency of the model's input size. Then, the image pixel values ​​are mapped to the [0,1] interval for normalization to eliminate differences in brightness and contrast between different images. Finally, the processed images are batch-encapsulated into tensor data to form an initial input tensor of B×3×640×640, which is then fed into the backbone network for feature extraction.

[0027] The backbone network generates three basic feature maps at different scales (P3, P4, and P5) through hierarchical convolutional downsampling, adaptive edge feature enhancement, and multi-scale spatial attention aggregation, providing feature input for cross-layer feature fusion in the neck network. After the preprocessed batched image tensor is fed into the backbone network, it first undergoes two 3×3 standard convolutional layers with a stride of 2 for sequential downsampling, gradually reducing the feature map resolution from 640×640 to 320×320 and then to 160×160, correspondingly increasing the number of channels to 64 and 128, resulting in a shallow basic feature map at the P2 scale. This completes the initial feature extraction and spatial compression of the original image. For the P2 scale feature map, the backbone network first performs edge feature enhancement through the AEFE module.

[0028] The structure diagram of the Adaptive Edge Feature Enhancement Module (AEFE) is as follows: Figure 2 As shown, this module is specifically designed to address the problems in foreign object detection scenarios on power transmission lines, such as blurred edge features of foreign objects, loss of high-frequency geometric contours during convolutional downsampling, and visual confusion caused by complex background textures like mountains and towers. This module overcomes the design flaws of existing edge enhancement modules, such as single-directional gradient extraction, lack of targeted noise suppression, and rigid fusion of edge and semantic features. It innovatively integrates three core strategies: multi-directional Sobel gradient convolution, directional attention mechanism, and dual-branch gating fusion. This achieves explicit perception and enhancement of the geometric contours of foreign objects on power transmission lines, while preserving deep semantic information in the feature map during edge feature enhancement. This effectively solves the problems of detail loss and noise sensitivity in traditional convolutional neural networks that implicitly learn edge features. The input of this module is the basic semantic feature map of the backbone network after Conv convolutional downsampling, and the output is a feature map with edge enhancement and semantic preservation, with dimensions completely consistent with the input feature map. This ensures the continuity and compatibility of feature flow in the backbone network, laying a highly recognizable foundation for subsequent feature fusion in the neck network.

[0029] Existing edge enhancement modules often employ traditional horizontal and vertical bidirectional Sobel operators to extract edges, which struggles to capture the diverse shapes and angles of foreign objects in power transmission line scenarios. Furthermore, directly concatenating edge features with semantic features introduces background noise and loses some semantic information, failing to meet the practical needs of foreign object detection in power transmission lines. To address these issues, the AEFE module first performs multi-directional Sobel convolution on the input feature map for edge feature extraction. Unlike existing bidirectional gradient extraction techniques, this module constructs a group of convolutional kernels with four directions. The four convolutional kernels K1, K2, K3, and K4 are defined as follows: Where K1 represents the 0° convolution kernel, used to extract vertical edges; K2 represents the 45° convolution kernel, used to extract edges along the 135° direction; K3 represents the 90° convolution kernel, used to extract horizontal edges; and K4 represents the 135° convolution kernel, used to extract edges along the 45° direction.

[0030] To efficiently implement this process in neural networks while maintaining channel independence, this paper utilizes grouped convolutions to achieve parallel gradient computation. Assume the input feature map is... Where B is the batch size and C is the number of channels. First, the convolutional kernels in the four directions are stacked to construct a fixed weight parameter W. sobel To ensure that each input channel independently computes its corresponding four-directional gradients, the number of convolutional kernel groups is set to the number of input channels C, and parallel convolution operations are performed. .

[0031] Output features The dimension is 4C indicates that each input channel is extended with four edge response channels in four directions, making the network pay more attention to high-frequency geometric features without introducing additional parameters.

[0032] Different types of foreign objects (FOOs) on power transmission lines, or different postures of FOCs on the same power transmission line, exhibit varying degrees of dependence on edge orientation. Simply superimposing gradients from all directions may introduce background noise. To enable the network to adaptively focus on the most salient edge orientation, this paper proposes a directional attention mechanism. First, adaptive average pooling is used to focus on the extracted multi-directional edge features. Spatial dimension compression is performed to obtain the global direction descriptor.

[0033] Subsequently, two 1×1 convolutional layers are used to capture the dependencies between directions, and the weights of the four directions are normalized using the Softmax function to obtain the direction weight vector α. The final weighted edge features are then calculated. The result is obtained by multiplying the features in each direction with their corresponding weights and then summing the results. In the formula, Let α represent the edge feature map extracted by Sobel convolution in the i-th direction (0°, 45°, 90°, 135°). i This indicates the corresponding directional importance weight. This mechanism enables the model to dynamically respond to edge directions, suppressing gradient noise in irrelevant directions based on the structure and orientation of the foreign object, and enhancing only the effective geometric features.

[0034] To avoid losing semantic information of the target due to overemphasizing edges, AEFE proposes a dual-branch gated fusion structure. The edge branch extracts weighted edge features using the process described above. The semantic branch extracts semantic features using standard 3×3 convolutions and 1×1 convolutions. The two features are non-linearly fused through a learnable gating unit. First, the two feature paths are concatenated along the channel dimension, and then a gating weight map G is generated through convolutional layers. , where σ is the sigmoid activation function with an output range of (0,1).

[0035] Using the generated gated weight graph G, the edge branches and semantic branches are weighted separately, and the results are concatenated. Subsequently, a 1×1 convolutional layer (Conv) is used to compress the number of channels back to the original dimensions, achieving initial feature fusion. Simultaneously, to promote gradient propagation and prevent network degradation, the fused features are combined with the convolutionally processed F... in The features are then summed, passed through a 1×1 convolutional layer (Conv) for feature mapping, and finally the residual edges are stacked. .

[0036] This indicates that when detecting targets with significant geometric features (such as the outline of a kite), the gating value G tends to 1, and the network retains more edge branch features; while when processing targets that rely on texture or color discrimination (such as the entire balloon), G tends to 0, and the network retains more semantic branch features. This weight-based dynamic selection mechanism can improve the model's comprehensive ability to represent various foreign object features on power transmission lines.

[0037] Compared with the closest existing edge enhancement modules, this module differs in three key dimensions: First, it improves the existing bidirectional Sobel gradient extraction to a four-directional Sobel convolution with 0°, 45°, 90°, and 135°, achieving parallel computation through grouped convolutions to comprehensively capture the multi-angle edge contours of foreign objects on transmission lines, thus solving the deficiency of incomplete edge extraction in existing modules. Second, it adds a directional attention mechanism, generating adaptive directional weights through global information aggregation, achieving accurate focusing of effective edges and suppression of background gradient noise, thus solving the noise sensitivity problem caused by directly superimposing edge features in existing modules. Third, it designs a dual-branch gated fusion structure, achieving dynamic nonlinear fusion of edge features and semantic features through learnable gate weights, combined with residual connections to prevent network degradation, thus solving the defects of imbalance between edge enhancement and semantic preservation and stiff feature fusion in existing modules.

[0038] To address the two major bottlenecks of traditional feature pyramid static linear fusion strategies in power transmission scenarios—limited receptive field and the semantic gap between shallow and deep layers—this invention proposes the MRFAGF module, such as... Figure 3 As shown.

[0039] The input to the MRFAGF module is a set of deep and shallow feature pairs to be fused from the neck network, where the shallow features are... It contains high-frequency spatial details such as the edges and corners of foreign objects, but lacks high-level semantic information. It is easily affected by background textures such as mountains, forests, and towers, which can cause false alarms. Deep features It contains high-level semantic information such as the category of foreign objects and global context, but due to the loss of some spatial details due to continuous downsampling, there is a problem of localization deviation. In addition, the number of channels of the two are inconsistent, and direct fusion will lead to mismatch of feature information.

[0040] Existing gated fusion modules often use fixed 1×1 convolutions for channel alignment, which easily leads to the loss of shallow detail features. Furthermore, they lack adaptive processing strategies tailored to the characteristics of transmission line scenarios, becoming a bottleneck for cross-layer feature fusion. To address this, this module first performs adaptive channel alignment processing, determining whether the number of channels in the input deep and shallow features is consistent. If not, it uses a learnable 1×1 convolution to merge the shallow features. The number of channels is adaptively increased to match the depth features. The process ensures consistency by preserving the spatial details of shallow features through lightweight convolution while completing channel matching, thus avoiding information loss. If the number of input feature channels is consistent, the identity mapping is performed directly without additional feature transformation, which greatly improves the module's scene adaptability.

[0041] After completing channel alignment, and The feature map is stitched together along the channel dimension to obtain a stitched feature map, which is then subjected to parallel multi-scale hole-aware feature extraction. Existing feature fusion modules mostly use a single 3×3 convolution to extract features, with a fixed receptive field. This makes it impossible to simultaneously capture the local details and global context of foreign objects of different scales in power transmission lines, and it is difficult to adapt to the detection requirements of small-scale foreign objects such as balloons and garbage, as well as large-scale foreign objects such as bird nests and vegetation invasion. To address this, this module feeds the stitched feature map into parallel 3×3 dilated convolution branches with dilution rates of 1, 2, and 3. The branch with a dilution rate of 1 has no dilution expansion and focuses on capturing local high-frequency detail features such as foreign object edges and geometric corners, ensuring that key information of distant small targets is not smoothed. The branch with a dilution rate of 2 moderately expands the receptive field to capture the mid-scale features of the foreign object. The branch with a dilution rate of 3 further expands the receptive field to capture the global spatial topological relationship between the target and the surrounding environment, providing contextual prior knowledge for the identification of large targets. The output feature map of each dilated convolution branch is divided equally among the total number of channels. Finally, the results of each branch are concatenated along the channel dimension to obtain a multi-receptive field fusion feature map. This achieves multi-granularity feature aggregation from local to global, solving the core defects of existing modules that have limited receptive fields and cannot adapt to multi-scale foreign objects in power transmission lines.

[0042] To address the issue of invalid textures such as mountains, towers, and sky in complex backgrounds of power transmission lines easily forming false features and interfering with foreign object detection, this module first applies a channel attention mechanism to the stitched feature map, generating a channel attention weight map. This strengthens the channel feature responses related to foreign objects through channel-by-channel weighting, while suppressing invalid channel features corresponding to background textures. Building upon this channel weighting, a spatial attention mechanism is further applied to generate a spatial attention weight map. This precisely focuses on the spatial region where the foreign object is located through pixel-by-pixel weighting, significantly suppressing the feature responses in background noise areas such as mountains and sky. After this dual attention filtering, an attention-enhanced feature map is obtained. The effective foreign object features in this feature map are significantly enhanced, background noise is greatly suppressed, and feature recognition accuracy is improved. Unlike existing modules that only employ single-channel or spatial attention designs, this module achieves effective feature enhancement and background noise suppression through dual-dimensional filtering.

[0043] To address the misalignment of deep and shallow features caused by static linear stacking or unidirectional gating fusion in existing fusion modules, this module proposes a complementary cross-gating fusion method. This step is a key improvement, enabling bidirectional guidance and dynamic alignment of deep and shallow features. Existing gating fusion modules mostly involve unidirectional information flow, integrating only deep semantic features into the shallow layer or only shallow detail features into the deep layer. This fails to simultaneously address the false alarm problem caused by missing semantic features in the shallow layer and the localization error caused by the loss of spatial details in the deep feature layer. To address this, this module first restores the channel count of the attention-treated feature map to the concatenated dimension using a 1×1 convolution, then generates a global gating weight map G using Sigmoid activation. G is then divided into shallow gating weights based on the number of channels. and deep gating weights Then, a two-way cross-gating operation is performed: on the one hand, deep features are... and Pixel-wise multiplication is performed to superimpose the weighted deep semantic features onto the channel-aligned shallow features. shallow fusion features were obtained. This approach enables the embedding of deep semantic information into shallow layers, assigning categorical semantics to shallow detail features and effectively suppressing false alarms caused by abrupt changes in background texture. On the other hand, it also aligns the shallow features after channel alignment. and Pixel-by-pixel multiplication adds the weighted shallow detail features to the deep features. Deep fusion features were obtained. This enables the backhaul of shallow spatial details to deeper layers, correcting the positioning errors accumulated in deep networks due to continuous downsampling. Finally, and By concatenating the features along the channel dimension, the final output feature map of the MRFAGF module is obtained.

[0044] The Multi-Scale Cascaded Fusion Module (MSCF) is formed by fusing with a Cross-Stage Local Network (CSP) structure to create the CSP_MSCF module. This replaces the traditional feature extraction methods using a single convolutional kernel or parallel multi-scale convolutions in feature fusion networks. It is specifically designed for use in UAV inspection scenarios of power transmission lines, where foreign objects exhibit significant scale inconsistencies due to differences in shooting height and perspective. Furthermore, traditional multi-scale feature extraction modules suffer from problems such as discrete receptive fields, high computational redundancy, and difficulty in simultaneously capturing the details of small, distant foreign objects and the integrity of large, near-field foreign objects. Figure 4 As shown, this module abandons the parallel convolutional architecture of existing multi-scale fusion modules and proposes a cascaded splitting strategy for progressive receptive field expansion. Combined with deep convolution and residual connection mechanisms, it significantly reduces computational redundancy while constructing a dense receptive field pyramid, achieving a smooth transition from micro-texture to macro-semantics in feature extraction. The input of the CSP_MSCF module is the basic feature map of the neck network after upsampling / downsampling and feature concatenation. The output is an enhanced feature map after multi-scale information aggregation, maintaining the same dimension as the input feature map. This ensures the compatibility of feature flow in the neck network and effectively improves the model's adaptability to detecting foreign objects of different scales on transmission lines, providing the detection head with high-quality multi-scale feature input that combines detail and global perspectives.

[0045] The input to the CSP_MSCF module is a two-dimensional feature map of the neck network after feature stitching. Taking the feature fusion stage of P5→P4 in foreign object detection of transmission lines as an example, the input feature map contains batch dimension, 1536 channels, and a spatial resolution of 40×40. This feature map integrates the basic features of the backbone network P4 and the upsampled features of P5, and contains preliminary feature information of foreign objects of different scales in transmission lines. However, due to the changing perspective of drone inspection and the difference in shooting distance, small-scale foreign objects such as balloons and small garbage have a very low pixel ratio in the feature map, while large-scale foreign objects such as bird nests and vegetation invasion are prone to incomplete feature extraction. Existing multi-scale fusion modules often employ parallel multi-scale convolutional architectures, extracting features simultaneously through convolutional kernels of different sizes. While this achieves aggregation of information from multiple receptive fields, it suffers from two major drawbacks: First, the parallel structure leads to high computational redundancy, with independent operations by multiple convolutional kernels significantly increasing floating-point operations. Second, the receptive fields are discretely distributed, lacking effective transitions between features at different scales, making it difficult to adapt to the continuous scale changes of foreign objects in transmission lines. Furthermore, fixed parallel convolutional kernels cannot dynamically adjust the receptive fields according to the scale of the foreign objects, easily resulting in the loss of details from small-scale foreign objects and insufficient global feature capture for large-scale foreign objects. To address these issues, the CSP_MSCF module first performs 3×3 standard convolutional basic feature extraction on the input feature map. This lightweight convolutional step completes the initial transformation and aggregation of features, obtaining a basic feature map. This step preserves the spatial resolution and core information of the feature map while laying the foundation for subsequent cascaded multi-scale feature extraction. Moreover, the sparse connectivity of the 3×3 convolution effectively reduces the computational complexity of a single convolutional step.

[0046] After obtaining the basic feature map, this module performs cascaded split feature extraction with progressive receptive field expansion. This step is the core improvement of the module. Unlike the parallel multi-scale convolution design of existing technologies, it constructs a dense receptive field pyramid through a cascaded architecture of "feature splitting - depth convolution - further splitting", which realizes smooth receptive field expansion from local to global, while significantly reducing computational redundancy. Specifically, the basic feature map is first uniformly divided along the channel dimension to obtain two feature maps. One part is directly retained and participates in the final feature fusion, while the other part is fed into a 5×5 deep convolutional layer for mid-scale feature extraction. The number of groups in the deep convolution is the same as the number of input channels, which expands the receptive field without increasing the number of parameters and focuses on capturing the mid-scale feature information of the foreign object. Then, the output feature map of the 5×5 deep convolution is again uniformly divided along the channel dimension to obtain two feature maps. One part is also directly retained and participates in the final feature fusion, while the other part is fed into a 7×7 deep convolutional layer for large-scale feature extraction, further expanding the receptive field and capturing the global spatial topological relationship between the foreign object and its surrounding environment, thus meeting the feature extraction requirements of large foreign objects in the near field. This cascaded splitting design allows the receptive field of the module to gradually expand from 3×3 to 5×5 and then to 7×7, forming a continuous receptive field pyramid. This avoids computational redundancy in parallel structures and achieves a smooth transition from microscopic details to macroscopic semantics. It solves the core defects of existing modules, such as discrete receptive fields and low computational efficiency. At the same time, the use of deep convolution allows the module to maintain its lightweight characteristics while expanding the receptive field, which meets the real-time detection requirements of UAV inspection of power transmission lines.

[0047] To achieve deep aggregation and effective fusion of multi-scale features while preventing gradient vanishing and feature degradation in deep networks, this module performs channel concatenation and cross-channel information interaction on the features retained during the cascaded splitting process and the output features of deep convolutions. A residual connection mechanism is also introduced to enhance feature reuse and gradient propagation. First, the large-scale feature map output by the 7×7 deep convolution, the medium-scale feature map retained by the 5×5 deep convolution, and the small-scale feature map retained by the 3×3 convolution are concatenated along the channel dimension to obtain a multi-scale concatenated feature map. This feature map integrates information from multiple receptive fields from 3×3 to 7×7, while preserving details and global features of objects at different scales. Then, a 1×1 lightweight convolution is used to perform cross-channel information interaction and channel number compression on the multi-scale concatenated feature map, restoring the number of feature channels to the level of the module's input features. Figure 1 The process yields a multi-scale fused feature map. The 1×1 convolution, while reducing channel dimensionality, enables information interaction and fusion between features of different scales, allowing the module to learn the correlations between features at different scales. Finally, residual connections are introduced to add the multi-scale fused feature map element-wise to the original input feature map of the module, resulting in the output feature map of the MSCF module. This residual design effectively preserves the feature information of the original input, promotes the backpropagation of gradients, alleviates the gradient vanishing problem in deep networks, and further enhances the reuse and fusion of multi-scale features.

[0048] Compared to existing multi-scale fusion modules, this module differs in three key dimensions: First, it improves the existing parallel multi-scale convolution into a cascaded split architecture with progressive receptive field expansion, achieving a smooth and continuous expansion of the receptive field from 3×3 to 7×7. This constructs a dense receptive field pyramid, solving the shortcomings of existing modules with discrete receptive fields and inability to adapt to continuous scale changes in foreign objects on transmission lines. Simultaneously, the cascaded split design significantly reduces computational redundancy and improves the module's computational efficiency. Second, it replaces ordinary convolution with depthwise convolution to achieve medium- and large-scale feature extraction, effectively expanding the receptive field without increasing the number of parameters or computational complexity. This allows the module to maintain lightweight characteristics while achieving multi-scale feature extraction, meeting the real-time detection requirements of UAV inspection. Third, it deeply integrates with the CSP cross-stage structure. Through feature separation and fusion via the main and residual dual paths, it optimizes the gradient propagation path, alleviates the gradient vanishing problem, improves feature reuse rate, and further enhances the aggregation effect of multi-scale features. The above improvements are all designed to address the pain point of scale inconsistency in foreign object detection on transmission lines. The non-redundant structure and computational design enhance the model's multi-scale target detection capabilities while maintaining the module's lightweight and real-time performance.

[0049] The head network is based on an anchorless design. Preliminary detection results are obtained by fusing multi-scale feature maps (P3, P4, and P5) output from the neck network to perform object detection and redundant box filtering. First, a Task-Aligned dynamic label assignment strategy is adopted, based on the joint quality of the classification score s and the Iou prediction value u. Weights are assigned to positive and negative samples, where α and β are balancing coefficients. Then, the center point coordinates and width / height of the target are directly predicted through a convolutional layer. The regression accuracy of the bounding box is optimized using CIoU loss combined with DFL distribution loss. The CIoU loss is calculated as follows: ,in For the predicted bounding box b and the ground truth bounding box The squared Euclidean distance of the center point, c is the length of the diagonal of the minimum bounding rectangle enclosing the two boxes, α is the weight coefficient, and v is a parameter that measures the consistency of aspect ratio; at the same time, the convolutional layer completes the foreign object category prediction corresponding to each candidate detection box, and the classification probability and localization quality are fused to generate a comprehensive confidence score in the range of 0 to 1; finally, non-maximum suppression (NMS) is used to filter out redundant boxes and retain the detection box with the highest confidence. The result format is [xmin, ymin, xmax, ymax, class, score], which includes the coordinates of the foreign object bounding box, the category number, and the confidence score.

[0050] To verify the effectiveness of the proposed method, it was compared with other representative object detection algorithms. Five evaluation metrics were used to assess the model's performance: mean accuracy (mAP@0.5 and mAP@0.5:0.95), number of parameters, frames per second (FPS), and floating-point operations (FLOPs). Mean accuracy reflects the overall accuracy of object detection. mAP@0.5 represents the mAP value calculated at an IoU threshold of 50%. mAP@0.5:0.95 represents the average of the mAP values ​​calculated for each IoU threshold within 10 intervals from 50% to 95% with a step size of 5%. A self-built foreign object dataset of power transmission lines was used, containing 2773 images and five types of foreign objects: balloons, kites, bird nests, garbage, and vegetation intrusion. The five types of images were then categorized according to... The dataset was divided into training and test sets. The experiment was conducted on a Windows 10 operating system, using Python version 3.10.14, PyTorch 2.2.2 as the deep learning framework, CUDA version 12.1, and an NVIDIA GeForce 4070 SUPER GPU. During training, the input images were scaled to 640×640 pixels, and the batch size was set to 32. No pre-trained weights were used. The SGD network optimizer was employed, with an initial learning rate of 0.01, a weight decay coefficient of 0.0005, a minimum learning rate of 0.0001, and a total of 300 training epochs.

[0051] To fully verify the comprehensive performance advantages of the improved model of this invention, Faster-RCNN, SSD, YOLO series mainstream models and RT-DETR model were selected as comparison objects. Performance evaluation was carried out under the same experimental environment, dataset and evaluation index system. The focus was on comparing the performance of the models in terms of detection accuracy, computational complexity and real-time performance. The experimental results are shown in Table 1.

[0052] In terms of detection accuracy, the present invention achieves an mAP@0.5 of 83.7%, which is superior to the two classic methods Faster-RCNN and SSD. Compared with YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOv11, YOLOv12, YOLOv13 and RT-DETR, the accuracy is improved by 3.6%, 4%, 5%, 5.9%, 2.5%, 6%, 8.3% and 5.9%, respectively. The mAP@0.5:0.95 reaches 52.4%, which is superior to the two classic methods Faster-RCNN and SSD. Compared with YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOv11, YOLOv12, YOLOv13 and RT-DETR, the accuracy is improved by 6.5%, 4.2%, 5%, 5.6%, 3.4%, 5.5%, 6.4% and 4.9%, respectively. This fully demonstrates the improved module's ability to deeply extract features and recognize targets in complex scenes. In terms of computational complexity, the number of parameters in this invention is 3.88M, which is higher than lightweight models such as YOLOv9 and YOLOv10, but lower than Faster-RCNN, SSD, and RT-DETR. The FLOPs are 10.5G, higher than some basic models, but far lower than Faster-RCNN, SSD, and RT-DETR, placing the computational cost within a reasonable range. Regarding detection speed, the model in this paper achieves an FPS of 63.2, outperforming all other comparative models, meeting the real-time processing requirements of UAV inspections of power transmission lines, and achieving an effective balance between detection accuracy and real-time performance.

[0053] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting foreign objects in transmission lines that integrates edge perception and multi-scale feature fusion, characterized in that... Includes the following steps: The original images of the transmission lines are scaled and normalized to obtain batch tensor data, which is then fed into the backbone network. The backbone network achieves spatial compression and channel expansion of features through hierarchical convolutional downsampling, parallel extraction of multi-directional edge gradients through multi-directional Sobel convolutional kernel groups, adaptive selection of effective edge information through directional attention mechanism, and finally dynamic balance between edge features and semantic features through dual-branch gating fusion to generate multi-scale basic feature maps. The neck network transforms multi-scale basic feature maps into multi-scale fused feature maps through dynamic alignment of cross-layer features, background noise suppression, and multi-scale feature aggregation. The head network performs object detection and redundant box filtering on multi-scale fused feature maps to obtain detection results.

2. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 1, characterized in that: The original image of the transmission line is an RGB three-channel original image with constant resolution, which includes information on foreign objects such as balloons, kites, bird nests, garbage, and vegetation invasion, as well as background information on mountains, towers, and the sky.

3. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 1, characterized in that: The backbone network obtains a shallow basic feature map at the P2 scale through hierarchical convolutional downsampling; the shallow basic feature map at the P2 scale is enhanced for edge features by the C3k2_AEFE module, and then downsampled by convolutional layers to obtain an edge enhanced feature map at the P3 scale. The P3 scale edge enhancement feature map is enhanced by the C3k2_AEFE module, and then downsampled by the convolutional layer to obtain the P4 scale edge enhancement feature map. The P4-scale edge enhancement feature map extracts deep semantic features through two C3k2 modules, performs downsampling through two convolutional layers, performs multi-scale max pooling through the SPPF module, and then uses the C2PSA module to adaptively enhance the aggregated features through a spatial attention mechanism, resulting in the P5-scale deep aggregated feature map.

4. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 3, characterized in that: The C3k2_AEFE module is obtained by replacing the Bottleneck module in the C3k2 module with the AEFE module. The C3k2_AEFE module includes Sobel convolution kernel groups in four directions: 0°, 45°, 90°, and 135°. It achieves parallel extraction of multi-directional edge gradients from the shallow basic feature map at the P2 scale through grouped convolution. F in Input feature map to the module, W sobel The input consists of four-way Sobel convolution kernels stacked with fixed weights, where C is the number of input channels, and the output is a multi-directional edge feature map. Effective edge information is adaptively filtered through a directional attention mechanism. First, an adaptive average pooling process is used to obtain a global direction descriptor. Then, two layers of 1×1 convolutions and a softmax function are used to generate a direction weight vector α. The weighted edge features are... In the formula Let α be the edge feature map in the i-th direction. i The corresponding directional importance weights and satisfying Dynamic balance between edge features and semantic features is achieved through dual-branch gating fusion. The method for generating the gating weight graph is as follows: ,in, The features extracted from the semantic branch, where σ is the sigmoid activation function, are fused and then processed through channel concatenation and weighted modulation. Finally, the edge enhancement features are output through residual links. .

5. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 4, characterized in that: Sobel kernel group includes convolution kernels , , , K1 represents the 0° convolution kernel, used to extract vertical edges; K2 represents the 45° convolution kernel, used to extract edges along the 135° direction; K3 represents the 90° convolution kernel, used to extract horizontal edges; and K4 represents the 135° convolution kernel, used to extract edges along the 45° direction.

6. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 3, characterized in that: The neck network performs nearest-neighbor upsampling on the P5-scale deep aggregated feature map, concatenates it with the P4-scale base feature map along the channel dimension, and then feeds it into the CSP_MSCF module. A receptive field pyramid is constructed through progressive receptive field expansion, concatenating features of different scales along the channel dimension. Channel number is compressed through convolution and residual connections are introduced for multi-scale feature aggregation. Gradient propagation is optimized through CSP's dual-path splitting for multi-scale feature aggregation and background noise suppression, resulting in the P4 fused feature map. The P4 fused feature map is then upsampled by nearest neighbors and fed together with the P3-scale base feature map into the MRFAGF module. Channel alignment increases the number of channels in the shallow P3 feature map, and then... Parallel multi-scale dilated convolution extracts multi-receptive field features. After concatenation of features from each branch, the features are filtered through a dual attention mechanism of channel and space. Finally, complementary cross-gating fusion is used to dynamically align and enhance the features of deep and shallow layers, resulting in fused features. These fused features are then refined by the C3k2 module to obtain the P3 fused feature map. The P3 fused feature map is downsampled and concatenated with the P4 fused feature map in the channel dimension. It is then fed into the CSP_MSCF module to complete multi-scale feature aggregation, resulting in the P4 secondary fused feature map. The P4 secondary fused feature map is downsampled and fed into the MRFAGF module with the P5 scale basic feature map to complete feature fusion and enhancement. After refinement by the C3k2 module, the P5 fused feature map is obtained.

7. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 6, characterized in that: The CSP_MSCF module is formed by fusing the MSCF and CSP modules to replace the feature extraction methods of single convolutional kernels or parallel multi-scale convolutions in fused networks. The CSP_MSCF module adopts a cascaded splitting strategy with progressive receptive field expansion, combined with deep convolution and residual connection mechanisms. The input of the CSP_MSCF module is the basic feature map of the neck network after upsampling or downsampling and feature concatenation, and the output is an enhanced feature map after multi-scale information aggregation, which is consistent with the dimension of the input feature map. The CSP_MSCF module has a cascaded architecture of feature splitting layer, deep convolutional layer, and further splitting layer. It performs channel concatenation and cross-channel information interaction on the features retained in the cascaded splitting process and the output features of deep convolution, and introduces residual connection mechanism to enhance feature reuse and gradient propagation.

8. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 7, characterized in that: The input to the MRFAGF module is a set of deep and shallow feature pairs to be fused from the neck network, where the shallow features are... Contains high-frequency spatial details and deep features Including high-level semantic information; the MRFAGF module first performs channel adaptive alignment processing, first determining whether the number of channels of the input deep and shallow features is consistent. If they are inconsistent, the shallow features are convolved together. The number of channels is adaptively increased to match the depth features. If the number of input feature channels is consistent, then the identity mapping is performed directly; then... and The concatenated feature map is obtained by concatenating the features along the channel dimension. Then, parallel multi-scale dilated perceptual feature extraction is performed on it. The concatenated feature map is fed into parallel dilated convolution branches with different dilation rates. The number of channels in the output feature map of each dilated convolution branch is evenly distributed among the total number of channels. Finally, the results of each branch are concatenated along the channel dimension to obtain a multi-receptive field fused feature map. The MRFAGF module first applies a channel attention mechanism to the stitched feature map to generate a channel attention weight map. It strengthens the channel feature response related to foreign objects by weighting the channel one by one, while suppressing the invalid channel features corresponding to the background texture. Then, a spatial attention mechanism is applied to generate a spatial attention weight map. By focusing on the spatial region where the foreign object is located through pixel-by-pixel weighting, and after double attention filtering, an attention-enhanced feature map is obtained. The MRFAGF module restores the channel count of the attention-treated feature map to the concatenated dimension through convolution, then generates a global gating weight map G through sigmoid activation. G is then divided into shallow gating weights according to the number of channels. and deep gating weights Then, a two-way cross-gating operation is performed: on the one hand, deep features are... and Pixel-wise multiplication is performed to superimpose the weighted deep semantic features onto the channel-aligned shallow features. shallow fusion features were obtained. On the one hand, it assigns category semantics to shallow detail features; on the other hand, it aligns the shallow features after channel alignment. and Pixel-by-pixel multiplication adds the weighted shallow detail features to the deep features. Deep fusion features were obtained. This corrects the positioning error accumulated in deep networks due to continuous downsampling; finally, it... and By concatenating the features along the channel dimension, the final output feature map of the MRFAGF module is obtained.

9. The method for detecting foreign objects in transmission lines by fusing edge perception and multi-scale feature fusion according to claim 1, characterized in that: The head network employs a Task-Aligned dynamic label assignment strategy, based on the joint quality of the classification score s and the Iou prediction value u. Weights are assigned to positive and negative samples, where α and β are balancing coefficients. Then, the center point coordinates and width / height of the target are directly predicted through a convolutional layer. The regression accuracy of the bounding box is optimized using CIoU loss combined with DFL distribution loss. The CIoU loss is calculated as follows: ,in For the predicted bounding box b and the ground truth bounding box The squared Euclidean distance from the center point, c is the length of the diagonal of the minimum bounding rectangle enclosing the two boxes, α is the weighting coefficient, and v is a parameter that measures the consistency of aspect ratio; at the same time, the convolutional layer completes the foreign object category prediction for each candidate detection box, and the classification probability and localization quality are fused to generate a comprehensive confidence score in the range of 0 to 1; finally, non-maximum suppression is used to filter out redundant boxes and retain the detection box with the highest confidence. The result format is [xmin, ymin, xmax, ymax, class, score], which includes the coordinates of the foreign object bounding box, the category number, and the confidence score.