Power grid operation scene target detection method based on multi-scale linear attention

By introducing the SDIT and SEAM modules into target detection in power grid operation scenarios, stable fusion of multi-scale features and nonlinear recalibration are achieved, solving the problems of small target detection accuracy and robustness in complex environments, and improving detection accuracy and robustness.

CN122116251APending Publication Date: 2026-05-29HUAIYIN INSTITUTE OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAIYIN INSTITUTE OF TECHNOLOGY
Filing Date
2026-02-04
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing target detection methods in power grid operation scenarios suffer from difficulties in detecting small targets, instability in multi-scale feature fusion, and insufficient feature discriminability under complex lighting conditions. It is difficult to achieve a good balance between multi-scale small target detection accuracy, feature fusion stability, and robustness in complex environments.

Method used

A target detection method for power grid operation scenarios based on multi-scale linear attention is adopted. By replacing the Concat module with the SDIT module in the Neck layer of the target detection network, adaptive spatial alignment, smooth convolutional mapping and element-level injection fusion are achieved. Combined with the SEAM module for nonlinear recalibration, the stability and robustness of multi-scale features are enhanced.

Benefits of technology

Without significantly increasing computational complexity, it improves the detection accuracy and stability of small targets in power grid operation scenarios, effectively suppresses the influence of complex backgrounds and lighting interference, and has good engineering practical value and application prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122116251A_ABST
    Figure CN122116251A_ABST
Patent Text Reader

Abstract

The application discloses a power grid operation scene target detection method based on multi-scale linear attention, and belongs to the technical field of power safety intelligent monitoring and computer vision. The method takes YOLOv11n as a basic target detection network, replaces an original feature splicing module with an SDIT module at a Neck layer, adopts a self-adaptive spatial alignment, smooth convolution mapping and element-level injection fusion mode, and realizes stable fusion of different scale features under a unified spatial scale. An SEAM space-channel self-adaptive re-labeling module is introduced between the Neck and a Head, a space-channel hybrid mapping structure based on an exponential enhancement mechanism is introduced, different channel features are nonlinearly re-labeled, and enhanced multi-scale features are obtained. Compared with the prior art, the application can effectively improve the detection precision and robustness of personnel, vehicles and individual protective equipment and other targets in a power grid operation scene, and is suitable for application scenes such as power transmission inspection, substation maintenance and live working safety monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and machine vision technology, specifically relating to a target detection method for power grid operation scenarios based on multi-scale linear attention, which is applicable to intelligent perception and safety monitoring of targets such as personnel, vehicles and operation equipment in complex operation environments. Background Technology

[0002] With the continuous improvement of the intelligent and digital operation and maintenance level of the power grid, large-scale video surveillance systems have been widely deployed in transmission line inspection channels, substation maintenance areas, distribution rooms, high-altitude live-line work sites, and areas where work vehicles work together. These systems are used to monitor and manage the behavior of workers, vehicle operating status, tool usage, and the wearing of safety protective equipment in real time. The automatic detection and identification of targets such as workers, work vehicles, power grid equipment, and their auxiliary components is a crucial foundation for achieving intelligent perception, risk warning, and safety control during power grid operations.

[0003] Existing target detection methods are mostly based on deep convolutional neural networks or Transformer structures, using multi-scale feature extraction and fusion to locate and classify targets. In general industrial scenarios, these methods have achieved good results. However, in actual power grid operation environments, the following prominent problems still exist:

[0004] On the one hand, power grid operation scenarios are complex in structure and have significant scale variations. The operation area often contains both near-field equipment and far-field personnel targets, with a high proportion of small targets. For example, targets such as distant workers, safety helmets, and the ends of insulated tools occupy only a few pixels in the image, making it easy to lose key information during multiple downsampling and feature fusion processes.

[0005] On the other hand, multi-scale feature fusion methods still have limitations. Existing methods usually use feature concatenation or simple weighting for multi-scale fusion. There is a lack of effective semantic alignment and contribution modeling mechanisms between features of different scales, which can easily lead to problems such as insufficient cross-scale information coupling, accumulation of redundant features, and obscuring of key details. This is especially evident in the multiple fusion processes of deep networks, thus affecting the convergence efficiency and detection accuracy of the model.

[0006] Furthermore, complex lighting and background interference place higher demands on feature discriminative power. The power grid operating environment commonly exhibits strong reflections, bright metal surfaces, and alternating backlighting and shadows, leading to significant differences in the contribution of different channel features to the detection results. Existing channel attention or recalibration methods often employ linear scaling, which struggles to significantly amplify the responses of key channels while maintaining numerical stability, thus limiting the model's discriminative power and robustness in complex scenarios.

[0007] In summary, existing target detection methods still struggle to achieve a good balance between multi-scale small target detection accuracy, feature fusion stability, and robustness to complex environments in power grid operation scenarios. There is an urgent need for a target detection method that can introduce efficient semantic modeling in the multi-scale feature fusion stage and achieve stable and significant channel recalibration in the subsequent feature enhancement stage. Summary of the Invention

