Power transmission line defect and foreign object detection method, apparatus, device, and medium

CN123016407APending Publication Date: 2026-10-30NORTHEAST DIANLI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611194919.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0007]本发明提供一种输电线路缺陷与异物检测方法、装置、设备和介质,以解决输电线路隐患检测中复杂背景干扰强、局部异常表征不足以及跨尺度结构信息利用不充分的问题,从而能够在保持端到端检测流程不变的基础上增强电力场景的适应能力

Benefits of technology

本发明通过联合抑制伪结构背景响应、增强局部异常线索并保留结构感知的跨尺度信息来改善特征表示。具体地,低频引导细化模块利用稳定的结构线索调控高频细节响应,并减少背景纹理的放大效应。异常感知增强模块通过结合局部对比度变化和边缘细节来强化局部缺陷相关模式。此外,结构感知融合模块利用底层结构信息引导跨尺度语义融合,从而改善小尺寸缺陷和不规则异物的表示。在IPFD数据集上的实验和消融研究证明了本发明在复杂巡检场景下对输电线路缺陷和异物检测的有效性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016407A_ABST
    Figure CN123016407A_ABST
Patent Text Reader

Abstract

The application provides a power transmission line defect and foreign matter detection method, device, equipment and medium, and relates to the technical field of power transmission line detection. The method comprises the following steps: acquiring an inspection image and extracting multi-scale features; low-frequency-high-frequency decomposition is performed by using a low-frequency guiding refinement module, selective modulation and amplitude smoothing of high-frequency details are performed by using low-frequency structure information, and background noise is inhibited; except for the lowest resolution scale, the remaining scale features are extracted by an abnormality perception enhancement module to obtain local contrast features and edge features and residual fusion is performed to enhance abnormal response; the lowest resolution feature is processed by AIFI to serve as a starting high-level feature, a gating map is generated by a structure perception fusion module according to low-level structure information in a top-down path, high-level features are modulated and fused, and target categories and positions are predicted according to the fused features at all levels. The application can effectively inhibit complex background interference and enhance the representation ability of fine-grained defects and foreign matters.
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 inspection technology, and in particular to a method, apparatus, equipment and medium for detecting defects and foreign objects in power transmission lines. Background Technology

[0002] As a critical infrastructure in the power system, the operational status of transmission lines directly affects the safety and stability of the power grid. With the development of intelligent power line inspection, vision-based detection of potential hazards in transmission lines has become an important research direction in the power field. Compared with traditional manual inspection methods, automated detection can reduce labor costs, improve inspection efficiency, and enable more timely fault response.

[0003] In fact, the detection of hidden dangers in power transmission lines still faces many challenges. Inspection images often have complex backgrounds, with non-target areas such as tree branches, buildings, and clouds easily causing interference and leading to false detections by the model. Some hidden dangers are fine-grained local anomalies, such as insulator damage, flashovers, and missing pins. These targets are often small in scale, have unstable appearances, and blurred boundaries, making them difficult to fully represent using conventional target detection frameworks. At the same time, different types of hidden dangers differ significantly in their spatial structure. For example, insulator strings and pins are local targets attached to structural components, while bird nests, balloons, garbage, and kites are foreign objects attached to or suspended around power transmission lines. How to simultaneously achieve background suppression, local anomaly enhancement, and utilize the structural information of components to represent hidden dangers at different scales in complex scenes is a key issue in improving the performance of power transmission line hidden danger detection.

[0004] In recent years, YOLO and DETR methods have been widely used for defect detection in power transmission lines. YOLO-based methods offer high real-time performance, but rely primarily on local convolutional features and dense predictions, limiting their ability to model global context and structural relationships. DETR-based methods achieve end-to-end detection through Transformer and ensemble prediction mechanisms, reducing post-processing steps such as anchor boxes and NMS; RT-DETR further balances detection accuracy and inference speed. However, in aerial photography scenarios of power transmission lines, RT-DETR remains susceptible to background texture noise, weak responses from small targets, and insufficient cross-scale detail fusion.

[0005] Specifically, interference from complex backgrounds is a key issue in the detection of hidden dangers in power transmission lines. Existing methods enhance the representation of target regions through attention mechanisms, multi-scale feature fusion, or contextual modeling. For example, existing techniques acquire global environmental information through scene awareness enhancement modules to improve the model's adaptability to complex backgrounds; simultaneously, they utilize detailed content to guide attention and enhance the fine-grained features of small defect regions. Other techniques improve the representation of small-scale target defects in complex backgrounds by introducing shallow high-resolution features and multi-branch fusion modules. Still other techniques utilize dynamic contextual modeling and wavelet sampling to enhance multi-scale target representation and detail preservation capabilities.

[0006] The methods described above improve feature representation capabilities in complex scenes, but high-frequency responses in transmission line images are not entirely valid defects. Tree branches, buildings, cloud textures, etc., also generate a large number of high-frequency responses. Directly enhancing details can easily amplify both background noise and real defects, leading to false detections. Summary of the Invention

[0007] This invention provides a method, apparatus, equipment, and medium for detecting defects and foreign objects in power transmission lines, in order to solve the problems of strong interference from complex backgrounds, insufficient characterization of local anomalies, and inadequate utilization of cross-scale structural information in the detection of hidden dangers in power transmission lines. This enhances the adaptability of power scenarios while maintaining the end-to-end detection process.

[0008] In a first aspect, the present invention provides a method for detecting defects and foreign objects in transmission lines, the method comprising: Acquire inspection images of the transmission lines to be inspected, and extract initial multi-scale features of the inspection images of the transmission lines through a backbone network; The initial multi-scale features are decomposed into low-frequency and high-frequency components using a low-frequency guided refinement module. The high-frequency detail components are selectively modulated based on the low-frequency structural components obtained from the decomposition. The modulated high-frequency features are then selectively smoothed based on the response amplitude to obtain refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain refined multi-scale features. The remaining scale features, excluding the lowest resolution scale, from the refined multi-scale features are input to the anomaly perception enhancement module. The anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features, and the edge features are fused together and then residually connected with the input features to obtain the enhanced multi-scale features. The lowest resolution scale feature in the refined multi-scale features is processed by the AIFI module and used as the initial high-level feature input to the top-down feature fusion path. In the top-down feature fusion path, the structure-aware fusion module performs fusion step by step: the feature corresponding to the scale in the enhanced multi-scale features is used as the low-level feature, and the high-level input feature is constructed from the initial high-level feature or the output feature of the previous level structure-aware fusion module. A structure-aware gating map is generated based on the low-level feature, and the structure-aware gating map is used to perform structural modulation on the high-level feature. The modulated high-level feature is fused with the low-level feature to obtain the output feature of each level structure-aware fusion module. Based on the output features of the structure perception fusion modules at each level, the target categories and locations of transmission line defects and foreign objects in the inspection images are predicted.

