A power inspection picture target detection method based on frequency domain enhanced Mamba-Yolov8

By introducing a combination of frequency domain feature enhancement module and Mamba module into the YOLOv8 backbone network, the problems of global context modeling and local detail enhancement in power inspection are solved, realizing efficient automatic detection of power component damage and foreign object obstruction, and improving detection accuracy and precision.

CN123182148APending Publication Date: 2026-11-27INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies struggle to balance global context modeling and local detail enhancement in power line inspection, and insufficient adjustment of spectral energy and structural information leads to poor identification and localization of component damage and foreign object obstruction in complex backgrounds.

Method used

A target detection method for power line inspection images based on frequency domain enhancement Mamba-YOLOv8 is adopted. By introducing a frequency domain feature enhancement module into the YOLOv8 backbone network, the input feature map is subjected to dual-branch spectral modulation. Combined with the Mamba module for sequence modeling, amplitude and phase information are fused to enhance feature representation.

Benefits of technology

It improves the identification and localization of component damage and foreign object occlusion in complex backgrounds, and enhances the accuracy and precision of target detection, especially in the relationship between high-frequency details and global structure, reducing false detections and missed detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182148A_ABST
    Figure CN123182148A_ABST
Patent Text Reader

Abstract

The application discloses a kind of power inspection picture target detection methods based on frequency domain enhancement Mamba-Yolov8, including, in YOLOv8 backbone network, replace part of convolution backbone with Mamba module, and set frequency domain feature enhancement module before Mamba module;The same input feature map is sent into two branches, and is transformed by two-dimensional Fourier and independent learnable complex value filtering, the real part is obtained by inverse transformation and residual connection, and is transformed to frequency domain again;The amplitude and phase of the two branches are respectively fused using channel-level learnable weight, the complex spectrum is reconstructed, and the enhanced feature is obtained by inverse transformation;After the enhanced feature is flattened, it is input into Mamba module, and the target category and boundary box are output by multi-scale fusion and decoupling detection.The application combines frequency domain detail enhancement and global context modeling, to improve the detection accuracy of power component damage and foreign object shielding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing and intelligent power line inspection technology, and in particular to a target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8. Background Technology

[0002] The operational status of power transmission and transformation components such as cables, insulators, and towers directly affects the safety and stability of the power grid. During long-term operation, these components are affected by factors such as wind, rain, mechanical stress, and environmental changes, which may lead to defects such as broken cable strands and damaged insulators. Transmission lines may also be affected by obstructions or attachments of foreign objects. Therefore, accurate identification and location of components and abnormal targets in power grid inspection images is a crucial aspect of power grid operation and maintenance.

[0003] Traditional inspections mainly rely on manual visual inspection and periodic checks. When the inspection area is large, the number of images is numerous, and the defect size is small, this approach suffers from problems such as high workload, limited inspection efficiency, and the easy omission of minute defects. With the development of computer vision technology, deep learning-based target detection methods are gradually being applied to power line inspections. By extracting features, classifying targets, and regressing locations from collected images, automatic detection of power transmission and transformation components and abnormal targets can be achieved.

[0004] Object detection networks, exemplified by the YOLO series, can extract target features through multi-layer convolution and multi-scale feature fusion, and output target categories and bounding boxes. However, power line inspection images typically feature complex backgrounds, significant differences in target scale, and low contrast between defects and background. Anomalies such as broken cable strands, fine cracks, and insulator edge defects mainly manifest as subtle local textures or edge variations, while the identification of foreign object occlusion requires consideration of the spatial relationship between the occluder, component, and background. Convolutional networks primarily extract features through local neighborhood operations. Although they can expand the receptive field by stacking network layers, their ability to directly model long-distance spatial relationships remains limited. Furthermore, subtle anomaly features may be weakened during multi-layer feature extraction, thus affecting detection and localization performance.

[0005] Networks employing self-attention mechanisms can establish connections between different image regions, but the computational cost of global self-attention increases significantly with the length of the feature sequence, easily increasing storage requirements and inference time when processing high-resolution inspection images. The Mamba architecture based on a state-space model performs sequence modeling through selective scanning, providing a technical approach to obtaining long-range dependency information with lower computational cost. However, sequence modeling relying solely on spatial features still struggles to adequately represent both the overall structure of components and subtle breakage boundaries.

[0006] Frequency domain processing can describe image texture and edge changes from the perspective of frequency components, providing another processing approach for enhancing details and suppressing background interference. Among these, amplitude information reflects the energy distribution of frequency components, while phase information is related to the spatial structure of the image. For power line inspection target detection, simply enhancing the intensity of feature responses may not simultaneously improve the representation of target boundaries and spatial positions; using a uniform spectrum fusion method also makes it difficult to separately adjust the influence of energy information and structural information on the detection results.

[0007] Therefore, how to balance global context modeling and local detail enhancement during power line inspection target detection, and how to adjust spectral energy information and structural information separately to improve the identification and localization of component damage and foreign object obstruction in complex backgrounds, is a technical problem that needs to be solved. Summary of the Invention

