MAMBA-yolo-based power grid infrastructure target detection method, device and medium
By combining State Space Models and the YOLO model, the MAMBA-YOLO method optimizes the feature extraction and detection process, solving the detection challenges of small targets and complex backgrounds in power grid infrastructure scenarios, and achieving efficient and real-time target detection.
Patent Information
- Application Number
- CN202510486185.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-04-17
AI Technical Summary
Existing target detection algorithms struggle to effectively handle small and low-contrast targets in complex environments, especially in power grid infrastructure scenarios. They suffer from high computational complexity and cannot meet the demands for efficient real-time detection.
The MAMBA-YOLO method is adopted, which combines State Space Models (SSM) and the YOLO model. Through the backbone feature extraction network, neck path aggregation network and head detection network, the feature extraction and detection process is optimized by utilizing local spatial blocks, bidirectional fusion strategies and decoupled head structure.
It improves the detection accuracy of small targets and the detection capability under complex backgrounds, reduces computational complexity, and realizes real-time and efficient power grid infrastructure target detection.
Smart Images

Figure CN120374953B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of target detection, and in particular to a power grid infrastructure target detection method and device based on MAMBA-YOLO and a storage medium. BACKGROUND
[0002] With the continuous advancement of smart grid construction, the scale of power infrastructure is rapidly expanding, and the number and complexity of infrastructure such as transmission lines and substation equipment are increasing year by year. However, the operating environment of power grid infrastructure is complex and variable, often facing harsh conditions such as high altitude, remote areas, and large-span lines, which brings great challenges to daily inspection and fault troubleshooting. Traditional manual inspection methods not only have high costs and low efficiency, but also may have safety hazards in complex or dangerous environments. In addition, with the expansion of the scale of power grid operation, the amount of data also grows exponentially, and traditional monitoring methods cannot meet the demand for efficient processing.
[0003] In recent years, target detection technology based on computer vision has been gradually applied to the field of power grid infrastructure, realizing partial automation of inspection. However, existing target detection algorithms still have significant shortcomings in dealing with the complexity of power grid scenarios. For example, power grid infrastructure scenarios often involve significant differences in target size, dense small targets, complex backgrounds, and other problems, which pose higher requirements for the robustness of detection algorithms. The YOLO series, as a representative of target detection methods, is widely concerned in engineering applications due to its real-time and efficient performance. However, the traditional YOLO model has a large amount of calculation when processing high-resolution images, and the detection effect of small targets and low-contrast targets in complex scenarios is not ideal. In addition, with the introduction of Transformer technology, although the global modeling capability has been improved, the increase in computational complexity limits its practical application in resource-limited scenarios.
[0004] Under this background, new visual models based on State Space Models (SSM) have gradually attracted attention. SSM has linear computational complexity and long sequence modeling capability, and has shown good application prospects in image classification and target detection fields. However, how to combine SSM technology with existing target detection frameworks to fully utilize its modeling capability for complex scenarios while retaining the characteristics of efficient and real-time detection is still a key difficulty and research hotspot in current technology development. Therefore, there is an urgent need for an innovative method to organically combine SSM with YOLO model to address the challenges of target detection in power grid infrastructure scenarios. SUMMARY
[0005] The main purpose of the present application is to provide a power grid infrastructure target detection method based on MAMBA-YOLO, to solve the technical problems proposed in the background art, the present application optimizes the YOLO model by using State Space Models (SSM) technology, combines the advantages of Mamba architecture, maintains efficient computing power, and improves detection accuracy, especially in complex power grid scene target detection tasks.
[0006] The present application solves the above technical problems by adopting the following technical solutions:
[0007] A power grid infrastructure target detection method based on MAMBA-YOLO, the following steps are executed by a computer device:
[0008] The pre-processed power grid infrastructure image is input into the pre-constructed Mamba-YOLO target detection model to detect the position and type of defects in the power grid infrastructure image;
[0009] The Mamba-YOLO target detection model includes a backbone feature extraction network, a neck path aggregation network, and a head detection network.
[0010] The pre-processed power grid infrastructure image first enters the optimized deep state space block in the backbone feature extraction network for layer-by-layer feature extraction to obtain a multi-scale feature map.
[0011] The optimized deep state space block includes a local space block, a two-dimensional selective scanning module, and a residual gate control block, the multi-scale feature map is input into the neck path aggregation network for bidirectional fusion, and the fused feature map is further input into the head detection network for target detection tasks.
[0012] Further, the processing steps of the local space block are as follows,
[0013] For a given input feature First, it undergoes a depth separable convolution, which operates on each input channel individually without mixing channel information;
[0014] Then batch normalization is performed to reduce overfitting while providing regularization effects, and the intermediate state is defined as:
[0015] In the formula, is a three-dimensional real array input, is an intermediate state, is a three-dimensional real array, C is the number of channels, H is the height, W is the width, and BN represents batch normalization, is a depth separable convolution, and the convolution kernel size is 3x3.
[0016] Finally, the original input and the processed features are fused through residual concatenation;
[0017] Allows the model to understand and integrate features from different dimensions in an image;
[0018] ⊕
[0019] in For output features, Φ represents the activation function, and ⊕ represents the residual connection. It is a depthwise separable convolution with a kernel size of 1×1.
[0020] Furthermore, the two-dimensional selective scanning module processes the data as follows:
[0021] By implementing a multi-directional scanning strategy, including horizontal, vertical, and diagonal scanning, the global contextual information contained in the input feature map is fully mined. This scanned and expanded feature information is then fed into a two-dimensional selective scanning module, which uses a merging strategy, i.e., an attention mechanism, to effectively fuse feature information from different directions, forming a comprehensive and rich global feature representation, providing the model with a more comprehensive basis for decision-making.
[0022] Furthermore, the residual gate control block combines the advantages of gating mechanism and deep convolution residual structure. Through nonlinear activation, pointwise convolution is used to achieve deep fusion of features between channels and the gating function dynamically adjusts feature weights according to feature context, thereby achieving focus on key target features and suppression of background noise.
[0023] Remaining gate control block from input Create two branches and And a fully connected layer is implemented on each branch using a 1×1 convolution;
[0024] ,
[0025] Depthwise separable convolution is used as The location encoding module on the branch, through residual concatenation, more effectively backflows gradients during training and significantly improves performance by preserving and utilizing the spatial structure information of the image;
[0026] The remaining gate control block uses a nonlinear GeLU as the activation function to control the information flow at each level, and then uses element-wise multiplication and... One branch is merged, then refined with global features through 1x1 convolution to mix channel information, and finally concatenated with the original input through residual concatenation. Add the features from the hidden layer;
[0027] The remaining gate control blocks capture more global features, resulting in output features. Defined as:
[0028]
[0029] in Φ represents element-wise multiplication, and Φ represents the nonlinear GeLU activation function. The gating mechanism in the RG block preserves spatial information by integrating convolution operations, while making the model more sensitive to fine-grained features in the image.
[0030] Furthermore, the neck path aggregation network module processes multi-scale features and improves the model's ability to detect targets of different sizes. This module consists of a feature pyramid network layer (FPN) and a bidirectional fusion strategy.
[0031] The Feature Pyramid Network (FPN) layer performs layer-by-layer upsampling on multi-scale feature maps to construct a rich feature pyramid structure. The FPN layer receives feature maps from different levels of the backbone feature extraction network as input, and these feature maps have different scales and semantic information.
[0032] Upsampling operation: For each input feature map, the Feature Pyramid Network (FPN) layer uses an upsampling method to gradually increase its spatial resolution, making it consistent with the higher resolution feature map in scale;
[0033] Feature backpropagation and reinforcement learning: The upsampled result is processed in two parts; one part of the feature map is backpropagated to the preceding feature extraction module of the backbone feature extraction network; by fusing or recalculating the upsampled feature map with the input features of the preceding feature extraction module, the model can better capture the correlation information between multi-scale features, further enrich the semantic content of the feature representation, and improve the model's ability to perceive targets at different scales.
[0034] The other part of the upsampled feature map is fed into the subsequent module of the neck path aggregation network, namely the bidirectional fusion strategy module, for deeper feature fusion and optimization.
[0035] Furthermore, the bidirectional fusion strategy is another key component of the neck path aggregation network module. It further enhances the expressive power of features through bidirectional fusion operations between the upsampled feature map and the original input feature map to meet the needs of multi-scale target detection.
[0036] Fusion of upsampled feature map with original input feature map: In the bidirectional fusion strategy, the upsampled feature map and the original input feature map are first fused bidirectionally.
[0037] Through fusion operations, the model can combine the high-level semantic information contained in the upsampled feature map with the low-level detail information in the original input feature map to obtain a more representative fused feature map.
[0038] Downsampling module: The downsampling module further processes the fused feature map. Through downsampling, it adjusts the spatial resolution of the feature map to adapt to the detection requirements of targets at different scales.
[0039] Furthermore, the head detection network is designed with a decoupled head structure, including a classification head and a detection head;
[0040] The classification head classifies each feature map using global average pooling (GAP), outputting the probability distribution of each class, reducing feature dimensionality and improving classification efficiency.
[0041] The detection head includes a series of convolutional and deconvolutional layers to generate bounding box regression values and target confidence for each anchor box, and employs pointwise convolution and nonlinear activation to improve regression accuracy.
[0042] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0043] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0044] As described above, this invention discloses a power grid infrastructure target detection method based on Mamba-YOLO. This method combines the Mamba architecture and YOLO target detection technology, and solves the bottleneck problems of target detection accuracy and computational efficiency in power grid infrastructure images by introducing a State Space Model (SSM) to optimize the YOLO model. The method first extracts feature maps of different levels from the input data through a feature extraction module, and then uses a neck path aggregation network for feature fusion. The fused feature maps are then fed into a target localization and classification module for object classification and bounding box regression. This method can efficiently identify targets such as equipment, facilities, and lines in power grid infrastructure. Through multi-directional scanning and feature fusion strategies, this invention can accurately detect targets of different scales in complex backgrounds, especially showing significant advantages in small target detection. Compared with the traditional YOLO model, the Mamba-YOLO of this invention significantly reduces computational complexity while ensuring detection accuracy, meeting the real-time requirements of power grid infrastructure target detection. This method can be widely applied in fields such as intelligent monitoring, equipment inspection, and fault diagnosis in the power industry.
[0045] Compared with the prior art, the present invention has the following advantages:
[0046] 1. Highly efficient multi-scale feature extraction: By using the optimized deep state space block module in the backbone feature extraction network, combined with the local feature extraction of local space blocks, the global modeling capability of the two-dimensional selective scanning module, and the deep channel fusion of the remaining gate control block, the detection capability of small targets and complex backgrounds is significantly improved.
[0047] 2. Bidirectional feature fusion strategy: In the neck path aggregation network, a bidirectional feature fusion mechanism combining upsampling and downsampling is used to effectively balance global contextual information and local detail information, thereby improving detection accuracy;
[0048] 3. Optimize the head detection network: By decoupling the classification and detection tasks, interference between tasks is reduced, which improves classification accuracy and the robustness of bounding box regression;
[0049] 4. Power grid infrastructure-specific target detection capability: It can effectively identify key equipment, transmission lines, transmission towers and small defects in complex scenarios in the power grid, and comprehensively cover the detection needs in power grid infrastructure scenarios;
[0050] 5. Strong real-time performance: By leveraging the linear complexity of the Mamba architecture and the efficient framework design of YOLO, this invention achieves real-time detection performance while maintaining high accuracy, meeting the requirements of power grid infrastructure scenarios for the efficiency and accuracy of target detection.
[0051] It should be understood that the descriptions in this section are not intended to identify key or essential features of embodiments of the invention, nor are they intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Of course, implementing any product of the invention does not necessarily require achieving all of the advantages described above simultaneously. Attached Figure Description
[0052] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0053] Figure 1 This is a network structure diagram of the Mamba-YOlO power grid target detection model in this invention;
[0054] Figure 2 This is the optimized deep state space block network structure in the backbone feature extraction network module of this invention. Detailed Implementation
[0055] 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 a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. 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.
[0056] The Mamba-YOLO-based power grid infrastructure target detection method of this invention includes inputting a pre-processed power grid infrastructure image into a pre-constructed Mamba-YOLO target detection model to detect the location and type of defects in the image. The Mamba-YOLO target detection model includes a backbone feature extraction network, a neck path aggregation network, and a head detection network. The pre-processed power grid infrastructure image first enters the optimized deep state space block module of the backbone feature extraction network for feature extraction, obtaining a multi-scale feature map. The optimized deep state space block consists of a local space block, a two-dimensional selective scanning module, and a residual gate control block.
[0057] The obtained multi-scale feature maps are input into the neck path aggregation network for upsampling and downsampling. The neck path aggregation network first passes through the feature pyramid network for upsampling layer by layer. The upsampling results are fed back to the backbone feature extraction network to observe the image multiple times to obtain richer feature information. On the other hand, they are input into the neck path aggregation network for downsampling. The downsampling results are fused with the upsampling results of the feature pyramid network layers. The feature map obtained by the bidirectional feature fusion is input into the head detection network to perform the target detection task.
[0058] The core modules of the optimized deep state space block include:
[0059] 1) Local Spatial Blocks: This technique refines the feature extraction process using depthwise separable convolution. It first processes each channel independently through channel-wise convolution, then integrates information across channels using pointwise convolution. This significantly reduces the computational burden on the model and enhances its ability to capture local texture and structure in images, demonstrating excellent adaptability, particularly in recognizing small targets and complex background scenes. The design of local spatial blocks allows the model to fully utilize local feature information while maintaining efficient computation, laying a solid foundation for subsequent feature fusion and object detection.
[0060] 2) Two-dimensional selective scanning module: This module further expands the model's scope by implementing a multi-directional scanning strategy to comprehensively mine the global contextual information contained in the input feature map. These scanned and expanded feature information are then fed into the two-dimensional selective scanning module, where clever merging strategies (such as weighted averaging or attention mechanisms) effectively fuse feature information from different directions, forming a comprehensive and rich global feature representation, providing the model with a more comprehensive basis for decision-making.
[0061] 3) Residual Gating Block: Combining the advantages of gating mechanisms and deep convolutional residual structures, this block dynamically adjusts feature weights based on the feature context through gating functions (such as GLU or GSGU), achieving focus on key target features and suppression of background noise. Simultaneously, the deep convolutional residual structure strengthens the feature propagation path through skip connections, alleviating the gradient vanishing problem in deep networks and enhancing feature consistency and stability.
[0062] The head detection network described in this embodiment of the invention adopts a decoupled head structure, which separates the classification and detection heads to make the processing of tasks more efficient and accurate.
[0063] The head detection network is responsible for the final object detection and classification tasks, and includes a detection head and a classification head. The detection head contains a series of convolutional and deconvolutional layers to generate detection results; these layers are responsible for predicting the bounding box regression value for each anchor box and the confidence score for object presence. The classification head uses Global Average Pooling (GAP) to classify each feature map, reducing the dimensionality of the feature maps and outputting the probability distribution for each class. The design of the classification head enables efficient handling of multi-class classification tasks.
[0064] The neck path aggregation network includes multiple layers of feature fusion modules. It employs a bidirectional fusion strategy to upsample and downsample feature maps at different scales, thereby enhancing the detection capability for complex targets.
[0065] The local spatial block fuses local features with the original input features through residual connections, and the fused features enhance the detection capability of small targets in power grid infrastructure.
[0066] The scan merging module in the two-dimensional selective scanning module can efficiently restore the original dimension of the feature map, enabling the model to maintain high performance when processing high-resolution images.
[0067] The following is a detailed explanation:
[0068] A power grid infrastructure target detection method based on Mamba-YOLO is disclosed. The method involves inputting a pre-processed power grid infrastructure image into a pre-constructed Mamba-YOLO target detection model to detect the location and type of defects in the image. The Mamba-YOLO target detection model includes a backbone feature extraction network, a neck path aggregation network, and a head detection network. The pre-processed power grid infrastructure image first enters an optimized deep state space block module in the backbone feature extraction network for layer-by-layer feature extraction, resulting in a multi-scale feature map. The optimized deep state space block consists of a local space block, a two-dimensional selective scanning module, and a residual gate control block. The multi-scale feature map is then input into the neck path aggregation network for bidirectional fusion. The fused feature map is further input into the head detection network for target detection.
[0069] The optimized deep state space block module in the backbone feature extraction network is one of the core designs of this invention, and includes the following modules:
[0070] 1) Local Spatial Blocks: This technique refines the feature extraction process using depthwise separable convolution. It processes each channel independently through channel-wise convolution, then integrates information across channels using pointwise convolution. This significantly reduces the computational burden on the model and enhances its ability to capture local texture and structure, demonstrating excellent adaptability, particularly in recognizing small targets and complex background scenes. The design of local spatial blocks allows the model to fully utilize local feature information while maintaining efficient computation, laying a solid foundation for subsequent feature fusion and object detection. Specifically, for a given input feature... It first undergoes depthwise separable convolution, which operates independently on each input channel without mixing channel information. This effectively extracts the local spatial information of the input feature map while reducing computational cost and the number of parameters. Then, batch normalization is performed, providing a degree of regularization while reducing overfitting, resulting in intermediate states. Defined as:
[0071] in the formula Given a three-dimensional array of real numbers as input, This is an intermediate state. This represents a three-dimensional array of real numbers, where C is the number of channels, H is the height, W is the width, and BN represents batch normalization. It is a depthwise separable convolution with a kernel size of 3×3;
[0072] Finally, the original input is fused with the processed features through residual stitching. This allows the model to understand and integrate features from different dimensions in the image, thereby enhancing its robustness to scaling changes.
[0073] ⊕
[0074] in For output features, Φ represents the activation function, and ⊕ represents the residual connection. It is a depthwise separable convolution with a kernel size of 1×1.
[0075] Local spatial blocks can effectively capture and represent the local spatial information of the input feature map and fuse it with the original input to enhance the representation of the features, providing Mamba-YOLO with a powerful ability to handle scale variations and contextual information in visual data.
[0076] 2) Two-dimensional selective scanning module: This module further expands the model's scope by implementing a multi-directional scanning strategy (including horizontal, vertical, and diagonal scanning) to comprehensively mine the global contextual information contained in the input feature map. This expanded feature information is then fed into the two-dimensional selective scanning module, where a clever merging strategy (attention mechanism) effectively fuses feature information from different directions, forming a comprehensive and rich global feature representation, providing the model with a more comprehensive basis for decision-making.
[0077] 3) Residual Gating Block: Combining the advantages of gating mechanisms and deep convolutional residual structures, it achieves deep fusion of features between channels through nonlinear activation and pointwise convolution. The gating function dynamically adjusts feature weights based on the feature context, enabling focus on key target features and suppression of background noise. For example... Figure 2 In this design, the simple structure of the residual gate control block aims to improve model performance with low computational cost. The residual gate control block draws data from the input... Create two branches and And a fully connected layer is implemented on each branch in the form of a 1×1 convolution.
[0078]
[0079]
[0080] Depthwise separable convolution is used as The positional encoding module on the branch, through residual concatenation, more effectively re-inflows gradients during training and significantly improves performance by preserving and utilizing the spatial structure information of the image. The residual gate control block uses a nonlinear GeLU as the activation function to control the information flow at each level, and then performs element-wise multiplication with... One branch is merged, then refined with global features through 1x1 convolution to mix channel information, and finally concatenated with the original input through residual concatenation. The features are added to the features in the hidden layer. The remaining gate control block can capture more global features while only slightly increasing the computational cost, resulting in output features. Defined as:
[0081]
[0082] Where Φ represents the activation function (non-linear GeLU). The gating mechanism in the RG block preserves spatial information by integrating convolution operations, while making the model more sensitive to fine-grained features in the image.
[0083] The neck path aggregation network module effectively processes multi-scale features and improves the model's ability to detect targets of different sizes. This module mainly consists of a feature pyramid network layer (FPN) and a bidirectional fusion strategy.
[0084] 1) Feature Pyramid Network Layer (FPN)
[0085] The Feature Pyramid Network (FPN) layer is one of the core components of the neck path aggregation network module. Its main function is to perform layer-by-layer upsampling of multi-scale feature maps to construct a rich feature pyramid structure. Specifically, the FPN layer receives feature maps from different levels of the backbone feature extraction network as input, and these feature maps have different scales and semantic information.
[0086] Upsampling operation: For each input feature map, the FPN layer employs a specific upsampling method, such as bilinear interpolation or deconvolution, to progressively increase its spatial resolution, ensuring it maintains scale consistency with higher-resolution feature maps. This upsampling operation not only recovers the detailed information of the feature map but also provides a foundation for subsequent feature fusion.
[0087] Feature Backpropagation and Reinforcement Learning: The upsampled results are processed in two parts. One part of the feature map is backpropagated to the preceding feature extraction module of the backbone feature extraction network. This operation is significant in strengthening the feature learning process. By fusing or recalculating the upsampled feature map with the input features of the preceding feature extraction module, the model can better capture the correlation information between multi-scale features, further enrich the semantic content of the feature representation, and improve the model's ability to perceive targets at different scales. The other part of the upsampled feature map is fed into the subsequent module of the neck path aggregation network, namely the bidirectional fusion strategy module, for deeper feature fusion and optimization.
[0088] 2) Two-way fusion strategy
[0089] The bidirectional fusion strategy is another key component of the neck path aggregation network module. It further enhances the expressive power of features through bidirectional fusion operations between the upsampled feature map and the original input feature map to meet the needs of multi-scale object detection.
[0090] Fusion of the upsampled feature map with the original input feature map: In a bidirectional fusion strategy, the upsampled feature map and the original input feature map are first fused bidirectionally. This fusion method can be a simple element-wise addition or concatenation, or a more complex fusion operation, such as attention-based weighted fusion. Through this fusion operation, the model can combine the high-level semantic information contained in the upsampled feature map with the low-level detail information in the original input feature map, resulting in a more representative fused feature map.
[0091] Downsampling Module: The downsampling module plays a crucial role in the entire bidirectional fusion strategy. It further processes the fused feature maps by adjusting their spatial resolution through downsampling operations such as max pooling and average pooling, adapting them to the detection requirements of targets at different scales. Simultaneously, the downsampling module can incorporate more contextual information, helping the model better understand the relationship between the target and its surrounding environment, thereby improving the accuracy and robustness of target detection.
[0092] Through the bidirectional fusion and downsampling operations described above, the model can further optimize the expressive power of features. On the one hand, the fused multi-scale features can more comprehensively describe the characteristics of the target; on the other hand, the downsampling operation helps reduce redundant information in the feature map, highlight key features, and make the model more focused on the essential features of the target, thereby improving the performance of target detection.
[0093] The head detection network is designed with a decoupled head structure, including a classification head and a detection head. The classification head classifies each feature map using global average pooling (GAP), outputting the probability distribution of each class, reducing feature dimensionality and improving classification efficiency. The detection head includes a series of convolutional and deconvolutional layers to generate bounding box regression values and target confidence for each anchor box, using pointwise convolution and non-linear activation to improve regression accuracy.
[0094] This invention, in response to the specific needs of power grid infrastructure applications, incorporates the following detection capabilities:
[0095] 1) Power grid equipment detection: The model can accurately identify key equipment in substations, such as transformers, circuit breakers and disconnect switches, locate the equipment and determine its operating status.
[0096] 2) Cable line identification: Through multi-scale feature extraction and fusion of Mamba-YOLO, high-altitude and ground cable lines are detected, the line locations are accurately marked and possible damaged areas are identified.
[0097] 3) Transmission tower condition monitoring: Utilizing the local information capture capability of local spatial blocks, identify transmission tower structural components and detect problems such as tower cracks and component detachment.
[0098] 4) Small target detection: For small faults in power grid infrastructure (such as loose bolts, damaged cables, etc.), high-precision detection is achieved through the global information fusion and high-resolution processing capabilities of the two-dimensional selective scanning module.
[0099] 5) Target separation in complex backgrounds: When faced with complex backgrounds commonly found in power grid environments (such as vegetation obstruction, high-altitude background interference, etc.), the remaining gate control block enhances the ability to distinguish targets from backgrounds by deeply fusing feature information.
[0100] The Mamba-YOLO model of this invention employs multiple optimization techniques, significantly improving object detection performance:
[0101] 1) An optimized deep state space block module is introduced into the backbone feature extraction network. Combining the local feature extraction of the local space block, the global modeling capability of the two-dimensional selective scanning module, and the deep channel fusion of the remaining gate control block, the small target detection capability and feature capture efficiency in complex scenes are significantly improved.
[0102] 2) The neck path aggregation network adopts a bidirectional fusion strategy to fully extract multi-scale information in upsampling and downsampling, thereby enhancing the model's ability to perceive targets;
[0103] 3) The head detection network separates the detection and classification tasks through decoupling design, reducing interference between tasks and improving classification accuracy and robustness of bounding box regression;
[0104] 4) In view of the special nature of power grid infrastructure goals, multi-module collaboration is used to take into account both large and small target detection, adapting to diverse power grid scenarios;
[0105] 5) By designing the linear complexity of the state-space model, the processing capability of high-resolution images is optimized while maintaining real-time performance.
[0106] The preprocessing method includes: using an image annotation tool to annotate the target locations and defect types in the power grid infrastructure images, generating Pascal VOC format files for training and validation of the Mamba-YOLO target detection model.
[0107] The following are examples:
[0108] Example 1: A power grid infrastructure target detection method based on Mamba-YOLO, specifically implemented according to the following steps:
[0109] Step S1: Construct the Mamba-YOLO object detection model
[0110] (1) The network structure of the Mamba-YOLO object detection model is as follows: Figure 1 As shown, it consists of three main parts: a backbone feature extraction network, a sub-path aggregation network, and a head detection network. The preprocessed power grid infrastructure image first enters the backbone feature extraction network for layer-by-layer feature extraction, resulting in a multi-scale feature map. The backbone feature extraction network contains several optimized deep state space block modules. Each optimized deep state space block is composed of a local space block, a two-dimensional selective scanning module, and a residual gate control block connected in series, which can effectively model long-range dependency features while preserving local details.
[0111] The obtained multi-scale feature maps are further input into the neck path aggregation network for feature fusion. First, they are upsampled through the feature pyramid network layer. The upsampled results of the feature pyramid network layer are fed back to the pre-sequence layer of the backbone feature extraction network to observe the original image multiple times, and then input into the neck path aggregation network for downsampling. The downsampled results are then fused with the upsampled results of the feature pyramid network layers in a two-way manner. The resulting fused feature map is then passed to the head detection network to perform the target detection task.
[0112] (2) In view of the characteristics of multiple scenarios, multiple defect categories and dense small targets in power grid infrastructure, several improvements are introduced into the optimized deep state space block module of the backbone feature extraction network:
[0113] Local spatial blocks: Depthwise separable convolution is used to extract local details of the input image, point convolution is used to enhance channel fusion capability, and residual connections are used to preserve the original feature information;
[0114] Two-dimensional selective scanning module: Based on the state space model, multi-directional scanning unfolding and merging is performed to process long-range dependencies in high-resolution images in parallel, improving the model's adaptability to complex scenes;
[0115] Residual gate control block: Introducing a gating mechanism into the residual structure, by combining channel attention with nonlinear activation functions, enhances the focus on key target features and suppresses background noise, thereby reducing missed detections and false detections in a multi-interference environment of the power grid.
[0116] (3) In order to better balance multi-scale target detection and real-time performance, the neck path aggregation network adopts a two-way feature fusion strategy: the upsampling results of each layer of the feature pyramid network are fed back to the early feature layer to enhance the shallow layer's ability to capture small targets; the downsampling layer fuses high-level semantics with shallow detail features to improve the modeling ability of large targets and global information.
[0117] (4) A decoupled structure is adopted in the head detection network: the location regression branch and the category prediction branch are separated so that the box regression and category classification are trained independently to reduce mutual interference; for confidence prediction, the same backbone convolutional layer output as the regression branch is used to determine whether there is a target and its confidence in the anchor box.
[0118] Step S2, Model Training
[0119] First, the power grid infrastructure images and annotation information are input into the Mamba-YOLO object detection model constructed in step S2 for training. Common object detection loss strategies (such as IoU class loss, Focal Loss, or cross-entropy) are used to optimize the bounding box position regression, class prediction, and confidence prediction, respectively, to obtain the trained Mamba-YOLO object detection model. Then, the real-time acquired power grid infrastructure images are processed through the same preprocessing steps and input into the trained Mamba-YOLO object detection model to output object detection and recognition results, including defect categories and specific locations.
[0120] Step S3, Performance Testing
[0121] 1. Detection results for different defect types
[0122] To verify the effectiveness of the Mamba-YOLO-based power grid infrastructure target detection method described in this invention, real-world images collected by a power grid operation and maintenance department were input into the Mamba-YOLO model trained in Example 1. The model identified the locations and types of different defects in the images. The detection results are shown in Table 1:
[0123]
[0124] As shown in Table 1, the Mamba-YOLO target detection model trained using this invention can achieve high accuracy, recall, and average precision for various power grid infrastructure defects. Among them, the detection performance of insulator defects and fitting defects is particularly stable, and it has good detection capabilities for small targets and complex backgrounds.
[0125] 2. Comparison of detection performance of different models
[0126] To comprehensively evaluate the performance of Mamba-YOLO, the trained model was compared with YOLOv4, YOLOv5, and YOLOv8. The results are shown in Table 2.
[0127]
[0128] As shown in Table 2, YOLOv4 has a certain advantage over YOLOv5 due to its stronger ability to identify small targets through the region proposal network, but its detection speed is relatively slow. YOLOv8 can also achieve a balance between speed and accuracy through multi-scale feature extraction and attention mechanism. The Mamba-YOLO proposed in this invention achieves the highest accuracy, recall, average precision and detection speed, and maintains good detection performance, especially in the context of small targets and complex interference, which can meet the requirements of power grid inspection for real-time performance and accuracy.
[0129] In summary, the Mamba-YOLO model of this invention can accurately detect the location of defects in power grid infrastructure in complex backgrounds and demonstrates good recognition capabilities for different defect types (such as tower defects, insulator defects, and hardware defects). Through multi-level feature fusion of the backbone feature extraction network and the neck path aggregation network, the model achieves faster convergence, and its detection speed and accuracy are significantly better than other typical detection algorithms. This invention can be flexibly deployed on edge devices or servers to adapt to various power grid scenarios and is of great significance for improving the efficiency and safety of power grid inspection.
[0130] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0131] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0132] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the MAMBA-YOLO-based power grid infrastructure target detection methods described in the above embodiments.
[0133] It is understood that the system provided in the embodiments of the present invention corresponds to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant content can be referred to the corresponding parts of the above method.
[0134] This application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus.
[0135] Memory, used to store computer programs;
[0136] When the processor executes the program stored in the memory, it implements the above-mentioned MAMBA-YOLO-based target detection method for power grid infrastructure.
[0137] The communication bus mentioned in the aforementioned electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0138] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0139] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0140] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0141] It should also be noted that electronic devices include terminal devices, which can also be called terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Terminal devices can be mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on. The embodiments of this application do not limit the specific technologies or device forms used in the terminal devices.
[0142] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0144] Furthermore, it should be noted that if any directional indication (such as up, down, left, right, front, back, etc.) is involved in the embodiments of the present invention, the directional indication is only used to explain the relative positional relationship and movement of each component in a specific posture. If the specific posture changes, the directional indication will also change accordingly.
[0145] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, in the embodiments of this invention, "multiple" refers to two or more. Moreover, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
Claims
1. A method for detecting power grid infrastructure targets based on MAMBA-YOLO, characterized in that, Includes the following steps, The preprocessed power grid infrastructure images are input into a pre-built Mamba-YOLO target detection model to detect the location and type of defects in the power grid infrastructure images; The Mamba-YOLO target detection model includes a backbone feature extraction network, a neck path aggregation network, and a head detection network. After preprocessing, the power grid infrastructure image first enters the optimized deep state space block in the backbone feature extraction network for layer-by-layer feature extraction to obtain a multi-scale feature map. The optimized deep state space block consists of a local space block, a two-dimensional selective scanning module, and a remaining gate control block. The multi-scale feature map is input into the neck path aggregation network for bidirectional fusion, and the fused feature map is further input into the head detection network for target detection tasks. The residual gate control block combines the advantages of gating mechanism and deep convolution residual structure. Through nonlinear activation and pointwise convolution, it achieves deep fusion of features between channels and the gating function dynamically adjusts feature weights according to feature context, thereby achieving focus on key target features and suppression of background noise. Remaining gate control block from input Create two branches and And a fully connected layer is implemented on each branch using a 1×1 convolution; , Depthwise separable convolution is used as The location encoding module on the branch, through residual concatenation, more effectively backflows gradients during training and significantly improves performance by preserving and utilizing the spatial structure information of the image; The remaining gate control block uses a nonlinear GeLU as the activation function to control the information flow at each level, and then uses element-wise multiplication and... One branch is merged, then refined with global features through 1x1 convolution to mix channel information, and finally concatenated with the original input through residual concatenation. Add the features from the hidden layer; The remaining gate control blocks capture more global features, resulting in output features. Defined as: in Φ represents element-wise multiplication, and Φ represents the nonlinear GeLU activation function. The gating mechanism in the RG block preserves spatial information by integrating convolution operations, while making the model more sensitive to fine-grained features in the image.
2. The power grid infrastructure target detection method based on MAMBA-YOLO as described in claim 1, characterized in that, The processing steps for the local spatial block are as follows: For a given input feature First, it undergoes a depthwise separable convolution, which operates independently on each input channel without mixing channel information; Then, batch normalization is performed to reduce overfitting while providing regularization, resulting in intermediate states. Defined as: in the formula Given a three-dimensional array of real numbers as input, This is an intermediate state. This represents a three-dimensional array of real numbers, where C is the number of channels, H is the height, W is the width, and BN represents batch normalization. It is a depthwise separable convolution with a kernel size of 3×3; Finally, the original input and the processed features are fused through residual concatenation; Allows the model to understand and integrate features from different dimensions in an image; ⊕ in For output features, Φ represents the activation function, and ⊕ represents the residual connection. It is a depthwise separable convolution with a kernel size of 1×1.
3. The power grid infrastructure target detection method based on MAMBA-YOLO as described in claim 2, characterized in that, The processing steps of the two-dimensional selective scanning module are as follows: By implementing a multi-directional scanning strategy, including horizontal, vertical, and diagonal scanning, the global contextual information contained in the input feature map is fully mined. This scanned and expanded feature information is then fed into a two-dimensional selective scanning module, which uses a merging strategy, i.e., an attention mechanism, to effectively fuse feature information from different directions, forming a comprehensive and rich global feature representation, providing the model with a more comprehensive basis for decision-making.
4. The power grid infrastructure target detection method based on MAMBA-YOLO as described in claim 1, characterized in that, The neck path aggregation network module processes multi-scale features and improves the model's ability to detect targets of different sizes. This module consists of a feature pyramid network layer (FPN) and a bidirectional fusion strategy. The Feature Pyramid Network (FPN) layer performs layer-by-layer upsampling on multi-scale feature maps to construct a rich feature pyramid structure. The FPN layer receives feature maps from different levels of the backbone feature extraction network as input, and these feature maps have different scales and semantic information. Upsampling operation: For each input feature map, the Feature Pyramid Network (FPN) layer uses an upsampling method to gradually increase its spatial resolution, making it consistent with the higher resolution feature map in scale; Feature backpropagation and reinforcement learning: The upsampled result is processed in two parts; one part of the feature map is backpropagated to the preceding feature extraction module of the backbone feature extraction network; by fusing or recalculating the upsampled feature map with the input features of the preceding feature extraction module, the model can better capture the correlation information between multi-scale features, further enrich the semantic content of the feature representation, and improve the model's ability to perceive targets at different scales. The other part of the upsampled feature map is fed into the subsequent module of the neck path aggregation network, namely the bidirectional fusion strategy module, for deeper feature fusion and optimization.
5. The power grid infrastructure target detection method based on MAMBA-YOLO as described in claim 4, characterized in that, The bidirectional fusion strategy is another key component of the neck path aggregation network module. It further enhances the expressive power of features through bidirectional fusion operation between the upsampled feature map and the original input feature map to meet the needs of multi-scale target detection. Fusion of upsampled feature map with original input feature map: In the bidirectional fusion strategy, the upsampled feature map and the original input feature map are first fused bidirectionally. Through fusion operations, the model can combine the high-level semantic information contained in the upsampled feature map with the low-level detail information in the original input feature map to obtain a more representative fused feature map. Downsampling module: The downsampling module further processes the fused feature map. Through downsampling, it adjusts the spatial resolution of the feature map to adapt to the detection requirements of targets at different scales.
6. The power grid infrastructure target detection method based on MAMBA-YOLO as described in claim 1, characterized in that, The head detection network is designed with a decoupled head structure, including a classification head and a detection head; The classification head classifies each feature map using global average pooling (GAP), outputting the probability distribution of each class, reducing feature dimensionality and improving classification efficiency. The detection head includes a series of convolutional and deconvolutional layers to generate bounding box regression values and target confidence for each anchor box, and employs pointwise convolution and nonlinear activation to improve regression accuracy.
7. A computer-readable storage medium, characterized in that, The system stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 6.
8. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Road garbage detection method combining RT-DETR and state space
CN119649353A
Training method and apparatus for target detection model, device and storage medium
US20220147822A1