[0009] In one possible design, a low-frequency guided refinement module is used to perform low-frequency-high-frequency decomposition on the initial multi-scale features. Based on the low-frequency structural components obtained from the decomposition, the high-frequency detail components are selectively modulated, and the modulated high-frequency features are selectively smoothed based on the response amplitude to obtain refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain refined multi-scale features, including: Obtaining input features at a certain scale ,in Represents the space of real numbers. Indicates the number of channels. Indicates the height of the feature map. Indicates the width of the feature map; Based on the input features at a certain scale The low-frequency structural components are determined using the following formula. : in, This represents a local average pooling operation used to extract the neighborhood mean of features as a low-frequency background estimate. This represents a depthwise separable convolution operation; This indicates a batch normalization operation; Indicates the convolution operation; Based on low-frequency structural components The high-frequency detail components are determined using the following formula. : According to the low-frequency structural components Generate spatial attention weights and channel attention weights And utilize the spatial attention weights and the channel attention weights For the high-frequency detail components Modulation is performed to obtain the purified high-frequency characteristics. : in, This represents element-wise multiplication; The high-frequency characteristics after purification Selective smoothing based on response amplitude is performed to obtain refined high-frequency components. ; The low-frequency structural components With the refined high-frequency components The refined multi-scale features are obtained using the following formula. : in, This indicates the output mapping function.

[0010] In one possible design, based on the low-frequency structural components... Generate spatial attention weights and channel attention weights ,include: Calculate the low-frequency structural components along the channel dimension Average response and maximum response: in, Represents low-frequency structural components In position The average response value along the channel dimension, Represents low-frequency structural components In position The maximum response value along the channel dimension. Represents any position in the feature map. Represents low-frequency structural components In the Each channel, location The value at that location, Indicates the channel index. Indicates the total number of channels. Represents the maximum value function; Based on the low-frequency structural components The average and maximum responses are used to construct spatial attention through convolutional mapping: in, This indicates that spatial attention weights are located at position. The value at that location, This represents the Sigmoid activation function. and The learnable weight parameters represent the convolutional mapping. express The average value calculated along the channel dimension of the low-frequency structural feature map of the location. express The maximum value calculated along the channel dimension of the low-frequency structural feature map of the location. This indicates the offset in the direction of the space row. Indicates the offset in the direction of the spatial column; For the low-frequency structural components Perform global average pooling to obtain the channel description vector: in, Indicates the first Channel description vectors for each channel. and Indices representing the height and width, respectively; Based on the channel description vector, channel attention is obtained through two layers of nonlinear mapping: in, Indicates the first Attention weight values ​​for each channel, Indicates the intermediate compressed dimension. Represents the ReLU activation function. This indicates the connection of the first-level nonlinear mapping. The input channel to the first Learnable weight parameters for each output channel, This indicates the connection of the second-level nonlinear mapping. The intermediate dimension to the first Learnable weight parameters for each output channel, Indicates the first Channel description vectors for each channel.

[0011] In one possible design, the purified high-frequency characteristics Selective smoothing based on response amplitude is performed to obtain refined high-frequency components. ,include: Define the gate matrix ,in To preset the amplitude threshold, As an indicator function, when the high-frequency characteristics after purification The absolute value of the amplitude is less than the threshold. At that time, the gate matrix The corresponding position is set to 1, otherwise the value is 0; According to the gating matrix High-frequency characteristics after purification Selective smoothing is performed to obtain refined high-frequency components. : in, This indicates a depthwise separable convolution operation.

[0012] In one possible design, the anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features, and the edge features are then fused together and residually connected to the input features to obtain enhanced multi-scale features, including: With refined multi-scale features Input features as anomaly detection enhancement module Local contrast features are calculated using the following formula. : in, This indicates a local average pooling operation. This indicates the difference in response between the current location features and the neighborhood average background; For the input features Perform high-frequency separation and extract edge features : For input features Local contrast features and edge features By splicing and blending, the fused features are obtained. : in, This indicates a channel splicing operation. For feature fusion function; Based on the fused features, the enhanced multi-scale features are obtained using the following formula. : in, Represents a convolution mapping. For adaptive weights, This represents the Sigmoid activation function. This is the preset residual enhancement coefficient.

[0013] In one possible design, the top-down feature fusion path employs a structure-aware fusion module to perform fusion step-by-step, including: Obtaining low-level features and high-level characteristics The low-level features are the features of the corresponding scale in the enhanced multi-scale features at the current level fusion node; The high-level features Upsampling to the lower-level features Consistent spatial resolution: in, Indicates an upsampling operation. This represents the high-level features after upsampling; Utilizing the low-level features Generate structure-aware gated graphs : in, Representing low-level features In position The structural saliency gating value at the location, Represents any position in the feature map. Indicates the channel index. Indicates the total number of channels. Indicates the learnable weight parameters. Represents the ReLU activation function. This represents the Sigmoid activation function. Represents a convolution-based structure modeling mapping; The upsampled high-level features Perform structural modulation: in, For high-level feature mapping functions, These are the modulated high-level features; Based on the modulated high-level features The output features of the structure-aware fusion module are calculated using the following formula. : in, This represents the convolution mapping function.

[0014] In one possible design, the high-level input features are obtained as follows: The initial high-level features are transformed by projection to obtain projected initial high-level features; the projected initial high-level features are concatenated with the output features of the previous level structure perception fusion module to obtain concatenated features; the concatenated features are processed by FPN-Block to obtain the high-level input features; wherein, the projection transformation is used to unify the channel dimension of the initial high-level features so that it matches the channel dimension of the output features of the previous level structure perception fusion module.