[0008] To address these issues, this invention provides a target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8, which solves the above problems.

[0009] This invention provides a target detection method for power line inspection images based on frequency domain enhanced Mamba-Yolov8, comprising the following steps:

[0010] S1. Obtain power inspection images, which include cables, insulators, towers, and objects obstructing the view.

[0011] S2. Input the power inspection image into the YOLOv8 target detection network, which includes a backbone network, a neck network, and a decoupled detection head.

[0012] S3. In the backbone network, a portion of the convolutional backbone is replaced with Mamba modules, and a frequency domain feature enhancement module is set before the Mamba modules;

[0013] S4. The frequency domain feature enhancement module is used to perform bi-branch spectrum modulation on the input feature map to obtain frequency enhancement features;

[0014] S5. Flatten the frequency enhancement features into a feature sequence and input it into the Mamba module for sequence modeling to obtain features with global context information;

[0015] S6. The neck network is used to fuse features of different scales, and the fused features are input into the decoupled detection head to output the category information and bounding box position information of the target in the power inspection image.

[0016] The dual-branch spectrum modulation includes: performing two-dimensional discrete Fourier transforms on the same input feature map for two branches respectively; using two independent learnable complex-valued filters to modulate the spectrum of the two branches element by element; extracting the amplitude and phase of the two modulated branches respectively; and weighting and fusing the amplitude and phase of the two branches respectively to reconstruct the frequency enhancement feature.

[0017] Furthermore, the frequency domain feature enhancement module receives two feature maps X1 and X2, and sets them as follows: X1=X2=X;

[0018] in, B is the batch size, C is the number of channels, and H and W are the height and width of the spatial feature map, respectively.

[0019] Perform a two-dimensional discrete Fourier transform on the m-th branch: ;

[0020] Where m∈{1,2}, F m Let be the spectral characteristics of the m-th branch.

[0021] Furthermore, the frequency domain feature enhancement module utilizes a learnable complex-valued filter to modulate the spectrum of each branch element-wise, specifically including: ;

[0022] Where ⊙ represents the Hadama product, W L,m ∈C C×H×W Let W be the learnable complex-valued filter for the m-th branch, and the learnable complex-valued filter for the two branches. L,1 and W L,2 Independent of each other; W L,1

[0023] Perform an inverse Fourier transform on the modulated spectrum and then connect it to the corresponding input feature map using spatial residual concatenation: ;

[0024] Where Re[] denotes taking the real part, X FS,m This represents the feature map of the m-th branch after frequency domain modulation and spatial residual connection.

[0025] Furthermore, after obtaining the X FS,m Then, regarding X FS,m Perform a second two-dimensional discrete Fourier transform to obtain the enhanced spectrum: ;

[0026] The amplitude and phase of the enhanced spectrum are extracted respectively: ; ;

[0027] Among them, A mLet P represent the amplitude spectrum of the m-th branch. m This represents the phase spectrum of the m-th branch.

[0028] Furthermore, the amplitude and phase spectra of the two branches are fused separately, specifically including:

[0029] A fused =α1A1+α2A2;

[0030] P fused =β1P1+β2P2;

[0031] Wherein, α1 and α2 are learnable amplitude weights, which are used to control the fusion ratio of energy information in the two branches respectively; β1 and β2 are learnable phase weights, which are used to modulate the fusion focus of structural information in the two branches respectively; the amplitude weights and phase weights are set according to the channels respectively.

[0032] Furthermore, the fused complex spectrum is reconstructed based on the fused amplitude and phase spectra, and the frequency enhancement features are obtained through inverse Fourier transform.

[0033] ;

[0034] ;

[0035] Where j is the imaginary unit, F fused For the fused complex spectrum, X out This refers to the frequency enhancement feature;

[0036] Flatten the frequency enhancement features into a feature sequence: Where L = HW;

[0037] The feature sequence is then input into a standard Mamba module.

[0038] Furthermore, the Mamba module performs sequence modeling on the feature sequence based on a state-space model, which includes state representation equations and prediction output equations:

[0039] ;

[0040] ;

[0041] in, , and These represent the state transition matrix, input matrix, and output matrix, respectively. Represents the state vector at time t; y(t) represents the input at time t; y(t) represents the system output.

[0042] Furthermore, the state-space model is discretized, and the discretization parameters satisfy:

[0043] ;

[0044] ;

[0045] in, and Let represent the discrete state transition matrix and the discrete input matrix, Δ represent the step size, and I represent the identity matrix;

[0046] The discretized state-space model calculates the feature sequence using linear recursion or global convolution. The structured convolution kernel is represented as follows: ;

[0047] The input sequence is then convolved using the structured convolution kernel.

[0048] Furthermore, the backbone network of the YOLOv8 target detection network includes a C2f module and a fast spatial pyramid pooling (SPPF) module. The neck network uses a path aggregation network and a feature pyramid network to fuse multi-scale features and outputs three detection feature maps for detecting small, medium, and large targets, respectively.

[0049] The decoupled detection head includes independent classification and regression branches. The classification branch is used to output the classification results of each target category, and the regression branch is used to output the center coordinates and dimensions of the target bounding box.