[0008] Purpose of the invention: To address the problems of difficulty in detecting small targets, instability of multi-scale feature fusion, and insufficient feature discriminability under complex lighting conditions in existing technologies for power grid operation scenarios, this invention proposes a target detection method for power grid operation scenarios based on multi-scale linear attention. Without significantly increasing computational complexity, it effectively improves the detection accuracy and stability of multi-scale targets, especially small targets, in power grid operation scenarios, and has good engineering practical value and prospects for promotion and application.

[0009] Technical Solution: This invention proposes a target detection method for power grid operation scenarios based on multi-scale linear attention, comprising the following steps:

[0010] Step 1: Collect and label power grid operation scenario data, divide the data into training, validation, and test sets, and complete the formatting processing required for training;

[0011] Step 2: Based on YOLOv11n, replace the Concat module with the SDIT module in the Neck layer. The SDIT module adopts adaptive spatial alignment, smooth convolutional mapping and element-level injection fusion to achieve stable fusion of features of different scales under a unified spatial scale. The Neck layer outputs the fused three-way scale branch features.

[0012] Step 3: The three-scale branch features output in Step 2 are directly input into the SEAM module. The SEAM module introduces a spatial-channel hybrid mapping structure based on an exponential enhancement mechanism to perform nonlinear recalibration on the features of different channels to obtain enhanced multi-scale features, which are then sent to the detection head to complete the multi-scale target detection output.

[0013] Step 4: Train the improved YOLOv11n model, perform inference evaluation on the partitioned test set, output and statistically analyze the detection performance indicators to obtain the model performance evaluation results.

[0014] Furthermore, the specific method of step 1 is as follows:

[0015] Step 1.1: Collect monitoring video or image data of power grid operation scenarios. The power grid operation scenarios include, but are not limited to, transmission line inspection, substation maintenance, high-altitude live-line work, and collaborative operation scenarios of work vehicles; extract images containing work personnel, work vehicles, or power grid equipment targets as the original power grid operation scenario dataset, denoted as EData.

[0016] Step 1.2: Manually annotate a portion of the images in EData. Use a target annotation tool to annotate the detected targets in the images with rectangular bounding boxes and assign category labels to them, forming a set of annotated samples with location and category information;

[0017] Step 1.3: Based on the labeled samples from Step 1.2, perform preliminary training on the target detection baseline network to obtain model weights; use the model weights in conjunction with the automatic labeling script to automatically label the remaining unlabeled images, and manually verify and correct the automatic labeling results to obtain a complete labeled dataset;

[0018] Step 1.4: Divide the complete labeled dataset into training set, validation set and test set according to the preset ratio;

[0019] Step 1.5: Convert the image and its annotation information into the data format required for training the object detection network, and perform size normalization and necessary data augmentation on the input image.

[0020] Furthermore, the specific process of the Neck layer is as follows:

[0021] The output features of the C2PSA module in the backbone network are upsampled and then input together with the output features of the third C3k2 module in the backbone network into the first SDIT module for processing. The output features of the first SDIT module are processed by the fifth C3k2 module in the Neck layer and upsampled, then input together with the second C3k2 module in the backbone network into the second SDIT module for processing. The output features of the second SDIT module are processed by the sixth C3k2 module in the Neck layer and then by the Conv module, then input together with the features processed by the fifth C3k2 module into the third SDIT module for processing. The output features of the third SDIT module are processed by the seventh C3k2 module in the Neck layer and then by the Conv module, then input together with the features processed by the C2PSA module into the fourth SDIT module for processing. The features processed by the fourth SDIT module are then input into the eighth C3k2 module in the Neck layer.

[0022] The features processed by the sixth, seventh, and eighth C3k2 modules are used as the output features of the three-way scale branches of the Neck layer.

[0023] Furthermore, the SDIT module enhances the spatial and channel attention of the two input features involved in the fusion along two isomorphic branches, and performs channel compression through 1×1 convolution. Then, adaptive scale alignment (ASA) is introduced to align the spatial dimensions of the two features to the anchor point size. Smoothing convolution denoising and linear attention modeling are then used to enhance local details and global contextual dependencies. Finally, Hadamard product is used to perform element-wise fusion of the two features to obtain the fused output features.

[0024] Furthermore, the specific execution process of the SDIT module is as follows:

[0025] Step 2.1: At each fusion node in the Neck layer, the two input features involved in the fusion are used as SDIT instances. The input, denoted as ,in Assign an SDIT instance number, For the first instance The two input features are numbered; each input feature corresponds to one of the two input branches of the fusion node.

[0026] Step 2.2: On any SDIT instance Inside, for the first Road input features Spatial attention and channel attention enhancements are performed sequentially to obtain enhanced features. :

[0027] ;

[0028] in, For spatial attention operations, For channel attention operations;

[0029] Step 2.3: Perform the following steps on the attention-enhanced features: Convolutional dimensionality reduction reduces computational cost while preserving key information, resulting in:

[0030] ;

[0031] Step 2.4: Introduce adaptive scale alignment (ASA) within SDIT, preferably based on the spatial dimensions of the anchor branch. As the target alignment size, according to Space dimensions and The relationship between adaptive ASA resampling alignment and invariance is used to obtain alignment features. :

[0032] ;

[0033] in, This represents an adaptive scale alignment operation used to resample the input feature map to the target space size. Its implementation methods include interpolation upsampling, pooling / stretch convolution downsampling, or a combination thereof; For the first Within the first SDIT instance Road features Space dimensions, Align the target size;

[0034] Step 2.5: The aligned features are further smoothed by convolution to reduce noise and enhance local detail representation.

[0035] ;

[0036] in, Preferred Smooth convolution mapping;

[0037] Step 2.6: Introduce linear attention operations on each feature within SDIT:

[0038] ;

[0039] Step 2.7: Obtain the fused output of the SDIT instance using the Hadamard product form:

[0040] ;

[0041] in, Represents element-wise product. For the first The fused output feature map of SDIT instances.

[0042] Furthermore, the SEAM module enhances both local spatial context and channel interaction capabilities through a residual combination of depthwise separable convolutions and 1×1 convolutions. It then performs global average pooling on the enhanced features to obtain channel-level global responses, generates channel weights through a lightweight two-layer mapping network, and further employs an exponential enhancement mechanism to amplify channel differences. Finally, it uses the exponentially enhanced channel weights to perform channel-by-channel recalibration on the input features, obtaining enhanced multi-scale features, which are then fed into Small, Medium, and Large detection heads to complete multi-scale target detection output.

[0043] Furthermore, the specific process of the SEAM module is as follows:

[0044] Step 3.1: Output features from the three-path scale branches obtained from the Neck layer. It is directly fed into the SEAM module for spatial-channel adaptive enhancement processing;

[0045] Step 3.2: For each input feature map Spatial-channel hybrid mapping (CSMM) is introduced to jointly model local spatial structure information and channel dependencies; CSMM first... Perform depthwise separable convolutions to extract local spatial context, then perform residual stacking with the original features, and then... Convolution enables channel interaction, and finally, nonlinear activation yields hybrid features. :

[0046] ;

[0047] in, Extracting operators for spatial context, For channel mixing operators, It is a non-linear activation function. The mixed feature map output by CSMM. These correspond to the Small, Medium, and Large scale branches, respectively.

[0048] Step 3.3: To obtain mixed features In the current power grid operation scenario, the global response intensity is subjected to global average pooling in the spatial dimension to generate a channel-level context description vector. :

[0049] ;

[0050] in, For the first Spatial dimensions of road feature map Number of channels;

[0051] Step 3.4: Convert the channel-level context description vector Input channel expansion / compression mapping to generate initial channel weights. :

[0052] ;

[0053] in, For learnable mapping parameters, It is a non-linear activation function. For the Sigmoid function;

[0054] Step 3.5: Set the initial channel weights Perform exponential augmentation mapping to obtain the exponential augmentation channel weights. :

[0055] ;

[0056] in, The exponential enhancement coefficient is denoted as . Reshaping yields the weight tensor ;

[0057] Step 3.6: Utilize the exponentially augmented weight tensor Scale branch features of the input Perform channel-by-channel adaptive recalibration to obtain the SEAM output feature map. :

[0058] ;

[0059] in, This represents element-wise multiplication and is broadcast across spatial dimensions. This is the feature map after SEAM recalibration;

[0060] Step 3.7: Assign branches corresponding to different scales Input the corresponding scale detection head for classification and regression prediction to complete the multi-scale target detection output.

[0061] Furthermore, the training process in step 4 specifically includes:

[0062] Step 4.1: Read the training set images in batches according to the preset input size and input them into the improved YOLOv11n model. Perform forward propagation and output the prediction results of the detection heads at each scale. The prediction results include at least the target category prediction, confidence prediction and target bounding box regression prediction information.

[0063] Step 4.2: Match the prediction results with the corresponding real annotation information in the training set, construct the target detection training loss function and calculate the loss value; the loss function includes at least: classification loss for measuring class discrimination error, bounding box regression loss for measuring target position and size error, and confidence loss for measuring the existence of foreground, background or target, so as to realize joint constraints on the output of multi-scale detection head;

[0064] Step 4.3: Based on the loss function, use the backpropagation algorithm to calculate the gradient information of the loss function with respect to each learnable parameter in the improved YOLOv11n model; the learnable parameters include at least the YOLOv11n baseline network parameters, SDIT module parameters, and SEAM module parameters;

[0065] Step 4.4: Use an adaptive optimization method based on gradient descent to update the model parameters according to the gradient information in order to minimize the target detection training loss function;

[0066] Step 4.5: Repeat the training iteration process and periodically evaluate and fine-tune the model on the validation set until the model reaches convergence or reaches the preset number of training rounds, thus obtaining the improved target detection model after training.