[0015] Secondly, the present invention provides a transmission line defect and foreign object detection device, the device comprising: The feature extraction unit is configured to acquire the inspection image of the transmission line to be detected and extract the initial multi-scale features of the inspection image of the transmission line through the backbone network. The low-frequency guided refinement unit is configured to perform low-frequency-high-frequency decomposition on the initial multi-scale features using the low-frequency guided refinement module, selectively modulate the high-frequency detail components based on the low-frequency structural components obtained from the decomposition, and perform selective smoothing processing on the modulated high-frequency features based on the response amplitude to obtain refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain refined multi-scale features. An anomaly perception enhancement unit is configured to input the remaining scale features (excluding the lowest resolution scale) from the refined multi-scale features to the anomaly perception enhancement module. The anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features, and the edge features are fused together and then residually connected with the input features to obtain the enhanced multi-scale features. The structure-aware fusion unit is configured to process the lowest resolution scale feature in the refined multi-scale features through the AIFI module and use it as the initial high-level feature input to the top-down feature fusion path. In the top-down feature fusion path, the structure-aware fusion module performs fusion step by step: using the corresponding scale feature in the enhanced multi-scale features as the low-level feature, using the initial high-level feature or the high-level input feature constructed from the output feature of the previous level structure-aware fusion module as the high-level feature, generating a structure-aware gating map based on the low-level feature, using the structure-aware gating map to perform structural modulation on the high-level feature, and fusing the modulated high-level feature with the low-level feature to obtain the output feature of each level structure-aware fusion module. The defect and foreign object detection unit is configured to predict the target category and location of transmission line defects and foreign objects in the inspection image based on the output features of the structure perception fusion modules at each level.

[0016] Thirdly, embodiments of the present invention provide an electronic device, comprising: at least one processor and a memory; the memory storing computer execution instructions; the at least one processor executing the computer execution instructions stored in the memory, causing the at least one processor to perform the transmission line defect and foreign object detection method as described in the first aspect and various possible designs of the first aspect.

[0017] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the transmission line defect and foreign object detection method as described in the first aspect and various possible designs of the first aspect.

[0018] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the transmission line defect and foreign object detection method as described in the first aspect and various possible designs of the first aspect.

[0019] The method, apparatus, equipment, and medium for detecting defects and foreign objects in power transmission lines provided by this invention have at least the following beneficial effects: This invention improves feature representation by jointly suppressing pseudo-structural background responses, enhancing local anomaly cues, and preserving structure-aware cross-scale information. Specifically, a low-frequency guided refinement module utilizes stable structural cues to modulate high-frequency detail responses and reduce the amplification effect of background textures. Anomaly perception enhancement modules strengthen local defect-related patterns by combining local contrast variations and edge details. Furthermore, a structure-aware fusion module utilizes low-level structural information to guide cross-scale semantic fusion, thereby improving the representation of small-sized defects and irregular foreign objects. Experiments and ablation studies on the IPFD dataset demonstrate the effectiveness of this invention for detecting transmission line defects and foreign objects in complex inspection scenarios. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0021] Figure 1 A flowchart illustrating the overall process of a method for detecting defects and foreign objects in power transmission lines, as provided in an embodiment of the present invention. Figure 2 This is a structural diagram of the low-frequency guidance refinement module provided in an embodiment of the present invention; Figure 3 This is a structural diagram of the anomaly perception enhancement module provided in an embodiment of the present invention; Figure 4 This is a structural diagram of the structure sensing module provided in an embodiment of the present invention; Figure 5This is a structural diagram of a power transmission line defect and foreign object detection device provided in an embodiment of the present invention.

[0022] The accompanying drawings have illustrated specific embodiments of the invention, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0024] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision and disclosure of relevant data and information comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0025] It should be noted that in the embodiments of the present invention, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of the present invention. However, they do not mean that the inventor has used or necessarily used the solution.

[0026] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0027] To address the challenges of strong interference from complex backgrounds, weak representation of fine-grained anomalies, and insufficient utilization of cross-scale structural information in the detection of defects and foreign objects in transmission lines, this invention provides a method for detecting defects and foreign objects in transmission lines. This method constructs an improved detection model NSA-DETR based on RT-DETR and enhances the model's adaptability to complex inspection scenarios from three aspects: noise suppression, anomaly enhancement, and structural perception fusion.

[0028] Specifically, the overall process of this method for detecting defects and foreign objects in transmission lines is as follows: Figure 1 As shown, the implementation includes the following steps S10-S50.

[0029] S10: Obtain the inspection images of the transmission lines to be inspected, and extract the initial multi-scale features of the transmission line inspection images through the backbone network.

[0030] For example only, the backbone network can be chosen as ResNet18.

[0031] S20: The low-frequency guided refinement module is used to decompose the initial multi-scale features into low-frequency and high-frequency components. Based on the low-frequency structural components obtained from the decomposition, the high-frequency detail components are selectively modulated, and the modulated high-frequency features are selectively smoothed based on the response amplitude to obtain the refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain the refined multi-scale features.

[0032] For example, when the initial multi-scale features are three-scale features, the refined multi-scale features obtained through the low-frequency guided refinement module also correspond to three features, denoted as P3, P4, and P5, where P3 has the highest resolution and P5 has the lowest resolution. P3 and P4 are sent to the anomaly perception enhancement module for extraction and fusion enhancement of local contrast features and edge features. After intra-scale semantic interaction by the AIFI module, P5 is used as the initial high-level feature input to the top-down feature fusion path, participating in the step-by-step fusion processing of each level of the structure perception fusion module.

[0033] In some embodiments, the transmission line scenario includes complex backgrounds such as cloud textures, building edges, vegetation, and conductors. Meanwhile, clues for identifying damaged insulator edges, missing pin areas, and foreign object outlines are often found in high-frequency details. Directly enhancing the original features uniformly could easily amplify both background noise and effective edges. Therefore, this embodiment proposes a Low-Frequency Guided Refinement (LFGR) module, with the structure as follows: Figure 2 As shown, background interference is suppressed by explicit low-frequency to high-frequency decomposition, and high-frequency details are adaptively enhanced by utilizing low-frequency structural information.