[0050] Furthermore, it also includes:

[0051] Establish a power grid anomaly dataset, which includes six types of targets: cable damage, insulator breakage, normal cables, normal insulators, towers, and foreign object obstruction.

[0052] The power grid anomaly dataset is divided into training, testing, and validation sets.

[0053] The frequency-domain enhanced Mamba-YOLOv8 target detection network is trained using the training set, and the parameters of the target detection network are adjusted according to the difference between the prediction results and the true annotations.

[0054] The test image is input into the trained frequency-domain augmented Mamba-YOLOv8 target detection network, which outputs the category information, confidence score, and bounding box location information of the power inspection target in the test image.

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

[0056] 1. This invention enhances the features in the frequency domain before the Mamba module, so that the subsequent global context modeling can utilize the detailed information after spectrum modulation. This helps to take into account both the overall structure of the power transmission and transformation components and local abnormal features such as broken cable strands and insulator defects, and improves the target recognition and localization effect in complex backgrounds.

[0057] 2. This invention employs a dual-branch system with independent learnable complex-valued filters, enabling the two branches to learn different spectral responses. It can adaptively modulate the features of a single inspection image without requiring additional input of other modal images or paired normal and abnormal images.

[0058] 3. This invention performs an inverse transform after spectral modulation to extract the real part and connect the spatial residuals, combining the frequency domain modulation result with the original input features. This preserves the original spatial information for subsequent processing and helps to maintain the expression of the component structure while enhancing local details.

[0059] 4. This invention employs independent channel-level learnable weights to fuse amplitude and phase separately, providing the ability to adjust spectral energy information and spatial structure information separately, and generates enhanced features through complex spectrum reconstruction, which helps to improve the feature representation of damaged edges and foreign object occlusion boundaries.

[0060] 5. This invention combines frequency domain enhancement, Mamba sequence modeling, and YOLOv8 multi-scale feature fusion and decoupled detection, taking into account the semantic and location information of targets of different sizes, and providing support for the automatic detection of power component damage and foreign object obstruction. Attached Figure Description

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

[0062] Figure 1 A flowchart illustrating a power line inspection image target detection method based on frequency domain enhanced Mamba-Yolov8, provided in an embodiment of the present invention;

[0063] Figure 2 This is a schematic diagram of the foreign object occlusion target detection results of five models in one embodiment of the present invention;

[0064] Figure 3 This is a schematic diagram of the damage detection results of five different insulator models in one embodiment of the present invention;

[0065] Figure 4 This is a schematic diagram of the cable damage detection results of five models in one embodiment of the present invention; Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] Example 1: A target detection method for power line inspection images based on frequency domain enhanced Mamba-Yolov8.

[0068] Please see Figure 1 The diagram illustrates a flowchart of a power line inspection image target detection method based on frequency domain enhanced Mamba-Yolov8, as described in this application.

[0069] In one embodiment, step S1 is performed to obtain power inspection images, which include cables, insulators, towers, and objects obstructing the view.

[0070] Power line inspection images are acquired using drones, inspection robots, or fixed image acquisition equipment. These images can be visible light images or images of transmission lines or substation equipment obtained through image acquisition equipment.

[0071] In this embodiment, the size of the power inspection images is uniformly adjusted to 640×640 pixels, and the targets in the images are labeled with target categories and bounding boxes. Target categories include: damaged cables, damaged insulators, normal cables, normal insulators, power poles, and foreign object obstructions.

[0072] The power grid anomaly dataset established in this embodiment includes 1910 images, which are divided into training set, test set and validation set in a ratio of 8:1:1.

[0073] The training set is used to train the parameters of the object detection network, the validation set is used to determine the network parameters and detection thresholds during the training process, and the test set is used to evaluate the detection performance of the object detection network after training.

[0074] For each image, a rectangular bounding box is labeled with the target. The rectangular bounding box includes the center coordinates, width, and height of the target, and the target category is used as the category label of the corresponding bounding box.

[0075] Step S2 is executed, in which the power inspection image is input into the YOLOv8 target detection network, which includes a backbone network, a neck network, and a decoupled detection head.

[0076] YOLOv8 is used as the basic structure of the object detection network. The YOLOv8 object detection network includes a backbone network, a neck network, and a decoupled detection head.

[0077] The backbone network is used to extract features from the input power inspection images, the neck network is used to fuse features at different scales, and the decoupled detection head is used to perform target classification and bounding box regression respectively.

[0078] The detection process in YOLOv8 can be represented as a mapping from the input image to predicted bounding boxes with class labels:

[0079] ;

[0080] Where X represents the input image, and θ represents the network parameters of the object detection network. This represents the i-th predicted bounding box. represents the category score corresponding to the i-th predicted bounding box, and N represents the number of predicted bounding boxes.

[0081] The backbone network includes multiple C2f modules and a fast spatial pyramid pooling (SPPF) module. The C2f modules are used to implement feature reuse and gradient information transfer, while the SPPF module is used to obtain multi-scale contextual features with a large receptive field without significantly increasing computational cost.