[0067] The present invention also discloses a target detection method for power grid operation scenarios based on multi-scale linear attention, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded onto the processor, it implements the above-mentioned target detection method for power grid operation scenarios based on multi-scale linear attention.

[0068] Beneficial effects:

[0069] 1. This invention introduces the SDIT module into the multi-scale feature fusion stage of the target detection network, employing adaptive spatial alignment, smooth convolutional mapping, and element-level injection fusion methods to achieve stable fusion of features at different scales under a unified spatial scale. Simultaneously, a lightweight linear attention mechanism is introduced into the low-resolution, high-semantic-level feature branch, effectively enhancing long-range dependency modeling capabilities. Practice shows that this structure can effectively improve the detection accuracy of small-sized personnel, safety equipment, and tools in power grid operation scenarios without significantly increasing model complexity.

[0070] 2. This invention introduces a SEAM spatial-channel adaptive feature recalibration module based on an exponential enhancement mechanism between the multi-scale feature fusion output and the detection head. Through residual-stable spatial-channel hybrid modeling and exponential enhancement mapping, nonlinear recalibration of features in different channels is performed. This mechanism can amplify the response of key channels while maintaining numerical stability, thereby effectively suppressing the influence of interference factors such as complex backgrounds, strong reflections, and uneven illumination on the detection results, and improving the model's robustness in complex power grid operating environments.

[0071] 3. The method of this invention achieves higher detection accuracy and better small target detection performance while maintaining comparable parameter quantity and computational complexity to existing lightweight detection models. Although the introduction of multi-scale linear attention and exponential enhancement modules slightly reduces the inference speed, it still meets the real-time detection requirements of power grid operation scenarios, possesses good engineering deployability and practical application value, and is suitable for intelligent operation and maintenance and operation safety monitoring scenarios of power grids. Attached Figure Description

[0072] Figure 1 This is an overall flowchart of the method of the present invention;

[0073] Figure 2 This is a schematic diagram of the overall structure of the improved target detection network of the present invention;

[0074] Figure 3This is a schematic diagram of a multi-scale linear attention feature fusion structure based on SDIT;

[0075] Figure 4 This is a schematic diagram of the SEAM spatial-channel adaptive feature recalibration structure, where (a) is the overall SEAM structure and (b) is the specific structure of CSMM.

[0076] Figure 5 These are example images of detection results in different scenarios in embodiments of the present invention. Detailed Implementation

[0077] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0078] This invention discloses a target detection method for power grid operation scenarios based on multi-scale linear attention, comprising the following steps:

[0079] Step 1: Collect and label power grid operation scenario data, divide the data into training, validation, and test sets, and complete the formatting process required for training.

[0080] Step 1.1: Collect monitoring video or image data of power grid operation scenarios. The power grid operation scenarios include, but are not limited to, transmission line inspection, substation maintenance, high-altitude live-line work, and collaborative operation scenarios of work vehicles. Extract images containing work personnel, work vehicles, or power grid equipment targets from the collected video data as the original power grid operation scenario dataset, denoted as EData.

[0081] Step 1.2: Manually annotate a portion of the images in EData. Use a target annotation tool to annotate the detected targets in the images with rectangular bounding boxes and assign category labels to them, forming a set of annotated samples with location and category information.

[0082] Step 1.3: Based on the labeled samples in Step 1.2, perform preliminary training on the target detection baseline network (preferably YOLOv11n) to obtain model weights; use the model weights in conjunction with the automatic annotation script to automatically annotate the remaining unlabeled images, and manually verify and correct the automatic annotation results to improve annotation accuracy and consistency, thereby obtaining a complete labeled dataset.

[0083] Step 1.4: Divide the complete labeled dataset into a training set, a validation set, and a test set according to a preset ratio (preferably 8:1:1). The training set is used for model training, the validation set is used for parameter tuning, and the test set is used for performance evaluation.

[0084] Step 1.5: Convert the images and their annotation information into the data format required for training the object detection network, and perform size normalization and necessary data augmentation on the input images to obtain training / evaluation samples that can be directly used in steps 2 to 5.

[0085] Step 2: Use YOLOv11n as the base object detection network, see [link / reference] Figure 2 In its Neck layer, the Concat module is replaced with the SDIT module of this invention. YOLOv11n extracts multi-scale feature maps and enhances feature representation through spatial and channel attention mechanisms. Then, 1x1 convolution is used for dimensionality reduction to adjust the feature map size. Smooth convolution is used for noise reduction, and Linear Attention enhances global context awareness. Finally, Hadamard product is used to fuse feature maps of different scales to improve detection accuracy.

[0086] The specific architecture of the Neck layer is as follows:

[0087] The output features of the C2PSA module in the backbone network are upsampled and then input together with the output features of the third C3k2 module in the backbone network into the first SDIT module for processing. The output features of the first SDIT module are processed by the fifth C3k2 module in the Neck layer and upsampled, then input together with the second C3k2 module in the backbone network into the second SDIT module for processing. The output features of the second SDIT module are processed by the sixth C3k2 module in the Neck layer and then by the Conv module, then input together with the features processed by the fifth C3k2 module into the third SDIT module for processing. The output features of the third SDIT module are processed by the seventh C3k2 module in the Neck layer and then by the Conv module, then input together with the features processed by the C2PSA module into the fourth SDIT module for processing. The features processed by the fourth SDIT module are then input into the eighth C3k2 module in the Neck layer.

[0088] The features processed by the sixth, seventh, and eighth C3k2 modules are used as the output features of the three-way scale branches of the Neck layer.

[0089] The first to fourth SDIT modules described above have the same structure. The execution process of the SDIT modules is described in detail below. (See also...) Figure 3 :

[0090] Step 2.1: Input the training / evaluation sample images obtained in Step 1.5 into the YOLOv11n network, and extract multi-scale features along the backbone and neck network. At each fusion node of the Neck, select two input features participating in the fusion as SDIT instances. The input, denoted as ,in Assign an SDIT instance number, For the first instance The two input features are numbered; the two input features correspond to the two input branches of the fusion node (e.g., the upsampling branch and the lateral connection branch, or the downsampling branch and the cross-layer connection branch).

[0091] Step 2.2: On any SDIT instance Inside, for the first Road input features Spatial attention and channel attention enhancements are performed sequentially to obtain enhanced features. :

[0092]

[0093] in, For spatial attention operations, This is for channel attention operations.

[0094] Step 2.3: Perform the following steps on the attention-enhanced features: Convolutional dimensionality reduction reduces computational cost while preserving key information, resulting in:

[0095]

[0096] Step 2.4: Since the two features may have different spatial resolutions, to ensure the feasibility of element-level fusion operations, Adaptive Scale Alignment (ASA) is introduced within SDIT. Preferably, the spatial size of the anchor branch is used. As the target alignment size (e.g., take) (Branch or take the target size corresponding to the current fusion node), according to Space dimensions and The relationship is adaptively performed by ASA resampling alignment or remains unchanged to obtain alignment features. :

[0097]

[0098] in, This represents an adaptive scale alignment operation used to resample the input feature map to the target space size. Its implementation methods may include interpolation upsampling, pooling / stretch convolution downsampling, or a combination thereof; For the first Within the first SDIT instance Road features Space dimensions, Align the target size.

[0099] Step 2.5: The aligned features are further smoothed by convolution to reduce noise and enhance local detail representation.

[0100]

[0101] in, Preferred Smooth convolution mapping.

[0102] Step 2.6: To enhance long-range dependency modeling capabilities, a linear attention operation is introduced into each feature path within SDIT:

[0103]

[0104] Step 2.7: Element-wise fusion of the two internal features of SDIT is performed to achieve "detail-semantic co-injection". The preferred method is to use the Hadamard product form to obtain the fused output of this SDIT instance:

[0105]

[0106] in, It represents the element-wise product (Hadamard product). For the first The fused output feature map of SDIT instances.

[0107] Step 2.8: Output fused features for each instance The output features of Concat at the fusion node are used to replace the fusion features of the scale branch path where it is located, and then continue to propagate backward, eventually forming only three scale branch output features consistent with the detection head at the end of the Neck:

[0108]

[0109] These correspond to the Small, Medium, and Large scale branches, respectively, and serve as inputs for the subsequent step 3.

[0110] Step 3: Directly input the three-way scale branch features output from Step 2 into the SEAM module. See the structure below. Figure 4In the SEAM module, a spatial-channel hybrid mapping structure is introduced. By combining depthwise separable convolutions and 1×1 convolutions in a residual manner, the interaction capability between local spatial context and channels is enhanced simultaneously. Then, global average pooling is performed on the enhanced features to obtain channel-level global responses. Channel weights are generated through a lightweight two-layer mapping network, and an exponential enhancement mechanism is further used to amplify channel differences. Finally, the channel weights enhanced by exponential enhancement are used to perform channel-by-channel recalibration on the input features to obtain enhanced multi-scale features, which are then fed into Small, Medium, and Large detection heads to complete multi-scale target detection output.

[0111] Step 3.1: Output the three-way scale branch features obtained in Step 2.8 It is directly fed into the SEAM module for spatial-channel adaptive enhancement processing, where... These correspond to the Small, Medium, and Large scale branches, respectively.

[0112] Step 3.2: For each input feature map Spatial-channel hybrid mapping (CSMM) is introduced to jointly model local spatial structure information and channel dependencies. Preferably, CSMM first... Perform depthwise separable convolutions to extract local spatial context, then perform residual stacking with the original features, and then... Convolution enables channel interaction, and finally, nonlinear activation yields hybrid features. :

[0113]

[0114] in, Extracting operators for spatial context, For channel mixing operators, It is a non-linear activation function. This is the hybrid feature map output by CSMM.

[0115] Step 3.3: To obtain mixed features In the current power grid operation scenario, the global response intensity is subjected to global average pooling in the spatial dimension to generate a channel-level context description vector. :

