Power transmission equipment small target detection method and system based on attention mechanism

By introducing the MPGAM module into the Neck network of the YOLOv8 model, the problems of low accuracy and susceptibility to interference in the detection of small targets in the power industry by traditional YOLOv8 are solved, the detection accuracy and robustness are improved, and it is suitable for power line inspection tasks.

CN120877058APending Publication Date: 2025-10-31SHANDONG LUNENG SOFTWARE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510810764.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Traditional YOLOv8 models suffer from low detection accuracy, susceptibility to interference from complex backgrounds, and lack of scene-specific learning in small target detection in the power industry, leading to frequent missed detections and false detections.

Method used

A multi-scale electrically guided attention module (MPGAM) is introduced into the P3 layer of the Neck network. Through max pooling, average pooling, multilayer perceptron, self-attention mechanism and convolution operation, the attention mechanism of the feature map is enhanced, thereby improving the accuracy and robustness of small object detection.

Benefits of technology

It significantly improves the accuracy and stability of small target detection in complex backgrounds, enhances the feature extraction and expression capabilities of small targets on power lines, and is suitable for tasks such as power line inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120877058A_ABST
    Figure CN120877058A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of small target detection and recognition in images in the power industry, and provides a power transmission equipment small target detection method and system based on an attention mechanism. The method comprises the following steps: acquiring a power transmission equipment image, and obtaining a first power transmission equipment feature map by adopting a backbone network; based on the first power transmission equipment feature map, adopting a neck network to obtain a small target feature map; based on the small target feature map, adopting a detection head network to obtain the category of the small target of the power transmission equipment; wherein an MPGAM module is introduced into the output end of a P3 layer of the neck network, and a second power transmission equipment feature map is generated in the P3 layer; and based on the second power transmission equipment feature map, obtaining a third power transmission equipment feature map by adopting an MPGAM module, and obtaining a small target feature map through a neck network. The small target detection accuracy of the power transmission equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of small target detection and recognition technology in images of the power industry, and in particular to a method and system for small target detection of power transmission equipment based on an attention mechanism. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Traditional YOLOv8 models include a Feature Pyramid Network (FPN) and a Path Aggregation Network (PAN) in their Neck network. These enhance the expressive power of the feature maps through top-down and bottom-up paths. However, due to the lack of an attention mechanism, they perform poorly in detecting small targets on the feature maps and are easily affected by complex background information. Therefore, when traditional YOLOv8 models are applied to small target detection scenarios in power transmission equipment, the following problems exist:

[0004] 1. The accuracy of small target detection is difficult to guarantee. Because small targets such as power transmission equipment have a low pixel ratio and inconspicuous features in the image, traditional YOLOv8 is prone to missed detections or false detections.

[0005] 2. Small targets in power industry images are often in complex scenes. Traditional YOLOv8 has difficulty accurately identifying and locating small targets in power industry images due to the presence of many occluded and overlapping objects, as well as complex backgrounds and variable lighting.

[0006] 3. Traditional YOLOv8 is mostly trained on general datasets and lacks learning from specific scene samples, which affects the accuracy of detection and classification when facing special scenarios. Summary of the Invention

[0007] This invention provides a method and system for detecting small targets in power transmission equipment based on an attention mechanism. It employs an improved YOLOv8 model, which is more suitable for training on power line datasets, thus addressing the problems of missed detections and low detection accuracy of traditional YOLOv8 in power line small target detection. By integrating an attention mechanism, this invention allows the model to focus on the features of small targets on power lines, enhancing its feature extraction and representation capabilities, improving the accuracy and stability of small target detection, and ensuring the efficient conduct of power line inspections and other related work.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] The first aspect of the present invention provides a method for detecting small targets in power transmission equipment based on an attention mechanism.

[0010] A method for detecting small targets in power transmission equipment based on an attention mechanism, comprising:

[0011] Images of power transmission equipment are acquired, and a backbone network is used to obtain the first feature map of the power transmission equipment.

[0012] Based on the feature map of the first power transmission equipment, a neck network is used to obtain the feature map of the small target;

[0013] Based on the feature map of small targets, a detection head network is used to obtain the category of small targets in power transmission equipment;