[0082] The neck network employs a path aggregation network and a feature pyramid network to perform top-down and bottom-up feature fusion on the different scale features output by the backbone network, and outputs three detection feature maps for detecting small, medium and large targets, respectively.

[0083] The decoupled detection head includes independent classification and regression branches. The classification branch outputs the predicted target category, while the regression branch outputs the center position and size of the target bounding box.

[0084] In step S3, a portion of the convolutional backbone in the backbone network is replaced with Mamba modules, and a frequency domain feature enhancement module is set before the Mamba modules.

[0085] To enhance YOLOv8's ability to extract high-frequency details such as fine cracks, broken strands, insulator edge defects, and foreign object obstructions in power line inspection images, some convolutional backbones in the YOLOv8 network were replaced with Mamba modules, and a frequency domain feature enhancement module was set before the Mamba modules.

[0086] The frequency domain feature enhancement module includes a FourierBlock and a dual-branch spectral modulation structure.

[0087] In this embodiment, the frequency domain feature enhancement module receives an input feature map X, which is represented as:

[0088] ;

[0089] Where B is the batch size, C is the number of feature channels, and H and W are the height and width of the feature map, respectively.

[0090] The frequency domain feature enhancement module receives two feature maps X1 and X2. In this embodiment, the two feature maps originate from the same input feature map, so they are set as follows: X1=X2=X;

[0091] By using the same input feature map to construct two spectral modulation branches, this module can complete spectral modulation without relying on external modes or normal-abnormal image pairs, even with a single power inspection image input.

[0092] In step S4, the frequency domain feature enhancement module is used to perform bi-branch spectral modulation on the input feature map to obtain frequency enhancement features.

[0093] For the m-th branch of the two branches, perform a two-dimensional discrete Fourier transform: ;

[0094] Where m∈{1,2}, F m F represents the spectral characteristics corresponding to the m-th branch. 2D This represents the two-dimensional discrete Fourier transform.

[0095] By using two-dimensional discrete Fourier transform, the spatial texture, edge and structural information in the input feature map is mapped to the frequency domain, so that fine cracks, broken strands, burrs and boundary changes between foreign objects and the background are expressed as changes in the corresponding frequency components.

[0096] Set up learnable complex-valued filters in both branches: W L,m ∈C C×H×W ;

[0097] Among them, W L,1 and W L,2 They are independent of each other. The spectrum of the corresponding branch is modulated element-wise using a learnable complex-valued filter: ;

[0098] Where ⊙ represents the Hadamarda product, This represents the spectrum after frequency domain modulation.

[0099] By training the learnable complex-valued filter, different branches can adaptively modulate different frequency components. One branch enhances detail frequencies associated with broken edges, cracks, and burrs, while another branch enhances frequency components associated with the overall structure of the component, background contrast, and areas obscured by foreign objects.

[0100] Perform an inverse Fourier transform on the modulated spectrum and then connect it to the input feature map of the corresponding branch using spatial residuals:

[0101] ;

[0102] in, Re[] denotes the inverse Fourier transform, and Re[] denotes taking the real part. This represents the feature map of the m-th branch after frequency domain modulation and spatial residual connection.

[0103] By using spatial residual connections, the original spatial morphology of the input feature map is preserved while enhancing the target-related frequency components, thus reducing the loss of spatial positioning information caused by frequency domain processing.

[0104] After completing the spatial residual connection described above, perform a two-dimensional discrete Fourier transform on the feature maps of the two branches again: ;in, This represents the enhanced spectrum of the m-th branch.

[0105] In this embodiment, the real part of the learnable complex-valued filter is sampled using a Xavier uniform initialization distribution, while the imaginary part is initialized to zero. The learnable complex-valued filter is dynamically created during the first forward pass based on the spatial resolution of the input feature map.

[0106] Step S5 is executed to flatten the frequency enhancement features into a feature sequence and input it into the Mamba module for sequence modeling to obtain features with global context information.

[0107] Since target detection requires not only identifying feature intensity but also accurately locating damaged boundaries and foreign object occlusion boundaries, the amplitude and phase information of the two branches of the enhanced spectrum are processed separately.

[0108] The amplitude and phase of the enhanced spectrum of the m-th branch are extracted respectively: ; ;

[0109] Among them, A m Let P represent the amplitude spectrum of the m-th branch. m Let represent the phase spectrum of the m-th branch, || represent the complex amplitude, and ∠ represent the complex phase.

[0110] Amplitude information is used to characterize the energy distribution in different frequency components, while phase information is used to characterize the geometric layout of edges, textures, and spatial structures.

[0111] Amplitude fusion weights and phase fusion weights are set separately. The amplitude fusion weights include α1 and α2, which are learnable amplitude weights, and the phase fusion weights include β1 and β2, which are set according to the channel.

[0112] The amplitude spectra of the two branches are fused according to the following formula: A fused =α1A1+α2A2;

[0113] The phase spectra of the two branches are fused according to the following formula: P fused =β1P1+β2P2;