[0116]

[0117] in, For the first Spatial dimensions of road feature map This represents the number of channels.

[0118] Step 3.4: Convert the channel-level context description vector Input channel expansion / compression mapping to generate initial channel weights. It is preferable to use two fully connected layers (or equivalent). Convolutional mapping, combined with nonlinear activation and Sigmoid constraints:

[0119]

[0120] in, For learnable mapping parameters, It is a non-linear activation function. This refers to the Sigmoid function.

[0121] Step 3.5: To enhance the response differences between different channels, adjust the initial channel weights. Perform exponential augmentation mapping to obtain the exponential augmentation channel weights. :

[0122]

[0123] in, This is the exponential enhancement coefficient, used to amplify channel weight differences in a non-linear manner. Reshaping yields the weight tensor .

[0124] Step 3.6: Utilize the exponentially augmented weight tensor For the scale branch features input in step 3.1 Perform channel-by-channel adaptive recalibration to obtain the SEAM output feature map. :

[0125]

[0126] in, This represents element-wise multiplication and is broadcast across spatial dimensions. This is the feature map after SEAM recalibration.

[0127] Step 3.7: Assign branches corresponding to different scales The corresponding scale detection heads (Small, Medium, Large) are fed into the detectors for classification and regression prediction to complete the multi-scale target detection output.

[0128] Step 4: Input the training set samples into the improved YOLOv11n model constructed in Steps 2 and 3 for training. Calculate the detection loss based on the prediction results and real labels. Iterate and update the parameters through backpropagation and optimization algorithms until convergence or the preset number of rounds is reached to obtain the improved model after training.

[0129] Step 4.1: Call the training set samples (including images and their annotation information) obtained in Step 1.5, read the training set images in batches according to the preset input size and input them into the improved target detection model composed of the SDIT enhancement network constructed in Step 2 and the SEAM recalibration network constructed in Step 3, perform forward propagation, and output the prediction results of the detection heads at each scale. The prediction results include at least the target category prediction, confidence prediction and target bounding box regression prediction information.

[0130] Step 4.2: Match the prediction results obtained in Step 4.1 with the corresponding real annotation information in the training set, construct the target detection training loss function and calculate the loss value; the loss function includes at least: classification loss for measuring class discrimination error, bounding box regression loss for measuring target position and size error, and confidence loss for measuring the existence of foreground, background or target, thereby realizing joint constraints on the output of multi-scale detection heads.

[0131] Step 4.3: Based on the total loss function obtained in Step 4.2, the gradient information of the loss function with respect to each learnable parameter in the improved target detection model is calculated using the backpropagation algorithm; the learnable parameters include at least the YOLOv11n baseline network parameters, SDIT module parameters, and SEAM module parameters.

[0132] Step 4.4: The model parameters are updated using an optimization algorithm based on the gradient information obtained in step 4.3 to minimize the target detection training loss function; the optimization algorithm is preferably an adaptive optimization method based on gradient descent, and can be combined with a learning rate scheduling strategy to improve training stability and convergence speed.

[0133] Step 4.5: Repeat the training iteration process from Step 4.1 to Step 4.4, and periodically evaluate and fine-tune the model on the validation set obtained in Step 1.4 until the model reaches convergence or reaches the preset number of training rounds, and obtain the improved target detection model after training.

[0134] This invention can be combined with a computer system to form a target detection method for power grid operation scenarios based on multi-scale linear attention. The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0135] Experimental data:

[0136] This invention selects a self-built dataset from power grid operation scenarios, including six target categories: workers, safety helmets, safety ropes, work vehicles, pallets, and lifting equipment. Data collection covers loading and unloading channels, storage locations, lifting equipment operation areas, and pallet stacking areas, encompassing complex working conditions such as day / night changes, strong glare, backlighting, and rain. A total of 6000 keyframes and 58426 bounding boxes are collected. 4800 images are used as the training set, 600 images as the validation set, and 600 images as the test set. An example of the detection results is shown below. Figure 5 As shown in the figure. This embodiment uses 6 typical target categories as detection categories, and other categories can be expanded in the same way.

[0137] Comparative experiment:

[0138] To verify the effectiveness of the proposed multi-scale linear attention-based target detection method for power grid operation scenarios, typical lightweight real-time target detection models such as MobileNetV3, GhostNet, ShuffleNetV2, and YOLOv11n were selected as baselines for comparison. Under the same dataset partitioning, training strategy, and inference settings, unified experiments were conducted to compare the methods.

[0139] The experimental evaluation metrics included precision, recall, and mAP@50. Simultaneously, the number of model parameters and computational complexity (GFLOPs) were statistically analyzed to comprehensively evaluate the trade-off between detection accuracy and computational cost among different methods. In the experimental results, the method of this invention is labeled Ours.