[0014] Specifically, an MPGAM module is introduced at the output of the P3 layer of the neck network to generate a second power transmission equipment feature map at the P3 layer; based on the second power transmission equipment feature map, the MPGAM module is used to obtain a third power transmission equipment feature map, which is then passed through the neck network to obtain a small target feature map.

[0015] Furthermore, the processing procedure of the MPGAM module includes:

[0016] Max pooling and average pooling operations are performed on the feature map of the second power transmission equipment to obtain the first global feature description map and the second global feature description map.

[0017] The first global feature description map and the second global feature description map are respectively input into a shared multilayer perceptron to obtain the first relation feature map and the second relation feature map respectively; based on the first relation feature map and the second relation feature map, an attention weight map is generated; the attention weight map is multiplied with the second power transmission equipment feature map to obtain the first weighted feature map;

[0018] The first global feature map and the second global feature map are concatenated along the channel dimension and then fused with the first weighted feature map to obtain the fused feature map.

[0019] The fused feature map is processed sequentially by average pooling, self-attention mechanism, convolution and activation function to obtain spatial attention weight map;

[0020] The spatial attention weight map is multiplied sequentially with the second power transmission equipment feature map, the first weighted feature map, and the fused feature map to obtain the third power transmission equipment feature map.

[0021] Furthermore, the fused feature map is sequentially processed by average pooling, self-attention mechanism, convolution, and activation function to obtain a spatial attention weight map; the method includes:

[0022] The fused feature map is then processed by an average pooling operation and input into the self-attention mechanism module to obtain the self-attention output feature map.

[0023] The self-attention output feature map is input into the ConvModule convolutional module to extract local spatial features and integrate the context to obtain the convolutional feature map;

[0024] The convolutional feature map is activated by the Sigmoid function to generate a spatial attention weight map.

[0025] Furthermore, the method involves sequentially multiplying the spatial attention weight map with the second power transmission equipment feature map, the first weighted feature map, and the fused feature map to obtain the third power transmission equipment feature map; the method includes:

[0026] The spatial attention weight map is multiplied element-wise with the feature map of the second power transmission equipment to obtain the second weighted feature map;

[0027] The second weighted feature map is multiplied element-wise with the first weighted feature map and the fused feature map to obtain the third power transmission equipment feature map.

[0028] Furthermore, the small target feature map is obtained by passing the neck network; the method includes: using the PAN network in the neck network to fuse the feature maps from bottom to top to obtain the small target feature map.

[0029] Furthermore, the method of obtaining the category of small targets of power transmission equipment based on small target feature maps and using a detection head network includes: performing target classification, bounding box regression and confidence prediction on the small target feature maps to complete the target detection and instance segmentation tasks and obtain the category of small targets of power transmission equipment.

[0030] A second aspect of the present invention provides a small target detection system for power transmission equipment based on an attention mechanism.

[0031] A small target detection system for power transmission equipment based on an attention mechanism, comprising:

[0032] The backbone network module is configured to: acquire images of power transmission equipment, and use the backbone network to obtain a first feature map of the power transmission equipment;

[0033] The neck network module is configured to: obtain a small target feature map based on the feature map of the first power transmission equipment by using the neck network;

[0034] The detection head network module is configured to: obtain the category of small targets in power transmission equipment based on the feature map of small targets;

[0035] Specifically, an MPGAM module is introduced at the output of the P3 layer of the neck network to generate a second power transmission equipment feature map at the P3 layer; based on the second power transmission equipment feature map, the MPGAM module is used to obtain a third power transmission equipment feature map, which is then passed through the neck network to obtain a small target feature map.

[0036] A third aspect of the present invention provides a computer device comprising:

[0037] A processor, adapted to execute computer programs;

[0038] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the attention-based small target detection method for power transmission equipment as described in the first aspect above.

[0039] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and to execute steps in the attention-based small target detection method for power transmission equipment as described in the first aspect above.

[0040] The fifth aspect of the present invention provides a computer program product or computer program.

[0041] This invention provides a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the attention-based small target detection method for power transmission equipment as described in the first aspect above.

[0042] Compared with the prior art, the beneficial effects of the present invention are:

[0043] To address the shortcomings of traditional YOLOv8 models in power line image detection, such as poor accuracy in capturing small target features, this invention provides a YOLOv8 model that incorporates an attention mechanism, improving both the accuracy and speed of power line asset detection datasets dominated by small targets.