[0114] Among them, α1 and α2 are learnable amplitude weights used to control the energy information fusion ratio of the two branches; β1 and β2 are learnable phase weights used to control the focus of structural information fusion of the two branches.

[0115] By employing different amplitude and phase weights, the network can adjust spectral energy information and spatial structure information separately, thereby enhancing the details of damage while reducing structural interference that may be caused by simple spectral superposition.

[0116] Reconstruct the fused complex spectrum from the fused amplitude and phase spectra: ;

[0117] Where j is the imaginary unit, F fused This is the fused complex spectrum.

[0118] Performing an inverse Fourier transform on the fused complex spectrum yields the frequency enhancement features: ;

[0119] Among them, X out This indicates a frequency enhancement feature.

[0120] Frequency enhancement feature X out Based on the spatial location flattening as the characteristic sequence: X seq ∈R B×L×C Where L=HW, and L represents the length of the feature sequence.

[0121] The feature sequence is input into the Mamba module, and the feature sequence is sequence modeled using a state-space model to obtain the long-range dependencies between different spatial locations of the input image.

[0122] The state-space model used by the Mamba module includes state representation equations and prediction output equations:

[0123] ;

[0124] ;

[0125] in, , and These represent the state transition matrix, input matrix, and output matrix, respectively. Represents the state vector at time t; y(t) represents the input vector at time t; y(t) represents the output vector of the system.

[0126] To accommodate the discretized feature sequences, the continuous state-space model is discretized, and the discretization parameters satisfy:

[0127] ;

[0128] ;

[0129] in, and Let represent the discretized state transition matrix and input matrix, respectively, where Δ represents the step size and I represents the identity matrix.

[0130] After discretization, the state-space model-based network computes the input feature sequence through linear recursion or global convolution. The structured convolution kernel is represented as: ;

[0131] The structured convolutional kernel is used to calculate the feature sequence, resulting in the global features output by the Mamba module.

[0132] Compared to global modeling based on self-attention mechanisms, the Mamba module processes feature sequences through selective scanning, thereby obtaining long-range dependency information while reducing the computational cost of high-resolution feature processing.

[0133] Perform step S6. The neck network fuses features at different scales, and the fused features are input into the decoupled detection head to output the target category information and bounding box location information in the power line inspection image.

[0134] The features output by the Mamba module are restored to a two-dimensional feature map and then fed into the YOLOv8 neck network.

[0135] The neck network fuses backbone features at different scales. Specifically, the neck network upsamples high-level semantic features and concatenates or fuses the upsampled features with low-level detail features; subsequently, the neck network transmits low-level localization information to high-level features to obtain multi-scale detection features.

[0136] The neck network outputs three detection feature maps, which are used to detect small, medium, and large targets, respectively. The small target detection feature map is used to detect fine cracks, broken strands, insulator defects, and small foreign objects, while the medium and large target detection feature maps are used to detect cables, insulators, towers, and larger foreign objects obstructing the view.

[0137] The three detection feature maps are input into the decoupled detection head. The classification and regression branches of the decoupled detection head are independent of each other.

[0138] The classification branch outputs the predicted score for each target category;

[0139] The regression branch outputs the center coordinates, width, and height of the target bounding box.

[0140] For each detection location, the regression branch outputs the target bounding box parameters, and the classification branch outputs the category scores for six target classes. Based on the classification scores, bounding box locations, and preset detection thresholds, the final target detection result is obtained.

[0141] The target detection results include: the target category, the location of the target bounding box, and the target detection confidence level.

[0142] The power line inspection images in the training set are input into the frequency domain augmented Mamba-YOLOv8 target detection network, which then passes through the YOLOv8 backbone network, the frequency domain feature enhancement module, the Mamba module, the neck network, and the decoupled detection head to obtain the predicted category and the predicted bounding box.

[0143] The predicted categories and predicted bounding boxes are compared with the true category labels and true bounding boxes in the training set, and the network parameters of the object detection network are adjusted according to the difference between the prediction results and the true labels.

[0144] During training, the learnable complex-valued filter, amplitude fusion weight, and phase fusion weight in the frequency domain feature enhancement module are updated synchronously, enabling the learnable complex-valued filter to learn the corresponding spectrum modulation mode based on the target features in the power line inspection images.

[0145] Training stops when the training loss reaches the convergence condition or when the preset number of training epochs is reached, resulting in the trained frequency-domain augmented Mamba-YOLOv8 object detection network.

[0146] The power line inspection images to be detected are input into the trained frequency domain augmented Mamba-YOLOv8 target detection network.

[0147] First, multi-scale features of the image to be detected are extracted using the YOLOv8 backbone network. Then, the features output from part of the convolutional backbone are input into the frequency domain feature enhancement module, and frequency-enhanced features are obtained through dual-branch complex-valued filtering, amplitude and phase fusion, and inverse Fourier transform. The frequency-enhanced features are then flattened into a feature sequence and input into the Mamba module to obtain features with global context information. Finally, the target category, target bounding box, and detection confidence are output through the YOLOv8 neck network and decoupled detection head.