[0034] Given input features at a certain scale ,in Represents the space of real numbers. Indicates the number of channels. Indicates the height of the feature map. Indicates the width of the feature map.

[0035] First, local average pooling is used to obtain the initial low-frequency components. Then, depthwise separable convolution and Convolution is used to perform nonlinear transformations to obtain low-frequency structural components. The corresponding high-frequency detail components are constructed using residuals: in, This represents a local average pooling operation used to extract the neighborhood mean of features as a low-frequency background estimate; DW This represents a depthwise separable convolution operation; This indicates a batch normalization operation; This indicates a convolution operation.

[0036] To leverage low-frequency structural priors to guide high-frequency detail enhancement, the average and maximum responses of the low-frequency features are first calculated along the channel dimension: Spatial attention is constructed through convolutional mapping. Represented as: in, Represents low-frequency structural components In position The average response value along the channel dimension, Represents low-frequency structural components In position The maximum response value along the channel dimension. Represents any position in the feature map. Represents low-frequency structural components In the Each channel, location The value at that location, Indicates the channel index. Indicates the total number of channels. Represents the maximum value function. This indicates that spatial attention weights are located at position. The value at that location, This represents the Sigmoid activation function. and The learnable weight parameters represent the convolutional mapping. express The average value calculated along the channel dimension of the low-frequency structural feature map of the location. express The maximum value calculated along the channel dimension of the low-frequency structural feature map of the location. This indicates the offset in the direction of the space row. This indicates the offset in the direction of the spatial column.

[0037] The above equation shows that the spatial weights integrate both the overall response and the significant response of low-frequency features, enabling more stable localization of structural regions.

[0038] To further model the channel dependencies of low-frequency features, global average pooling is first performed on the low-frequency features to obtain channel description vectors. Then, channel attention is obtained through two layers of nonlinear mapping. : in, Indicates the first Channel description vectors for each channel. and Indices representing the height and width, respectively. Indicates the first Attention weight values ​​for each channel, Indicates the intermediate compressed dimension. Represents the ReLU activation function. This indicates the connection of the first-level nonlinear mapping. The input channel to the first Learnable weight parameters for each output channel, This indicates the connection of the second-level nonlinear mapping. The intermediate dimension to the first Learnable weight parameters for each output channel, Indicates the first Channel description vectors for each channel.

[0039] The high-frequency characteristics after purification can be expressed as: in, This represents element-wise multiplication. Spatial attention determines which locations' high-frequency information should be preserved, while channel attention determines which semantic channels' high-frequency details are more discriminative.

[0040] Considering that some weak-amplitude high-frequency responses may still be considered noise, this embodiment further introduces a selective smoothing mechanism based on the response amplitude. A gating matrix is ​​defined. The refined high-frequency components for: Finally, the refined high-frequency components are re-fused with the low-frequency priors, and the output features are obtained through linear mapping: in, Indicates the output mapping function, This represents the refined multi-scale features.

[0041] Unlike conventional attention enhancement, LFGR does not directly improve all detail responses. Instead, it first uses local averaging to estimate the low-frequency background, and then selectively preserves and suppresses high-frequency components based on the low-frequency structure. Therefore, this low-frequency guided refinement module LFGR can more stably preserve key information details such as insulator edges, missing pin areas, and foreign object contours in complex backgrounds.

[0042] S30: Input the scale features other than the lowest resolution scale from the refined multi-scale features to the anomaly perception enhancement module. The anomaly perception enhancement module extracts local contrast features and edge features respectively. After fusing the input features, local contrast features and edge features, the module performs residual connection with the input features to obtain the enhanced multi-scale features.

[0043] For example, such as Figure 1 As shown, the anomaly perception enhancement module (AAE) can be set to two, corresponding to the P3 and P4 scales respectively, with identical structures. The refined P3-scale features are input to the corresponding P3-scale anomaly perception enhancement module, which processes them and outputs the enhanced P3-scale features. Similarly, the refined P4-scale features are input to the corresponding P4-scale anomaly perception enhancement module, which processes them and outputs the enhanced P4-scale features. Each anomaly perception enhancement module extracts local difference features through local average pooling, obtains local contrast features through two convolutions on these local difference features, and obtains edge features through high-frequency separation of the input features. The input features, local contrast features, and edge features are then concatenated and fused, and after adaptive weight modulation, connected to the input feature residual to output the enhanced features of the corresponding scale. The enhanced P3-scale features and enhanced P4-scale features, along with the P5-scale features processed by the AIFI module, participate in the step-by-step fusion processing in the top-down feature fusion path.

[0044] In some implementations, considering that in power transmission line inspection scenarios, flashovers, damaged targets, and some lightweight foreign objects often lack stable geometric shapes, their discrimination features are more often manifested as abnormal patterns such as local brightness abrupt changes, texture anomalies, edge damage, and structural discontinuities. Simply relying on conventional multi-scale feature representations is often insufficient to fully capture their discrimination information. Therefore, this embodiment proposes an anomaly perception enhancement module (AAE), with the structure as follows: Figure 3 As shown, local contrast features and edge response features are jointly modeled to improve the model's sensitivity to abnormal regions.

[0045] Given input features First, a neighborhood background representation is constructed using local average pooling, and then the local contrast features of the current region relative to its neighborhood are calculated: in, This represents the difference in response between the current location features and the neighborhood average background. It can highlight areas that differ significantly from the surrounding area and has a good response capability to local differences in brightness and darkness, burn marks, and flashing areas.

[0046] To further enhance the model's ability to perceive edge and contour changes, this embodiment introduces an edge-aware branch. This branch adopts a high-frequency separation approach similar to LFGR, but removes attention and gating, retaining only the convolutional mapping: Compared with the local contrast branch, this branch can highlight structural boundaries, local shape abrupt changes, and slender contour information, and has a strong characterization ability for insulator damage edges, pin area structural changes, and foreign object target boundaries.

[0047] Subsequently, the original features, local contrast features, and edge features are concatenated and fused. To avoid over-amplifying the background response due to abnormal enhancement, an adaptive weight generation mechanism is adopted, which is performed position-by-position and channel-by-channel. The enhancement result is then output using a residual method. in, For feature fusion function, Represents a convolution mapping. This is the residual enhancement coefficient. This indicates a channel splicing operation. For adaptive weights.