[0044] While the traditional YOLOv8 model's Neck layer possesses FPN and PAN structures, enabling multi-level feature fusion, it fails to fully exploit the saliency of features across different regions and channels. This makes it particularly susceptible to background interference in small target detection, leading to decreased accuracy. To address this, this invention proposes an improved YOLOv8 network structure incorporating MPGAM (Multi-scale Power-Guided Attention Mudule). An MPGAM module is introduced into the P3 branch of the Neck, leveraging multi-pooling feature enhancement and a global attention mechanism to improve the discriminative power of low-level detail features. Based on the input feature map P3', this module sequentially employs channel attention and a global attention mechanism that fuses location information, effectively highlighting key target regions and improving the accuracy and robustness of detecting small targets such as power transmission equipment. The MPGAM structure is lightweight and efficient, making it suitable for small target detection tasks involving power transmission equipment in complex backgrounds. Attached Figure Description

[0045] The accompanying drawings, which form part of this invention, 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 improper limitation of the invention.

[0046] Figure 1 This is a flowchart illustrating a small target detection method for power transmission equipment based on an attention mechanism, as shown in an embodiment of the present invention.

[0047] Figure 2 This is a structural diagram of the improved YOLOv8 model shown in an embodiment of the present invention;

[0048] Figure 3 This is a structural diagram of the MPGAM module shown in an embodiment of the present invention;

[0049] Figure 4 This is a structural diagram of a small target detection system for power transmission equipment based on an attention mechanism, as shown in an embodiment of the present invention.

[0050] Figure 5 This is a structural diagram of a computer device shown in an embodiment of the present invention. Detailed Implementation

[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0052] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0053] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0054] To facilitate understanding of the technical solutions of this invention, some technical terms involved in this invention will be introduced below.

[0055] YOLOv8 is an advanced target detection technology that uses a high-efficiency neural network architecture to quickly process image or video data. It features fast detection speed, high accuracy, and strong adaptability to multi-scale targets, expanding its applications in industrial inspection, remote sensing image analysis, and other fields, and has become one of the most influential technologies in the current target detection field.

[0056] Based on this, this embodiment discloses a small target detection method for power transmission equipment based on an attention mechanism. This embodiment integrates the MPGAM module into the traditional YOLOv8 model. The traditional YOLOv8 model is introduced below. The model includes a backbone network, a neck network, and a head.

[0057] The backbone network includes a feature extraction module, a downsampling module, a feature integration module, and a C2f module.

[0058] Feature extraction involves extracting basic image features, such as low-level features like edges and textures, through multi-layer convolution operations to form feature maps.

[0059] The downsampling module uses convolution or pooling operations to reduce the resolution of feature maps, thereby reducing computational load and increasing the receptive field to obtain more global image information.

[0060] The feature integration module, with the help of C2f structure and other technologies, enhances feature propagation and fusion while reducing the amount of computation, thereby improving the efficiency of feature extraction.

[0061] The C2f module, CSP Bottleneck with 2-Fusion (or CSPlayer_2Conv, CSP bottleneck module with dual fusion), employs a partial feature copying and dual fusion mechanism to fully integrate features at different levels, thereby improving feature utilization efficiency.

[0062] The neck network includes a feature fusion module and a feature refinement module.

[0063] The feature fusion module uses FPN and its variants to upsample, downsample and stitch together feature maps from different levels of the backbone network, fusing multi-scale features and taking into account both large and small target detection.

[0064] The feature refinement module further refines the fused features through convolution operations, enhancing the feature representation capability and highlighting features relevant to object detection.

[0065] The detection head includes a classification prediction module and a localization regression module.

[0066] The classification prediction module predicts the probability that each detection region contains different target categories based on the features output by the neck network, and determines the category to which the target belongs.

[0067] The localization and regression module regresses the bounding box coordinates of each detection region to determine the position and size of the target in the image.

[0068] Based on the traditional YOLOv8 model described above, this invention proposes a method for small target detection in power transmission equipment by integrating the MPGAM module into the traditional YOLOv8 model. Figure 1 This is a flowchart illustrating the attention mechanism-based small target detection method for power transmission equipment according to the present invention. The method includes:

[0069] Images of power transmission equipment are acquired, and a backbone network is used to obtain the first feature map of the power transmission equipment.

[0070] Based on the feature map of the first power transmission equipment, a neck network is used to obtain the feature map of the small target;

[0071] Based on the feature map of small targets, a detection head network is used to obtain the category of small targets in power transmission equipment;

[0072] Specifically, an MPGAM module is introduced at the output of the P3 layer of the neck network to generate a second power transmission equipment feature map at the P3 layer; based on the second power transmission equipment feature map, the MPGAM module is used to obtain a third power transmission equipment feature map, which is then passed through the neck network to obtain a small target feature map.

[0073] The improved YOLOv8 network structure proposed in this invention significantly enhances the model's sensitivity and discrimination ability to small targets (such as insulators, connectors, and small defects) in complex backgrounds by introducing the MPGAM module into the P3 branch. It also enhances the modeling effect on multi-scale features of power transmission equipment and has important application value in terms of small target detection accuracy and robustness in actual power transmission line inspection.

[0074] Figure 2 This is a structural diagram of the improved YOLOv8 model shown in an embodiment of the present invention. The small target detection method for power transmission equipment based on the attention mechanism described in this embodiment may include:

[0075] Step 1 Feature Extraction Stage: After the original image is input, it first goes through the Backbone network for multiple convolution operations to extract feature information and obtain the feature map of the first power transmission equipment.

[0076] Step 2 Feature Enhancement Stage: In the Neck network, deep information is upsampled through the FPN structure and concatenated with the information of the previous layer before being input into the C2f module. P3' feature information, i.e. the feature map of the second power transmission equipment, is generated in the P3 layer and used as the input of the MPGAM module.

[0077] Step 3 Feature optimization stage (attention processing stage), such as Figure 3 As shown:

[0078] Step 3.1 Feature compression and global modeling:

[0079] The scale of the feature map of the second power transmission equipment is: Where C is the number of channels and H×W is the spatial dimension.

[0080] Max pooling and average pooling operations are performed on the input feature map of the second power transmission equipment to obtain the first global feature description map F. max Second global feature description map F avg These are used to enhance the information representation capabilities between channels.

[0081]

[0082] Step 3.2 Attention weight calculation:

[0083] The outputs of max pooling and average pooling are respectively input into a shared multilayer perceptron (MLP) to extract the contextual relationships in the channel dimension, thus obtaining the first relational feature maps. max Second Relationship Feature Map avg ;

[0084]

[0085] Channel attention weight map M is generated after the Sigmoid activation function. c The weighted feature map is then multiplied element-wise with the original input F to obtain the first weighted feature map F. channel .

[0086] M c =σ(W max +W avg )

[0087]

[0088] Step 3.3 Information Fusion Enhancement:

[0089] The feature maps resulting from max pooling and average pooling are concatenated along the channel dimension and then added to the weighted feature map from step 3.2 for fusion. This integrates channel enhancement information with the original feature information to obtain the fused feature map F. fused .

[0090] First global feature description map F max Second global feature description map F avg The features are concatenated along the channel dimension to generate a preliminary convolutional feature map F. concat ∈R2C×1×1, and compressed to C×1×1 by 1×1 convolution to obtain compressed convolutional feature map F' concat Then, it is compared with the first weighted feature map F. channel Adding them together yields the fused feature map F. fused :

[0091] F concat=Concat(F max ,F avg )

[0092]

[0093] F fused =F channel +F′ concat

[0094] Step 3.4 Context Capture and Spatial Modeling:

[0095] After undergoing an average pooling operation to further compress spatial dimensionality information, the fused feature map is input into the SimpleSelf Attention module to model long-distance dependencies and improve region perception capabilities.

[0096] For F fused After performing global average pooling and compressing the spatial dimensions, the input is given to the Simple Self-Attention module:

[0097]

[0098] Q = Linear(F) pool ), K = Linear(F) pool ), V = Linear(F pool )

[0099]

[0100] Among them, F pool This represents the fused feature map after one average pooling operation, where Q represents the query vector, K represents the key vector, and V represents the value vector; Attention represents the self-attention output feature map.

[0101] Step 3.5 Local Feature Extraction and Spatial Weight Generation:

[0102] The self-attention output features are input into the ConvModule convolutional module (which includes convolution, BN, and activation functions) to extract local spatial features and integrate the context. Then, the spatial attention weight map Ms is generated by activating the Sigmoid function.

[0103]

[0104] M s =σ(F conv )

[0105] Among them, F conv This represents the convolutional feature map.

[0106] Step 3.6 Output of multiple weight stacking:

[0107] The spatial attention weight map is then multiplied element-wise with the feature maps from steps 3 and 2, achieving dual spatial and channel enhancement. Finally, it is multiplied element-wise with the original input P3' feature map, multiplying the spatial weight Ms with the fused features, channel features, and the original input in stages to output the final feature map optimized by MPGAM.

[0108]

[0109] Among them, F spatial F represents the second weighted feature map. final This represents a feature diagram of the third power transmission equipment.

[0110] Step 3.7 Downstream task application:

[0111] Output optimized feature map E final The input is fed into subsequent modules of the YOLOv8 Neck layer (such as C2f) to continue participating in multi-scale feature fusion and target detection tasks, especially enhancing the ability to express detailed features in small targets and complex backgrounds.

[0112] Step 4 Feature Fusion Stage: Use the PAN network to fuse multi-scale features from bottom to top, enhance the expressive power of the low-level features processed by the MPGAM module, and further improve the model's ability to perceive small targets.

[0113] Step 5: Target prediction stage: Input the multi-scale features provided by the Neck layer into the detection head to perform target classification, bounding box regression, and confidence prediction, ultimately completing the target detection and instance segmentation tasks.

[0114] This invention relates to an attention-based method for detecting small targets in power equipment, which has broad application scenarios and practical value. This technology can be widely applied in smart grid operation and maintenance, substation safety monitoring, drone inspections, and automated power facility inspections. During transmission line inspections, the system can collect image data using drones or fixed cameras to automatically identify and detect the status of small critical components such as insulators, vibration dampers, and clamps. Within substations, it can be used for high-precision positioning and anomaly identification of tiny targets such as grounding terminals, surge arresters, and disconnector contacts. By introducing an attention mechanism, the model can effectively focus on key areas under complex backgrounds and multiple interference conditions, significantly improving the detection accuracy and robustness of small targets, thus meeting the power system's needs for real-time perception and intelligent diagnosis of equipment operating status.

[0115] In the specific implementation process, an image dataset containing various power equipment and their key components is first constructed, and the images undergo preprocessing operations, including size normalization, contrast enhancement, and noise suppression. Then, a deep convolutional neural network is used as the basic architecture, embedding an attention mechanism module to enhance the model's ability to focus on important feature regions in the images. During the training phase, through learning from a large number of labeled samples, the model acquires the ability to extract discriminative features from small-scale targets. In the deployment phase, the image to be detected is input into the trained model, and the attention mechanism adaptively selects regions of interest that may contain small targets. Combined with a multi-scale feature fusion strategy, refined detection is performed, ultimately outputting the target location and category information. The system can be integrated into existing power operation and maintenance platforms to achieve automated monitoring and early warning of the operating status of power equipment, contributing to improving the safety and intelligence level of power system operation.

[0116] This invention introduces a dual-branch feature extraction approach using max pooling and average pooling. It extracts non-linear relationships through MLP and generates channel weights using sigmoid, effectively enhancing the response of key feature channels. After concatenating channels to enhance features, the invention introduces global average pooling and a simple self-attention mechanism, combined with a convolutional module (ConvModule) to achieve spatial attention extraction, outputting a spatial weight map with greater global perception. Furthermore, the invention employs three element-wise multiplication operations to strengthen feature representation in stages, optimizing P3' features from three perspectives: channel, position, and fusion, significantly improving the accuracy of small target recognition for power transmission equipment. This module has a high efficiency structure, a small number of parameters, and maintains a speed advantage while improving model detection performance.

[0117] The MPGAM module designed in this invention fully considers the balance between accuracy and efficiency, and adopts a lightweight convolution module and a parallel attention modeling structure to ensure that the performance of small target detection is improved while maintaining the model inference speed. It is suitable for power transmission equipment inspection tasks with high real-time requirements.