[0148] Through the above processing, while using the Mamba module to obtain the overall structure and long-distance context of the power transmission and transformation components, the frequency domain feature enhancement module can be used to highlight high-frequency details such as broken cable strands, insulator edge defects, fine cracks, and foreign object obstruction boundaries, thereby reducing false detections and missed detections in complex backgrounds.

[0149] Example 2: Detection performance verification.

[0150] To verify the detection effect of the method of the present invention, the power grid anomaly dataset established in Example 1 was used for testing, and the frequency domain enhanced Mamba-YOLOv8 model of the present invention was compared with Faster R-CNN, SSD, YOLOv8 and MambaAD models respectively.

[0151] All models were trained and tested on the same training, validation, and test sets. Test categories included normal cables, damaged cables, normal insulators, broken insulators, towers, and foreign object obstructions.

[0152] The AP test results for each model in each category are shown in Table 1.

[0153] Table 1: AP test results (%) of the 5 models for each category of targets

[0154] Model normal cable cable damage Normal insulator Insulator damage tower Foreign object obstruction Faster R-CNN 88.65 89.24 89.71 87.51 87.19 88.47 SSD 91.49 90.42 89.81 91.67 90.89 90.83 YOLOv8 95.99 94.85 95.37 95.64 96.29 95.18 MambaAD 96.84 95.61 96.07 96.17 96.42 94.59 Frequency domain enhancement Mamba-YOLOv8 97.87 97.89 96.31 96.88 96.61 95.35

[0155] Table 1 compares the AP test results of the five models for each category of targets. The Faster R-CNN and SSD models generally have lower AP values ​​for each category. YOLOv8 shows significant improvement over the other two, but compared to the frequency-enhanced Mamba-YOLOv8, its accuracy in all categories still lags behind. The accuracy gap is largest for the cable damage category, reaching 3.04%. MambaAD's accuracy in each category is smallest compared to the frequency-enhanced Mamba-YOLOv8, with the tower category lagging behind by only 0.19%. Furthermore, the AP of the insulator damage and normal cable categories detected by the model of this invention is improved by 0.71% and 1.03% respectively compared to MambaAD. Foreign object obstruction can occur in any form; the core challenge lies in the blurred boundaries. The boundary between the obstructing and the obscured object often presents a high-frequency signal with extremely high contrast in the frequency domain. Faster R-CNN (88.47%) and SSD (90.83%) are limited by their local receptive field and candidate box design, resulting in limited shallow feature extraction capabilities and insufficient adaptability to complex backgrounds and large-scale changes in power grid images, making it difficult to accurately define occlusion boundaries. MambaAD (94.59%) effectively improves the detection accuracy of this category by relying on its global modeling capabilities, but its shortcomings in the frequency domain lead to a lack of explicit frequency domain modeling capabilities, easily losing sharpness when processing "high-frequency edges," resulting in inaccurate segmentation. YOLOv8 (95.18%) shows some improvement through multi-scale detection heads and enhanced feature fusion, but its CNN backbone cannot effectively model the global spatial relationship between occluders and power transmission and transformation components. Frequency domain enhanced Mamba-YOLOv8 (95.35%) utilizes Mamba's global modeling capabilities and frequency domain enhancement to capture high-frequency edges, better segmenting the feature differences between occluders and the component itself, verifying the effectiveness of frequency domain enhanced Mamba in compensating for the shortcomings of CNNs, enhancing global perception, and capturing high-frequency details.

[0156] The F1 test results for each model in each category are shown in Table 2:

[0157] Table 2: F1 Test Results of 5 Models for Each Category of Objectives

[0158] Model normal cable cable damage Normal insulator Insulator damage tower Foreign object obstruction Faster R-CNN 0.625 0.629 0.632 0.617 0.615 0.624 SSD 0.684 0.676 0.672 0.68. 0.680 0.679 YOLOv8 0.947 0.945 0.912 0.936 0.959 0.907 MambaAD 0.966 0.941 0.940 0.946 0.948 0.929 Frequency domain enhancement Mamba-YOLOv8 0.979 0.979 0.963 0.969 0.966 0.954

[0159] Table 2 compares the F1 scores of the five models for each category of targets. Faster R-CNN and SSD performed poorly, with F1 scores below 70% for each category. The fundamental reason is that both rely on the local receptive field of CNNs for feature extraction, lacking the ability to model the global structure of power transmission and transformation components, failing to effectively distinguish between damage and background, and lacking contextual information, leading to severe missed detections of small targets. YOLOv8 showed a significant improvement, thanks to its CSP structure, PANet multi-scale fusion, and more reasonable anchor box design, achieving F1 scores above 90% for each category. However, YOLOv8 is still based on CNNs, with a limited receptive field, and still suffers from some missed and false detections. MambaAD generally outperformed YOLOv8, especially showing significant improvement in foreign object occlusion and normal insulator categories, but performance declined in cable damage and tower categories. This is mainly due to the "implicit smoothing effect" of Mamba's sequential scanning, causing it to ignore crucial information such as complex and subtle textures and sharp structural edges. Frequency domain augmented Mamba-YOLOv8 performed best, with F1 scores exceeding 95%. Its core improvement is the introduction of the frequency domain enhancement Mamba module in YOLOv8. This module achieves global spatial scanning with linear complexity, making up for the deficiency of the receptive field of CNN. At the same time, the frequency domain enhancement mechanism explicitly separates high-frequency details from low-frequency background, avoiding the loss of key information.