[0048] Unlike simple convolutional enhancement, the AAE module specifically targets issues such as structural abrupt changes, edge discontinuities, and significant local anomalies in power transmission line scenarios.

[0049] S40: The lowest resolution scale feature in the refined multi-scale features is processed by the AIFI module and used as the input of the starting high-level feature to the top-down feature fusion path. In the top-down feature fusion path, the structure-aware fusion module is used to perform fusion step by step: the feature of the corresponding scale in the enhanced multi-scale features is used as the low-level feature, and the high-level input feature is used as the starting high-level feature or the high-level input feature constructed from the output feature of the previous level structure-aware fusion module. A structure-aware gating map is generated based on the low-level feature, and the structure-aware gating map is used to modulate the high-level feature. The modulated high-level feature is fused with the low-level feature to obtain the output feature of each level structure-aware fusion module.

[0050] For example, such as Figure 1 As shown, the structure-aware fusion module can be configured into two parts, located at the first and second levels of the top-down path, respectively. The first-level structure-aware fusion module uses the initial high-level features (i.e., the P5-scale features processed by the AIFI module) as high-level features and the enhanced P4-scale features as low-level features. After processing by the structure-aware fusion module, it outputs the first-level fused features. The high-level input features of the second-level structure-aware fusion module are constructed as follows: the initial high-level features are sequentially processed by 1×1 convolution, batch normalization, and SiLU activation function, then concatenated with the first-level fused features. The concatenated features are then processed by FPN-Block to obtain the high-level input features. The second-level structure-aware fusion module uses these high-level input features as high-level features and the enhanced P3-scale features as low-level features. After processing by the structure-aware fusion module, it outputs the second-level fused features. Each structure-aware fusion module generates a structure-aware gated map based on the input low-level features. The structure-aware gated map is then used to spatially selectively modulate the high-level features to suppress irrelevant semantic interference and preserve structurally sensitive regions. The modulated high-level features are then added to and fused with the low-level features, and finally output after convolutional mapping. The output features of each structure-aware fusion module are used to predict the target category and location of defects and foreign objects in transmission lines.

[0051] In some implementations, high- and low-level feature fusion is mainly achieved through upsampling and convolutional blocks in the original top-down path. However, in the transmission line inspection scenario, low-level features contain a large amount of structure-related details, such as insulator string outlines, pin position relationships, and foreign object boundaries; while high-level features, although possessing stronger semantic expressive power, lack precise structural information due to their lower resolution. Direct upsampling and concatenation can easily lead to high-level semantics overriding low-level details, thereby weakening the model's ability to detect defects and foreign objects. Therefore, this embodiment proposes a Structure-Aware Fusion (SAF) module, structured as follows: Figure 4 As shown, spatial gating generated from low-level structural information is introduced during the high-low layer feature fusion process to achieve semantic injection under structural constraints.

[0052] Let the low-level features be High-level characteristics are First, the high-level features are upsampled using bilinear interpolation to a spatial resolution consistent with the low-level features: in, Indicates an upsampling operation. This represents the high-level features after upsampling.

[0053] Then, a structure-aware gated map is generated using low-level features. Let... If we represent a structure modeling mapping based on convolution, then the gating expression is: in, Representing low-level features In position The structural saliency gating value at the location, Represents any position in the feature map. Indicates the channel index. Indicates the total number of channels. Indicates the learnable weight parameters. Represents the ReLU activation function. This represents the Sigmoid activation function. This represents a convolution-based structural modeling mapping. The injection intensity of high-level semantic features at different spatial locations is determined based on the local structural responses in low-level features.

[0054] After obtaining the structure-aware gated map, the upsampled high-level features are subjected to structure modulation: in, For high-level feature mapping functions, These are the modulated high-level features.

[0055] For any position and channels ,have As can be seen from the above formula, all channels at the same location are a priori controlled by the lower-level structure.

[0056] Finally, the modulated high-level features are fused with the low-level features, and the final output is obtained through convolutional mapping: in, This represents the output features of the structure-aware fusion module.

[0057] Unlike the traditional multi-scale fusion method of "direct upsampling and splicing", SAF constrains the propagation path of high-level semantics through low-level structure gating, transforming cross-scale fusion from "high-level semantics covering low-level details" to "high-level semantics supplementing low-level structure". This design is more suitable for scenarios where transmission lines have "regular components, obvious target dependencies, and strong structural relationships".

[0058] S50: Based on the output characteristics of the structural perception fusion modules at all levels, predict the target category and location of transmission line defects and foreign objects in the inspection image.

[0059] For example, such as Figure 1As shown, through a two-way fusion process of "top-down and bottom-up," a multi-scale feature map can be output, with each layer simultaneously possessing strong semantic information from higher levels and high-resolution detail information from lower levels. The bottom-up path aggregation process, following the top-down path aggregation, consists of two levels of PAN-BLOCK. Specifically, the first-level bottom-up aggregation uses the second-level fused features as input, performs downsampling, adds them to the first-level fused features, and then processes them through PAN-BLOCK to output the first-level bottom-up features. The second-level bottom-up aggregation further downsamples the first-level bottom-up features and fuses them with the initial high-level features (i.e., the P5-scale features processed by the AIFI module), then processes them through PAN-BLOCK to obtain the second-level bottom-up features. This bottom-up aggregation effectively compensates for the localization information that may be lost in the top-down fusion. After completing the bottom-up aggregation, the second-level fused features, the first-level bottom-up features, and the second-level bottom-up features are concatenated and flattened into an image feature sequence. Subsequently, positional encoding is added to the sequence to preserve spatial location information, and a query selection mechanism is used to select several feature points with the highest classification confidence as initial object queries. Finally, the image feature sequence is used as a key and value, and together with the initial object queries, it is input into the decoder. After iterative updates by the decoder, the target category and location of transmission line defects and foreign objects are output through the prediction head.

[0060] The feasibility and progressiveness of the method of the present invention will be further illustrated by specific experiments below.