[0118] The above combination Figure 1 The attention-based small target detection method for power transmission equipment provided in the embodiments of the present invention has been described in detail. Next, the attention-based small target detection system for power transmission equipment provided in the embodiments of the present invention will be described in conjunction with the accompanying drawings.

[0119] Figure 4 This is a schematic diagram of the structure of a small target detection system for power transmission equipment based on an attention mechanism, as shown in an embodiment of the present invention. Figure 4 The system described in this invention includes:

[0120] The backbone network module is configured to: acquire images of power transmission equipment, and use the backbone network to obtain a first feature map of the power transmission equipment;

[0121] The neck network module is configured to: obtain a small target feature map based on the feature map of the first power transmission equipment by using the neck network;

[0122] The detection head network module is configured to: obtain the category of small targets in power transmission equipment based on the feature map of small targets;

[0123] Specifically, an MPGAM module is introduced at the output of the P3 layer of the neck network to generate a second power transmission equipment feature map at the P3 layer; based on the second power transmission equipment feature map, the MPGAM module is used to obtain a third power transmission equipment feature map, which is then passed through the neck network to obtain a small target feature map.

[0124] In some embodiments, the neck network module is specifically configured to: execute the processing procedures of the MPGAM module, including:

[0125] Max pooling and average pooling operations are performed on the feature map of the second power transmission equipment to obtain the first global feature description map and the second global feature description map.

[0126] The first global feature description map and the second global feature description map are respectively input into a shared multilayer perceptron to obtain the first relation feature map and the second relation feature map respectively; based on the first relation feature map and the second relation feature map, an attention weight map is generated; the attention weight map is multiplied with the second power transmission equipment feature map to obtain the first weighted feature map;

[0127] The first global feature map and the second global feature map are concatenated along the channel dimension and then fused with the first weighted feature map to obtain the fused feature map.

[0128] The fused feature map is fed into the self-attention mechanism module after a single average pooling operation to obtain the self-attention output feature map. The self-attention output feature map is then fed into the ConvModule convolution module to extract local spatial features and integrate the context to obtain the convolutional feature map. The convolutional feature map is activated by the Sigmoid function to generate the spatial attention weight map.

[0129] The spatial attention weight map is multiplied element-wise with the second power transmission equipment feature map to obtain the second weighted feature map; the second weighted feature map is then multiplied element-wise with the first weighted feature map and the fused feature map to obtain the third power transmission equipment feature map.

[0130] In some embodiments, the neck network module is further configured to: use the PAN network in the neck network to fuse feature maps from bottom to top to obtain a small target feature map.

[0131] In some embodiments, the detection head network module is specifically configured to: perform target classification, bounding box regression, and confidence prediction on the small target feature map to complete the target detection and instance segmentation tasks and obtain the category of small targets of power transmission equipment.

[0132] The small target detection system for power transmission equipment based on the attention mechanism according to embodiments of the present invention can correspond to the execution of the method described in the embodiments of the present invention, and the above and other operations and / or functions of each module of the small target detection system for power transmission equipment based on the attention mechanism are respectively for implementing Figure 1 For the sake of brevity, the corresponding processes of each method in the code will not be elaborated here.

[0133] See Figure 5 The diagram shows the structure of a computer device, which includes a processor, a communication interface, and a computer-readable storage medium. The processor, communication interface, and computer-readable storage medium are connected via a bus or other means. The communication interface is used to receive and send data. The computer-readable storage medium can be stored in the computer device's memory. The computer-readable storage medium stores computer programs, including program instructions, and the processor executes the program instructions stored in the computer-readable storage medium. The processor (or CPU, Central Processing Unit) is the computing and control core of the computer device, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement the corresponding steps in the embodiment of the attention-based small target detection method for power transmission equipment.

[0134] This embodiment provides a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the processing system of the computer device.

[0135] Furthermore, this storage space also contains one or more instructions suitable for loading and execution by the processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM memory or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0136] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the above-described embodiment of the attention-based small target detection method for power transmission equipment.

[0137] This embodiment provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding steps in the above-described embodiment of the attention-based small target detection method for power transmission equipment.