[0160] To visually verify the effectiveness of the method of this invention in enhancing high-frequency detail feature extraction and improving target detection accuracy, a selection of images were used for qualitative comparison. For example... Figure 2 The results for each model in detecting objects occluded by foreign objects are shown. Figure 2 It can be seen that Faster R-CNN has the lowest confidence level when faced with extremely small occlusions and complex interference, all below 90%. The confidence levels of SSD and YOLOv8 are also lower than those of frequency-domain augmented Mamba-YOLOv8. This indicates that CNN-based object detection methods cannot effectively distinguish between occlusions and the background, and cannot effectively model contextual information. MambaAD, through global dependency modeling, better understands the overall structure and has an advantage over CNN in handling "arbitrary occlusions." Meanwhile, frequency-domain augmented Mamba-YOLOv8, through high-frequency enhancement, accurately captures sharp high-frequency edges such as those between foreign objects and the sky, cable junctions, etc., thus extracting detailed features more accurately in complex backgrounds and reducing false detections.

[0161] Figure 3The results of five models for detecting insulator damage are presented. Insulator damage manifests as small defects or missing parts at the edges, and such targets require high levels of high-frequency detail and background suppression. SSD and Faster R-CNN both produced false detections, misidentifying normal transmission and transformation components as insulator damage, with correct insulator damage confidence levels all below 70%. YOLOv8's detection bounding box on the right side of the insulator string is more compact, achieving a maximum confidence level of 83%. However, there is a box at the bottom with a confidence level of only 28%, indicating insufficient confidence when dealing with the smallest defects. Relying on Mamba's powerful global modeling capabilities, MambaAD accurately and with high confidence in locating the overall structure of the insulator. However, Mamba's sequential scanning has a smoothing effect, which smooths out high-frequency features when dealing with small "jagged" defects at the insulator edges. The frequency-domain enhanced Mamba-YOLOv8 detection bounding box on the right side is the best fit among all models, with extremely high and very stable confidence levels. This is thanks to the frequency-enhanced Mamba, which can more accurately focus on small targets in dark backgrounds, thus avoiding false detections and significantly improving the accuracy of local detail recognition.

[0162] Figure 4 The results of five models for detecting cable damage are presented. Damaged cable areas are typically long and narrow with subtle texture variations. Faster R-CNN performed the worst, with a confidence level of only 47%. Its bounding boxes were extremely large and blurry; while they roughly enclosed the damaged area, the localization was extremely inaccurate. This indicates that the two-stage network lacks sufficient feature saliency when extracting low-contrast features, leading to a lack of confidence in the classifier. SSD showed significant false positives, with a confidence level of only 60%. This suggests that SSD, lacking integration of global context, cannot distinguish the scattered cable texture from the background, resulting in multiple local responses in the feature map. YOLOv8 improved its confidence level to 75%, but its bounding boxes showed severe redundancy, almost completely enclosing the right side of the image. This indicates that while YOLOv8 outperformed the other two in feature extraction, it failed to accurately fit the long, thin cable body in the face of complex background interference. MambaAD, with its global modeling capabilities, more accurately enclosed the main structure than YOLOv8. However, limited by Mamba's frequency domain limitations, its confidence level remained below 80%. The frequency-domain enhanced Mamba-YOLOv8 maintained a confidence level of 82%, and the detection box accurately wrapped around the stranded cable, with no redundant background and no duplicate false positives. It overcomes the limitation of Mamba, which can only see "smooth blocks" and cannot see small high-frequency debris. Even if the cable and the background color are very similar, the model can accurately separate it from the cluttered wall by understanding the structure of the whole image.

[0163] Therefore, the frequency-domain enhanced Mamba-YOLOv8 target detection network in this embodiment can enhance local high-frequency details while preserving overall structural information, and can be used for target detection of damaged power grid transmission and transformation components and foreign object obstruction.

[0164] 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A target detection method for power line inspection images based on frequency domain enhanced Mamba-Yolov8, characterized in that, Includes the following steps: S1. Obtain power inspection images, which include cables, insulators, towers, and objects obstructing the view. S2. Input the power inspection image into the YOLOv8 target detection network, which includes a backbone network, a neck network, and a decoupled detection head. S3. In the backbone network, a portion of the convolutional backbone is replaced with Mamba modules, and a frequency domain feature enhancement module is set before the Mamba modules; S4. The frequency domain feature enhancement module is used to perform bi-branch spectrum modulation on the input feature map to obtain frequency enhancement features; S5. Flatten the frequency enhancement features into a feature sequence and input it into the Mamba module for sequence modeling to obtain features with global context information; S6. The neck network is used to fuse features of different scales, and the fused features are input into the decoupled detection head to output the category information and bounding box position information of the target in the power inspection image. The dual-branch spectrum modulation includes: performing two-dimensional discrete Fourier transforms on the same input feature map for two branches respectively; using two independent learnable complex-valued filters to modulate the spectrum of the two branches element by element; extracting the amplitude and phase of the two modulated branches respectively; and weighting and fusing the amplitude and phase of the two branches respectively to reconstruct the frequency enhancement feature.