[0061] To verify the effectiveness of NSA-DETR, this embodiment constructed and used the IPFD dataset. This dataset contains 4019 images and consists of two parts: one part is the Insulator Defect Image Dataset (IDID) provided by IEEE, and the other part is independently acquired and network-sourced images. The acquisition and annotation both follow relevant power industry standards.

[0062] Following the annotation conventions of previous studies on transmission line defect and foreign object detection, all defect and foreign object instances were manually annotated using LabelImg. The generated annotation files were saved in VOC format, with each file recording the category label and bounding box coordinates of the corresponding target instance. The use of multi-source data helps improve sample diversity and scenario coverage, enabling the dataset to better reflect the complexity of actual transmission line inspection scenarios.

[0063] This dataset is built around the scenario of power transmission line inspection, covering multiple detection targets, including insulator defects, foreign object intrusion, and cotter pin status. The background is highly complex, with various interference sources such as sky, vegetation, and buildings, making the dataset challenging in terms of scale variation, background interference, category distribution, and target morphological differences. In the dataset used in this embodiment, the insulator category includes three subcategories: normal, damaged, and flashover; the foreign object category includes four subcategories: balloons, garbage, kites, and bird nests; and the cotter pin category includes two subcategories: normal and missing, forming a total of nine fine-grained categories.

[0064] To avoid data leakage, a stratified sampling strategy was adopted to divide the dataset into training, validation, and test sets in a 7:1:2 ratio. During the partitioning process, images originating from the same transmission line were assigned to the same subset to prevent visually or spatially related samples from appearing in different subsets. Furthermore, the category distribution in each subset was kept as consistent as possible with the entire set, providing a reliable foundation for model training, validation, and evaluation.

[0065] Experimental Setup: All experiments were conducted in an Ubuntu 22.04 environment, with an NVIDIA GeForce RTX 4090 GPU and CUDA version 12.8. The input image size was uniformly set to... The model was trained using the Adam optimizer, with an initial learning rate set to... The weight decay coefficient is set to The batch size was set to 16, and the number of training epochs was set to 200.

[0066] To comprehensively evaluate the model's performance in the task of detecting hidden dangers in transmission lines, this embodiment uses precision, recall, and mean accuracy (mAP), which are commonly used in the field of target detection. 50 and mAP 50:95 As the primary evaluation metrics, precision measures the proportion of true targets among the detected samples predicted as positive by the model, while recall measures the model's ability to detect all true targets. mAP (Maximum Achievement Rate) is used as the main evaluation metric. 50 This represents the mean accuracy of each category when the intersection-union ratio (IU) threshold is 0.5, reflecting the overall detection performance of the model under relatively lenient conditions; mAP 50:95 The average accuracy of the cross-intersection over union (CUI) threshold of 0.5 to 0.95 and a step size of 0.05 can more comprehensively reflect the overall performance of the model under different positioning accuracy requirements.

[0067] For the task of detecting hidden dangers in power transmission lines, a high recall rate means that the model can minimize missed detections, thereby reducing inspection risks; a high mAP (memory accuracy) index indicates that the model has good reliability in both target classification and localization. Therefore, this embodiment uses mAP... 50 and mAP50:95 As a core evaluation metric, Precision and Recall are combined to comprehensively analyze model performance.

[0068] To verify the effectiveness of the method of the present invention in the inspection of power transmission lines, a number of mainstream target detection algorithms were selected for comparative experiments. All comparative models were trained and tested under the same dataset and unified experimental settings.

[0069] As shown in Table 1, the method of the present invention achieves optimal results in all indicators. Specifically, the method of the present invention achieves the best results in Precision, Recall, and mAP. 50 and mAP 50:95 The accuracy rates were 94.6%, 83.8%, 92.9%, and 66.2%, respectively. Compared to the baseline model RT-DETR-R18, the method of this invention improved precision by 3.4 percentage points, recall by 1.9 percentage points, and mAP by [missing information]. 50 It increased by 2.6 percentage points, mAP 50:95 The improvement was 3.1 percentage points, demonstrating that the proposed improvement strategy can effectively enhance the model's ability to classify and locate transmission line defects and foreign objects.

[0070] Compared to the YOLO series methods, the method of this invention also shows a significant advantage in detection accuracy. While some YOLO models are competitive in recall, their mAP... 50 and mAP 50:95 The overall performance indicators are lower than those of the method in this invention, indicating that its comprehensive detection capability for different types of targets in complex scenarios is still insufficient. The method in this invention, by introducing a low-frequency guided refinement module, an anomaly perception enhancement module, and a structure perception fusion module, has stronger capabilities in background suppression, local anomaly characterization, and cross-scale structure modeling, and can more accurately detect insulator defects, pin anomalies, and foreign objects.

[0071] Overall, the method of this invention significantly improves detection accuracy and overall performance while maintaining a high recall rate, verifying the effectiveness and superiority of the proposed improved method in power transmission line inspection scenarios.

[0072] Table 1 Comparative test results

[0073] To verify the effectiveness of each improved module, this embodiment uses the original RT-DETR as the baseline model and adds LFGR, AAE and SAF to conduct ablation experiments.

[0074] Table 2 shows that the mAP of the baseline model 50 and mAP 50:95The percentages were 90.3% and 63.1%, respectively. After individually introducing LFGR, AAE, and SAF, the model's mAP... 50 The mAP was increased to 91.0%, 91.4%, and 91.2% respectively. 50:95 The improvements to mAP were 64.0%, 64.2%, and 64.6% respectively, indicating that all three modules effectively improved detection performance. Specifically, AAE improved mAP... 50 The improvement is significant, indicating that it can enhance the model's response to local anomalies; SAF improves mAP 50:95 The improvement is more significant, indicating that structural perception fusion helps improve the quality of target localization.

[0075] Further observation of the results from different module combinations reveals that any two modules used in combination outperform the baseline model. Specifically, the combination of AAE and SAF achieved a mAP of 92.2%. 50 and 65.4% mAP 50:95 This indicates a good complementarity between local anomaly enhancement and structure-aware fusion. The model achieves optimal performance when all three modules (LFGR, AAE, and SAF) are introduced simultaneously. 50 Reaching 92.9%, mAP 50:95 The accuracy rate reached 66.2%, representing an improvement of 2.6 and 3.1 percentage points respectively compared to the baseline model.