[0138] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0139] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0142] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0143] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting small targets in power transmission equipment based on an attention mechanism, characterized in that, include: Images of power transmission equipment are acquired, and a backbone network is used to obtain the first feature map of the power transmission equipment. Based on the feature map of the first power transmission equipment, a neck network is used to obtain the feature map of the small target; Based on the feature map of small targets, a detection head network is used to obtain the category of small targets in power transmission equipment; Specifically, an MPGAM module is introduced at the output of the P3 layer of the neck network to generate a second power transmission equipment feature map at the P3 layer; based on the second power transmission equipment feature map, the MPGAM module is used to obtain a third power transmission equipment feature map, which is then passed through the neck network to obtain a small target feature map.

2. The method for detecting small targets in power transmission equipment based on an attention mechanism according to claim 1, characterized in that, The processing procedure of the MPGAM module includes: Max pooling and average pooling operations are performed on the feature map of the second power transmission equipment to obtain the first global feature description map and the second global feature description map. The first global feature description map and the second global feature description map are respectively input into a shared multilayer perceptron to obtain the first relation feature map and the second relation feature map respectively; based on the first relation feature map and the second relation feature map, an attention weight map is generated; the attention weight map is multiplied with the second power transmission equipment feature map to obtain the first weighted feature map; The first global feature map and the second global feature map are concatenated along the channel dimension and then fused with the first weighted feature map to obtain the fused feature map. The fused feature map is processed sequentially by average pooling, self-attention mechanism, convolution and activation function to obtain spatial attention weight map; The spatial attention weight map is multiplied sequentially with the second power transmission equipment feature map, the first weighted feature map, and the fused feature map to obtain the third power transmission equipment feature map.

3. The method for detecting small targets in power transmission equipment based on an attention mechanism according to claim 2, characterized in that, The fused feature map is sequentially processed by average pooling, self-attention mechanism, convolution, and activation function to obtain a spatial attention weight map; the method includes: The fused feature map is then processed by an average pooling operation and input into the self-attention mechanism module to obtain the self-attention output feature map. The self-attention output feature map is input into the ConvModule convolutional module to extract local spatial features and integrate the context to obtain the convolutional feature map; The convolutional feature map is activated by the Sigmoid function to generate a spatial attention weight map.

4. The method for detecting small targets in power transmission equipment based on an attention mechanism according to claim 2, characterized in that, The method involves sequentially multiplying the spatial attention weight map with the second power transmission equipment feature map, the first weighted feature map, and the fused feature map to obtain the third power transmission equipment feature map; the method includes: The spatial attention weight map is multiplied element-wise with the feature map of the second power transmission equipment to obtain the second weighted feature map; The second weighted feature map is multiplied element-wise with the first weighted feature map and the fused feature map to obtain the third power transmission equipment feature map.

5. The method for detecting small targets in power transmission equipment based on an attention mechanism according to claim 1, characterized in that, The method involves using the neck network to obtain a small target feature map. The method includes: using the PAN network in the neck network to fuse the feature maps from bottom to top to obtain the small target feature map.

6. The method for detecting small targets in power transmission equipment based on an attention mechanism according to claim 1, characterized in that, The method involves using a detection head network based on small target feature maps to obtain the categories of small targets in power transmission equipment. The method includes: performing target classification, bounding box regression, and confidence prediction on the small target feature maps to complete the target detection and instance segmentation tasks, thereby obtaining the categories of small targets in power transmission equipment.

7. A small target detection system for power transmission equipment based on an attention mechanism, characterized in that, include: The backbone network module is configured to: acquire images of power transmission equipment, and use the backbone network to obtain a first feature map of the power transmission equipment; The neck network module is configured to: obtain a small target feature map based on the feature map of the first power transmission equipment by using the neck network; The detection head network module is configured to: obtain the category of small targets in power transmission equipment based on the feature map of small targets; Specifically, an MPGAM module is introduced at the output of the P3 layer of the neck network to generate a second power transmission equipment feature map at the P3 layer; based on the second power transmission equipment feature map, the MPGAM module is used to obtain a third power transmission equipment feature map, which is then passed through the neck network to obtain a small target feature map.

8. A computer device, characterized in that, A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the steps of the attention-based small target detection method for power transmission equipment as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and to execute the steps of the attention-based small target detection method for power transmission equipment as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps in the attention-based small target detection method for power transmission equipment as described in any one of claims 1-6.