2. The target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8 as described in claim 1, characterized in that, The frequency domain feature enhancement module receives two feature maps X1 and X2, and sets them as follows: X1=X2=X; in, B is the batch size, C is the number of channels, and H and W are the height and width of the spatial feature map, respectively. Perform a two-dimensional discrete Fourier transform on the m-th branch: ; Where m∈{1,2}, F m Let be the spectral characteristics of the m-th branch.

3. The target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8 according to claim 2, characterized in that, The frequency domain feature enhancement module uses a learnable complex-valued filter to modulate the spectrum of each branch element by element, specifically including: ; Where ⊙ represents the Hadama product, W L,m ∈C C×H×W Let W be the learnable complex-valued filter for the m-th branch, and the learnable complex-valued filter for the two branches. L,1 and W L,2 Independent of each other; W L,1 Perform an inverse Fourier transform on the modulated spectrum and then connect it to the corresponding input feature map using spatial residual concatenation: ; Where Re[] denotes taking the real part, X FS,m This represents the feature map of the m-th branch after frequency domain modulation and spatial residual connection.

4. The target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8 according to claim 3, characterized in that, After obtaining the X FS,m Then, regarding X FS,m Perform a second two-dimensional discrete Fourier transform to obtain the enhanced spectrum: ; The amplitude and phase of the enhanced spectrum are extracted respectively: ; ; Among them, A m Let P represent the amplitude spectrum of the m-th branch. m This represents the phase spectrum of the m-th branch.

5. The power line inspection image target detection method based on frequency domain enhanced Mamba-Yolov8 according to claim 4, characterized in that, The amplitude and phase spectra of the two branches are fused separately, specifically including: A fused =α1A1+α2A2; P fused =β1P1+β2P2; Wherein, α1 and α2 are learnable amplitude weights, which are used to control the fusion ratio of energy information in the two branches respectively; β1 and β2 are learnable phase weights, which are used to modulate the fusion focus of structural information in the two branches respectively; the amplitude weights and phase weights are set according to the channels respectively.

6. The target detection method for power line inspection images based on frequency domain enhanced Mamba-Yolov8 according to claim 5, characterized in that, The fused complex spectrum is reconstructed based on the fused amplitude and phase spectra, and the frequency enhancement features are obtained through inverse Fourier transform. ; ; Where j is the imaginary unit, F fused For the fused complex spectrum, X out This refers to the frequency enhancement feature; Flatten the frequency enhancement features into a feature sequence: Where L = HW; The feature sequence is then input into a standard Mamba module.

7. The target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8 according to claim 1, characterized in that, The Mamba module performs sequence modeling on the feature sequence based on a state-space model, which includes a state representation equation and a prediction output equation: ; ; in, , and These represent the state transition matrix, input matrix, and output matrix, respectively. Represents the state vector at time t; y(t) represents the input at time t; y(t) represents the system output.

8. The power line inspection image target detection method based on frequency domain enhanced Mamba-Yolov8 according to claim 7, characterized in that, The state-space model is discretized, and the discretization parameters satisfy: ; ; in, and Let represent the discrete state transition matrix and the discrete input matrix, Δ represent the step size, and I represent the identity matrix; The discretized state-space model calculates the feature sequence using linear recursion or global convolution. The structured convolution kernel is represented as follows: ; The input sequence is then convolved using the structured convolution kernel.

9. The target detection method for power line inspection images based on frequency domain enhancement Mamba-Yolov8 according to claim 1, characterized in that, The backbone network of the YOLOv8 target detection network includes a C2f module and a fast spatial pyramid pooling (SPPF) module. The neck network uses a path aggregation network and a feature pyramid network to fuse multi-scale features and outputs three detection feature maps for detecting small, medium and large targets, respectively. The decoupled detection head includes independent classification and regression branches. The classification branch is used to output the classification results of each target category, and the regression branch is used to output the center coordinates and dimensions of the target bounding box.

10. The target detection method for power line inspection images based on frequency domain enhanced Mamba-Yolov8 according to claim 1, characterized in that, Also includes: Establish a power grid anomaly dataset, which includes six types of targets: cable damage, insulator breakage, normal cables, normal insulators, towers, and foreign object obstruction. The power grid anomaly dataset is divided into training, testing, and validation sets. The frequency-domain enhanced Mamba-YOLOv8 target detection network is trained using the training set, and the parameters of the target detection network are adjusted according to the difference between the prediction results and the true annotations. The test image is input into the trained frequency-domain augmented Mamba-YOLOv8 target detection network, which outputs the category information, confidence score, and bounding box location information of the power inspection target in the test image.