[0076] Experimental results show that the three modules proposed in this embodiment can jointly improve the characterization capability of RT-DETR in transmission line detection tasks from three aspects: background suppression, anomaly enhancement, and cross-scale structure fusion.

[0077] Table 2 Ablation Experiment Results

[0078] This invention also provides a transmission line defect and foreign object detection device for implementing the methods described in any of the above embodiments, such as... Figure 5 As shown, the device includes: The feature extraction unit 501 is configured to acquire the inspection image of the transmission line to be detected, and extract the initial multi-scale features of the inspection image of the transmission line through the backbone network. The low-frequency guided refinement unit 502 is configured to perform low-frequency-high-frequency decomposition on the initial multi-scale features using the low-frequency guided refinement module, selectively modulate the high-frequency detail components based on the low-frequency structural components obtained from the decomposition, and perform selective smoothing processing on the modulated high-frequency features based on the response amplitude to obtain refined high-frequency components, and fuse the refined high-frequency components with the low-frequency structural components to obtain refined multi-scale features. Anomaly perception enhancement unit 503 is configured to input the scale features other than the lowest resolution scale in the refined multi-scale features to the anomaly perception enhancement module, and the anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features and the edge features are fused and then residually connected with the input features to obtain the enhanced multi-scale features. The structure-aware fusion unit 504 is configured to process the lowest resolution scale feature in the refined multi-scale features through the AIFI module and use it as the initial high-level feature input to the top-down feature fusion path. In the top-down feature fusion path, the structure-aware fusion module performs fusion step by step: using the corresponding scale feature in the enhanced multi-scale features as the low-level feature, using the initial high-level feature or the high-level input feature constructed from the output feature of the previous level structure-aware fusion module as the high-level feature, generating a structure-aware gating map based on the low-level feature, using the structure-aware gating map to perform structural modulation on the high-level feature, and fusing the modulated high-level feature with the low-level feature to obtain the output feature of each level structure-aware fusion module. The defect and foreign object detection unit 505 is configured to predict the target category and location of transmission line defects and foreign objects in the inspection image based on the output features of the structure perception fusion modules at each level.

[0079] This invention provides an electronic device. The electronic device may include a processor and a memory, wherein the processor and the memory can communicate; exemplarily, the processor and the memory communicate via a communication bus.

[0080] The processor executes computer execution instructions stored in memory, causing the processor to perform the scheme in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0081] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.

[0082] The electronic device provided in this embodiment of the invention can be the terminal device described in the above embodiments.

[0083] This invention also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the technical solution of the transmission line defect and foreign object detection method described above.

[0084] This invention also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the transmission line defect and foreign object detection method in the above embodiments.

[0085] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

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

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

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

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

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

[0091] Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Architecture (EISA) buses, etc. Buses can be categorized into address buses, data buses, control buses, etc.

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

[0093] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.

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

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting defects and foreign objects in power transmission lines, characterized in that, The method includes: Acquire inspection images of the transmission lines to be inspected, and extract initial multi-scale features of the inspection images of the transmission lines through a backbone network; The initial multi-scale features are decomposed into low-frequency and high-frequency components using a low-frequency guided refinement module. The high-frequency detail components are selectively modulated based on the low-frequency structural components obtained from the decomposition. The modulated high-frequency features are then selectively smoothed based on the response amplitude to obtain refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain refined multi-scale features. The remaining scale features, excluding the lowest resolution scale, from the refined multi-scale features are input to the anomaly perception enhancement module. The anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features, and the edge features are fused together and then residually connected with the input features to obtain the enhanced multi-scale features. The lowest resolution scale feature in the refined multi-scale features is processed by the AIFI module and used as the initial high-level feature input to the top-down feature fusion path. In the top-down feature fusion path, the structure-aware fusion module performs fusion step by step: the feature corresponding to the scale in the enhanced multi-scale features is used as the low-level feature, and the high-level input feature is constructed from the initial high-level feature or the output feature of the previous level structure-aware fusion module. A structure-aware gating map is generated based on the low-level feature, and the structure-aware gating map is used to perform structural modulation on the high-level feature. The modulated high-level feature is fused with the low-level feature to obtain the output feature of each level structure-aware fusion module. Based on the output features of the structure perception fusion modules at each level, the target categories and locations of transmission line defects and foreign objects in the inspection images are predicted.

2. The method for detecting defects and foreign objects in transmission lines according to claim 1, characterized in that, A low-frequency guided refinement module is used to perform low-frequency-high-frequency decomposition on the initial multi-scale features. Based on the low-frequency structural components obtained from the decomposition, the high-frequency detail components are selectively modulated, and the modulated high-frequency features are selectively smoothed based on the response amplitude to obtain refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain refined multi-scale features, including: Obtaining input features at a certain scale ,in Represents the space of real numbers. Indicates the number of channels. Indicates the height of the feature map. Indicates the width of the feature map; Based on the input features at a certain scale The low-frequency structural components are determined using the following formula. : in, This represents a local average pooling operation used to extract the neighborhood mean of features as a low-frequency background estimate. This represents a depthwise separable convolution operation; This indicates a batch normalization operation; Indicates the convolution operation; Based on low-frequency structural components The high-frequency detail components are determined using the following formula. : According to the low-frequency structural components Generate spatial attention weights and channel attention weights And utilize the spatial attention weights and the channel attention weights For the high-frequency detail components Modulation is performed to obtain the purified high-frequency characteristics. : in, This represents element-wise multiplication; The high-frequency characteristics after purification Selective smoothing based on response amplitude is performed to obtain refined high-frequency components. ; The low-frequency structural components With the refined high-frequency components The refined multi-scale features are obtained using the following formula. : in, This indicates the output mapping function.