[0140] As shown in Table 1, with model parameter count and computational complexity on par with other lightweight detection models, the method of this invention outperforms MobileNetV3, GhostNet, ShuffleNetV2, and YOLOv11n in core detection metrics such as Precision, Recall, and mAP@50. This result demonstrates that by introducing a linear attention-based SDIT module and element-level fusion (Hadamard product) in the multi-scale feature fusion stage to achieve multi-scale detail-semantic co-injection, the overall detection performance of multi-scale targets, especially small targets, in power grid operation scenarios can be effectively improved without significantly increasing computational burden.

[0141] Table 1 Performance comparison of different lightweight object detection algorithms on the power grid operation scenario dataset

[0142] Algorithm model Precision (%) Recall (%) mAP@50 (%) Parameters GFLOPs MobileNetV3 88.9 85.4 88.1 4210000 7.5 GhostNet 87.6 85.9 88.7 3620000 6.2 ShuffleNetV2 90.8 84.7 88.5 3780000 6.5 YOLOv11n 91.0 88.1 90.5 5020000 9.0 The present invention 91.5 89.0 91.4 5350000 9.8

[0143] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A target detection method for power grid operation scenarios based on multi-scale linear attention, characterized in that, Includes the following steps: Step 1: Collect and label power grid operation scenario data, divide the data into training, validation, and test sets, and complete the formatting processing required for training; Step 2: Based on YOLOv11n, replace the Concat module with the SDIT module in the Neck layer. The SDIT module adopts adaptive spatial alignment, smooth convolutional mapping and element-level injection fusion to achieve stable fusion of features of different scales under a unified spatial scale. The Neck layer outputs the fused three-way scale branch features. Step 3: The three-scale branch features output in Step 2 are directly input into the SEAM module. The SEAM module introduces a spatial-channel hybrid mapping structure based on an exponential enhancement mechanism to perform nonlinear recalibration on the features of different channels to obtain enhanced multi-scale features, which are then sent to the detection head to complete the multi-scale target detection output. Step 4: Train the improved YOLOv11n model, perform inference evaluation on the partitioned test set, output and statistically analyze the detection performance indicators to obtain the model performance evaluation results.

2. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 1, characterized in that, The specific method for step 1 is as follows: Step 1.1: Collect monitoring video or image data of power grid operation scenarios. The power grid operation scenarios include, but are not limited to, transmission line inspection, substation maintenance, high-altitude live-line work, and collaborative operation scenarios of work vehicles; extract images containing work personnel, work vehicles, or power grid equipment targets as the original power grid operation scenario dataset, denoted as EData. Step 1.2: Manually annotate a portion of the images in EData. Use a target annotation tool to annotate the detected targets in the images with rectangular bounding boxes and assign category labels to them, forming a set of annotated samples with location and category information; Step 1.3: Based on the labeled samples from Step 1.2, perform preliminary training on the target detection baseline network to obtain model weights; use the model weights in conjunction with the automatic labeling script to automatically label the remaining unlabeled images, and manually verify and correct the automatic labeling results to obtain a complete labeled dataset; Step 1.4: Divide the complete labeled dataset into training set, validation set and test set according to the preset ratio; Step 1.5: Convert the image and its annotation information into the data format required for training the object detection network, and perform size normalization and necessary data augmentation on the input image.

3. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 1, characterized in that, The specific process of the Neck layer is as follows: The output features of the C2PSA module in the backbone network are upsampled and then input together with the output features of the third C3k2 module in the backbone network into the first SDIT module for processing. The output features of the first SDIT module are processed by the fifth C3k2 module in the Neck layer and upsampled, then input together with the second C3k2 module in the backbone network into the second SDIT module for processing. The output features of the second SDIT module are processed by the sixth C3k2 module in the Neck layer and then by the Conv module, then input together with the features processed by the fifth C3k2 module into the third SDIT module for processing. The output features of the third SDIT module are processed by the seventh C3k2 module in the Neck layer and then by the Conv module, then input together with the features processed by the C2PSA module into the fourth SDIT module for processing. The features processed by the fourth SDIT module are then input into the eighth C3k2 module in the Neck layer. The features processed by the sixth, seventh, and eighth C3k2 modules are used as the output features of the three-way scale branches of the Neck layer.

4. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 1, characterized in that, The SDIT module enhances the spatial attention and channel attention of the two input features involved in the fusion along two isomorphic branches, and performs channel compression through 1×1 convolution. Then, Adaptive Scale Alignment (ASA) is introduced to align the spatial dimensions of the two features to the anchor point dimensions. The two features are then subjected to smooth convolution denoising and linear attention modeling to enhance local details and global contextual dependencies. Finally, the Hadamard product is used to perform element-wise fusion of the two features to obtain the fused output features.

5. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 4, characterized in that, The specific execution process of the SDIT module is as follows: Step 2.1: At each fusion node in the Neck layer, the two input features involved in the fusion are used as SDIT instances. The input, denoted as ,in Assign an SDIT instance number, For the first instance The two input features are numbered; each input feature corresponds to one of the two input branches of the fusion node. Step 2.2: On any SDIT instance Inside, for the first Road input features Spatial attention and channel attention enhancements are performed sequentially to obtain enhanced features. : ; in, For spatial attention operations, For channel attention operations; Step 2.3: Perform the following steps on the attention-enhanced features: Convolutional dimensionality reduction reduces computational cost while preserving key information, resulting in: ; Step 2.4: Introduce adaptive scale alignment (ASA) within SDIT, preferably based on the spatial dimensions of the anchor branch. As the target alignment size, according to Space dimensions and The relationship between adaptive ASA resampling alignment and invariance is used to obtain alignment features. : ; in, This represents an adaptive scale alignment operation used to resample the input feature map to the target space size. Its implementation methods include interpolation upsampling, pooling / stretch convolution downsampling, or a combination thereof; For the first Within the first SDIT instance Road features Space dimensions, Align the target size; Step 2.5: The aligned features are further smoothed by convolution to reduce noise and enhance local detail representation. ; in, Preferred Smooth convolution mapping; Step 2.6: Introduce linear attention operations on each feature within SDIT: ; Step 2.7: Obtain the fused output of the SDIT instance using the Hadamard product form: ; in, Represents element-wise product. For the first The fused output feature map of SDIT instances.

6. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 1, characterized in that, The SEAM module enhances both local spatial context and channel interaction capabilities through a residual combination of depthwise separable convolutions and 1×1 convolutions. It then performs global average pooling on the enhanced features to obtain channel-level global responses, generates channel weights through a lightweight two-layer mapping network, and further amplifies channel differences using an exponential enhancement mechanism. Finally, it uses the exponentially enhanced channel weights to perform channel-by-channel recalibration on the input features, obtaining enhanced multi-scale features, which are then fed into Small, Medium, and Large detection heads to complete multi-scale target detection outputs.

7. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 4, characterized in that, The specific process of the SEAM module is as follows: Step 3.1: Output features from the three-path scale branches obtained from the Neck layer. It is directly fed into the SEAM module for spatial-channel adaptive enhancement processing; Step 3.2: For each input feature map Spatial-channel hybrid mapping (CSMM) is introduced to jointly model local spatial structure information and channel dependencies; CSMM first... Perform depthwise separable convolutions to extract local spatial context, then perform residual stacking with the original features, and then... Convolution enables channel interaction, and finally, nonlinear activation yields hybrid features. : ; in, Extracting operators for spatial context, For channel mixing operators, It is a non-linear activation function. The mixed feature map output by CSMM. These correspond to the Small, Medium, and Large scale branches, respectively. Step 3.3: To obtain mixed features In the current power grid operation scenario, the global response intensity is subjected to global average pooling in the spatial dimension to generate a channel-level context description vector. : ; in, For the first Spatial dimensions of road feature map Number of channels; Step 3.4: Convert the channel-level context description vector Input channel expansion / compression mapping to generate initial channel weights. : ; in, For learnable mapping parameters, It is a non-linear activation function. For the Sigmoid function; Step 3.5: Set the initial channel weights Perform exponential augmentation mapping to obtain the exponential augmentation channel weights. : ; in, The exponential enhancement coefficient is denoted as . Reshaping yields the weight tensor ; Step 3.6: Utilize the exponentially augmented weight tensor Scale branch features of the input Perform channel-by-channel adaptive recalibration to obtain the SEAM output feature map. : ; in, This represents element-wise multiplication and is broadcast across spatial dimensions. This is the feature map after SEAM recalibration; Step 3.7: Assign branches corresponding to different scales Input the corresponding scale detection head for classification and regression prediction to complete the multi-scale target detection output.

8. The target detection method for power grid operation scenarios based on multi-scale linear attention according to claim 1, characterized in that, The training process in step 4 is as follows: Step 4.1: Read the training set images in batches according to the preset input size and input them into the improved YOLOv11n model. Perform forward propagation and output the prediction results of the detection heads at each scale. The prediction results include at least the target category prediction, confidence prediction and target bounding box regression prediction information. Step 4.2: Match the prediction results with the corresponding real annotation information in the training set, construct the target detection training loss function and calculate the loss value; the loss function includes at least: classification loss for measuring class discrimination error, bounding box regression loss for measuring target position and size error, and confidence loss for measuring the existence of foreground, background or target, so as to realize joint constraints on the output of multi-scale detection head; Step 4.3: Based on the loss function, use the backpropagation algorithm to calculate the gradient information of the loss function with respect to each learnable parameter in the improved YOLOv11n model; the learnable parameters include at least the YOLOv11n baseline network parameters, SDIT module parameters, and SEAM module parameters; Step 4.4: Use an adaptive optimization method based on gradient descent to update the model parameters according to the gradient information in order to minimize the target detection training loss function; Step 4.5: Repeat the training iteration process and periodically evaluate and fine-tune the model on the validation set until the model reaches convergence or reaches the preset number of training rounds, thus obtaining the improved target detection model after training.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed, it is used to implement the target detection method for power grid operation scenarios based on multi-scale linear attention as described in any one of claims 1 to 8.