3. The method for detecting defects and foreign objects in transmission lines according to claim 2, characterized in that, According to the low-frequency structural components Generate spatial attention weights and channel attention weights ,include: Calculate the low-frequency structural components along the channel dimension Average response and maximum response: in, Represents low-frequency structural components In position The average response value along the channel dimension, Represents low-frequency structural components In position The maximum response value along the channel dimension. Represents any position in the feature map. Represents low-frequency structural components In the Each channel, location The value at that location, Indicates the channel index. Indicates the total number of channels. Represents the maximum value function; Based on the low-frequency structural components The average and maximum responses are used to construct spatial attention through convolutional mapping: in, This indicates that spatial attention weights are located at position. The value at that location, This represents the Sigmoid activation function. and The learnable weight parameters represent the convolutional mapping. express The average value calculated along the channel dimension of the low-frequency structural feature map of the location. express The maximum value calculated along the channel dimension of the low-frequency structural feature map of the location. This indicates the offset in the direction of the space row. Indicates the offset in the direction of the spatial column; For the low-frequency structural components Perform global average pooling to obtain the channel description vector: in, Indicates the first Channel description vectors for each channel. and Indices representing the height and width, respectively; Based on the channel description vector, channel attention is obtained through two layers of nonlinear mapping: in, Indicates the first Attention weight values ​​for each channel, Indicates the intermediate compressed dimension. Represents the ReLU activation function. This indicates the connection of the first-level nonlinear mapping. The input channel to the first Learnable weight parameters for each output channel, This indicates the connection of the second-level nonlinear mapping. The intermediate dimension to the first Learnable weight parameters for each output channel, Indicates the first Channel description vectors for each channel.

4. The method for detecting defects and foreign objects in transmission lines according to claim 2, characterized in that, The high-frequency characteristics after purification Selective smoothing based on response amplitude is performed to obtain refined high-frequency components. ,include: Define the gate matrix ,in To preset the amplitude threshold, As an indicator function, when the high-frequency characteristics after purification The absolute value of the amplitude is less than the threshold. At that time, the gate matrix The corresponding position is set to 1, otherwise the value is 0; According to the gating matrix High-frequency characteristics after purification Selective smoothing is performed to obtain refined high-frequency components. : in, This indicates a depthwise separable convolution operation.

5. The method for detecting defects and foreign objects in transmission lines according to claim 1, characterized in that, The anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features, and the edge features are then fused together and residually connected to the input features to obtain enhanced multi-scale features, including: With refined multi-scale features Input features as anomaly detection enhancement module Local contrast features are calculated using the following formula. : in, This indicates a local average pooling operation. This indicates the difference in response between the current location features and the neighborhood average background; For the input features Perform high-frequency separation and extract edge features : For input features Local contrast features and edge features By splicing and blending, the fused features are obtained. : in, This indicates a channel splicing operation. For feature fusion function; Based on the fused features, the enhanced multi-scale features are obtained using the following formula. : in, Represents a convolution mapping. For adaptive weights, This represents the Sigmoid activation function. This is the preset residual enhancement coefficient.

6. The method for detecting defects and foreign objects in transmission lines according to claim 1, characterized in that, In the top-down feature fusion path, a structure-aware fusion module is used to perform fusion step by step, including: Obtaining low-level features and high-level characteristics The low-level features are the features of the corresponding scale in the enhanced multi-scale features at the current level fusion node; The high-level features Upsampling to the lower-level features Consistent spatial resolution: in, Indicates an upsampling operation. This represents the high-level features after upsampling; Utilizing the low-level features Generate structure-aware gated graphs : in, Representing low-level features In position The structural saliency gating value at the location, Represents any position in the feature map. Indicates the channel index. Indicates the total number of channels. Indicates the learnable weight parameters. Represents the ReLU activation function. This represents the Sigmoid activation function. Represents a convolution-based structure modeling mapping; The upsampled high-level features Perform structural modulation: in, For high-level feature mapping functions, These are the modulated high-level features; Based on the modulated high-level features The output features of the structure-aware fusion module are calculated using the following formula. : in, This represents the convolution mapping function.

7. The method for detecting defects and foreign objects in transmission lines according to claim 1, characterized in that, High-level input features are obtained in the following way: The initial high-rise features are transformed by projection to obtain the projected initial high-rise features; The projected initial high-level features are concatenated with the output features of the previous-level structure perception fusion module to obtain concatenated features; the concatenated features are then processed by FPN-Block to obtain the high-level input features; wherein, the projection transformation is used to unify the channel dimensions of the initial high-level features so that they match the channel dimensions of the output features of the previous-level structure perception fusion module.

8. A device for detecting defects and foreign objects in power transmission lines, characterized in that, The device includes: The feature extraction unit is configured to acquire the inspection image of the transmission line to be detected and extract the initial multi-scale features of the inspection image of the transmission line through the backbone network. The low-frequency guided refinement unit is configured to perform low-frequency-high-frequency decomposition on the initial multi-scale features using the low-frequency guided refinement module, selectively modulate the high-frequency detail components based on the low-frequency structural components obtained from the decomposition, and perform selective smoothing processing on the modulated high-frequency features based on the response amplitude to obtain refined high-frequency components. The refined high-frequency components are then fused with the low-frequency structural components to obtain refined multi-scale features. An anomaly perception enhancement unit is configured to input the remaining scale features (excluding the lowest resolution scale) from the refined multi-scale features to the anomaly perception enhancement module. The anomaly perception enhancement module extracts local contrast features and edge features respectively. The input features, the local contrast features, and the edge features are fused together and then residually connected with the input features to obtain the enhanced multi-scale features. The structure-aware fusion unit is configured to process the lowest resolution scale feature in the refined multi-scale features through the AIFI module and use it as the initial high-level feature input to the top-down feature fusion path. In the top-down feature fusion path, the structure-aware fusion module performs fusion step by step: using the corresponding scale feature in the enhanced multi-scale features as the low-level feature, using the initial high-level feature or the high-level input feature constructed from the output feature of the previous level structure-aware fusion module as the high-level feature, generating a structure-aware gating map based on the low-level feature, using the structure-aware gating map to perform structural modulation on the high-level feature, and fusing the modulated high-level feature with the low-level feature to obtain the output feature of each level structure-aware fusion module. The defect and foreign object detection unit is configured to predict the target category and location of transmission line defects and foreign objects in the inspection image based on the output features of the structure perception fusion modules at each level.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the transmission line defect and foreign object detection method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the transmission line defect and foreign object detection method as described in any one of claims 1-7.