UAV transmission line target detection method, computer device, medium, and product
By blocking the aerial images of the drone transmission line and interactively fusion of channel and spatial information, a fusion attention weight map is generated and weighted, the problems of inaccurate and incomplete detection in the existing technology are solved, and more efficient target detection and positioning are achieved.
Patent Information
- Application Number
- CN202411919182.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The prior art has problems of inaccurate and incomplete detection in the target detection of drone transmission lines, especially when background noise is complex and target characteristics are small.
By blocking the aerial image, the channel information and spatial information are extracted and interactively integrated, the fusion attention weight map is generated, and the target feature map is generated through weighting processing, and the target category and position information in the transmission line are finally obtained based on the target fusion feature map.
It improves the accuracy and comprehensiveness of target detection, can more accurately identify and locate targets in transmission lines, enhances the detection ability of small targets, and reduces the impact of background noise.
Smart Images

Figure CN119360005B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image detection technology, and in particular to a method, computer device, medium, and product for detecting a target of a power transmission line of an unmanned aerial vehicle. Background Art
[0002] In power inspections, drones replace manual high-altitude operations to conduct aerial inspections of fault areas in power lines. However, drone photography is usually at a certain height, and the target objects in the power lines are small in scale and large in number, resulting in the acquired aerial images often facing challenges such as complex background noise and tiny target features, which seriously affects the accuracy of target detection.
[0003] In the existing technology, an attention mechanism is usually used to process aerial images. Existing channel attention mechanisms such as SE (Squeeze-and-Excitation) and ECA (Efficient Channel Attention) only consider the global relationship between channels and ignore the spatial information of each channel, resulting in incomplete and inaccurate detection information.
[0004] Although plug-and-play attention mechanism modules such as CBAM (Convolutional Block Attention Module) take spatial information into account, they compress feature information globally, resulting in serious information loss, especially for small targets, which are easily masked by background noise. In addition, CBAM calculates channel attention and spatial attention independently, without fully considering the correlation between channel information and spatial information, resulting in incomplete and inaccurate detection information. Summary of the invention
[0005] In view of this, the embodiments of the present disclosure provide a method, computer device, medium, and product for detecting power line targets using a drone, which can solve the problems of inaccurate and incomplete detection in the prior art.
[0006] In a first aspect, the present disclosure provides a method for detecting a target on a power transmission line of a UAV, which specifically includes the following contents:
[0007] The aerial image of the power transmission line is processed into blocks to obtain an initial feature map, wherein the initial feature map includes a plurality of sub-block images with the same size dimension;
[0008] Processing the initial feature map based on a first preset strategy to obtain a first-level feature map;
[0009] Processing the first-level feature map based on a second preset strategy to obtain a second-level feature map;
[0010] Extracting first channel information and first spatial information from the first hierarchical feature map, and interactively fusing the first channel information and the first spatial information to obtain a first fused attention weight map; performing weighted processing on the first fused attention weight map and the first hierarchical feature map to obtain a first target feature map;
[0011] Extracting second channel information and second spatial information from the second-level feature map, and interactively fusing the second channel information and the second spatial information to obtain a second fused attention weight map; performing weighted processing on the second fused attention weight map and the second-level feature map to obtain a second target feature map;
[0012] Processing the second target feature map to obtain a processed feature map having the same size as the first target feature map, and adding the processed feature map to the first target feature map to obtain a target fusion feature map;
[0013] The target category and target location information in the transmission line are obtained based on the target fusion feature map.
[0014] Optionally, the processing the initial feature map based on the first preset strategy to obtain the first-level feature map includes:
[0015] Projecting the initial feature map to any dimension to obtain a projection feature map of the corresponding dimension;
[0016] Normalizing the projection feature map to obtain a first normalized feature map;
[0017] Perform window multi-head self-attention calculation on the first normalized feature map to obtain a first-level feature map.
[0018] Optionally, the processing the first-level feature map based on the second preset strategy to obtain the second-level feature map includes:
[0019] The height and width of the first-level feature map are halved and the depth is doubled to obtain a first updated feature map;
[0020] Normalizing the first updated feature map to obtain a second normalized feature map;
[0021] Perform sliding window multi-head self-attention calculation on the second normalized feature map to obtain a second-level feature map.
[0022] Optionally, the method for acquiring the first target feature map includes:
[0023] Performing average pooling on the first-level feature map in the channel dimension and the spatial dimension respectively to obtain a first spatial feature vector and first channel information;
[0024] Reshape the first spatial feature vector to obtain first spatial information;
[0025] Splicing the first channel information with the first spatial information to obtain a first splicing feature vector;
[0026] Performing spatial and channel interactions on the first concatenated feature vector by using a preset linear embedding function to obtain a first fused feature vector;
[0027] Segmenting the first fused feature vector to obtain a first spatial feature subset and a first channel feature subset;
[0028] Performing convolution operations on the first spatial feature subset and the first channel feature subset respectively to obtain a first spatial attention weight map and a first channel attention weight map;
[0029] Obtaining the weight of the first spatial attention weight map and the weight of the first channel attention weight map based on the Sigmoid function;
[0030] Fusing the first spatial attention weight map with the first channel attention weight map to obtain a first fused attention weight map;
[0031] Perform a dot multiplication process on the first fused attention weight map and the first hierarchical feature map to obtain a first target feature map.
[0032] Optionally, the method for acquiring the second target feature map includes:
[0033] Performing average pooling on the second-level feature map in the channel dimension and the spatial dimension respectively to obtain a second spatial feature vector and second channel information;
[0034] Reshape the second spatial feature vector to obtain second spatial information;
[0035] Splicing the second channel information with the second spatial information to obtain a second splicing feature vector;
[0036] Performing spatial and channel interactions on the second concatenated feature vector by using a preset linear embedding function to obtain a second fused feature vector;
[0037] Segmenting the second fused feature vector to obtain a second spatial feature subset and a second channel feature subset;
[0038] Performing convolution operations on the second spatial feature subset and the second channel feature subset respectively to obtain a second spatial attention weight map and a second channel attention weight map;
[0039] Obtaining the weight of the second spatial attention weight map and the weight of the second channel attention weight map based on the Sigmoid function;
[0040] Fusing the second spatial attention weight map with the second channel attention weight map to obtain a second fused attention weight map;
[0041] Perform a dot multiplication process on the second fused attention weight map and the second hierarchical feature map to obtain a second target feature map.
[0042] In a second aspect, the present application discloses a method for detecting a target of a UAV transmission line, comprising:
[0043] The aerial image of the power transmission line is processed into blocks to obtain an initial feature map, wherein the initial feature map includes a plurality of sub-block images with the same size dimension;
[0044] Processing the initial feature map based on a first extraction strategy to obtain a first-level feature map;
[0045] The first-level feature map is downsampled three times to obtain a second-level feature map, a third-level feature map, and a fourth-level feature map respectively;
[0046] Based on the channel space fusion strategy, the first-level feature map, the second-level feature map, the third-level feature map, and the fourth-level feature map are processed respectively to obtain a first fused attention weight map, a second fused attention weight map, a third fused attention weight map, and a fourth fused attention weight map;
[0047] Performing weighted processing on the first fused attention weight map and the first hierarchical feature map to obtain a first target feature map;
[0048] Performing weighted processing on the second fused attention weight map and the second hierarchical feature map to obtain a second target feature map;
[0049] Performing weighted processing on the third fused attention weight map and the third hierarchical feature map to obtain a third target feature map;
[0050] Performing weighted processing on the fourth fused attention weight map and the fourth hierarchical feature map to obtain a fourth target feature map;
[0051] Based on a multi-scale fusion strategy, the fourth target feature map, the third target feature map, the second target feature map, and the first target feature map are fused to obtain a target fused feature map;
[0052] The target category and target location information in the transmission line are obtained based on the target fusion feature map.
[0053] Optionally, the fourth target feature map, the third target feature map, the second target feature map, and the first target feature map are processed based on a multi-scale fusion strategy to obtain a target fusion feature map;
[0054] Processing the fourth target feature map to obtain a processed feature map having the same size as the third target feature map, recorded as a first processed feature map;
[0055] Adding the first processed feature map and the third target feature map element by element to obtain a first fused feature map;
[0056] Processing the first fused feature map to obtain a processed feature map having the same size as the second target feature map, recorded as a second processed feature map;
[0057] Adding the second processed feature map and the second target feature map element by element to obtain a second fused feature map;
[0058] Processing the second fused feature map to obtain a processed feature map having the same size as the first target feature map, recorded as a third processed feature map;
[0059] The third processed feature map is added element by element to the first target feature map to obtain a target fusion feature map.
[0060] In a third aspect, the embodiment of the present disclosure also provides a UAV power transmission line target detection system, which specifically includes the following contents:
[0061] A block division module is used to perform block processing on the aerial image of the power transmission line to obtain an initial feature map, wherein the initial feature map includes a plurality of sub-block images of the same size dimension;
[0062] A first-level feature map acquisition module is used to perform projection, normalization, and window multi-head self-attention calculation on the initial feature map to obtain a first-level feature map;
[0063] A second-level feature map acquisition module is used to perform spatial dimension compression, depth dimension expansion, normalization, and sliding window multi-head self-attention calculation on the first-level feature map to obtain a second-level feature map;
[0064] A first interactive module is used to extract first channel information and first spatial information from the first hierarchical feature map, and interactively fuse the first channel information and the first spatial information to obtain a first fused attention weight map; and perform weighted processing on the first fused attention weight map and the first hierarchical feature map to obtain a first target feature map;
[0065] A second interactive module is used to extract the second channel information and the second spatial information in the second-level feature map, and interactively fuse the second channel information and the second spatial information to obtain a second fused attention weight map; and perform weighted processing on the second fused attention weight map and the second-level feature map to obtain a second target feature map;
[0066] A fusion module, used for processing the second target feature map to obtain a processed feature map of the same size as the first target feature map, and adding the processed feature map to the first target feature map to obtain a target fused feature map;
[0067] The analysis module is used to obtain target category and target location information in the transmission line based on the target fusion feature map.
[0068] In a fourth aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:
[0069] The computer device comprises:
[0070] at least one processor; and,
[0071] a memory communicatively connected to the at least one processor; wherein,
[0072] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the above-mentioned UAV power transmission line target detection methods.
[0073] In a fifth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned UAV power transmission line target detection methods.
[0074] In a sixth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0075] The UAV power transmission line target detection method disclosed in the present application makes full use of the correlation between channel information and spatial information through multi-step processing and feature extraction. Specifically, the aerial image is divided into blocks to obtain the initial feature map, which helps to capture the local features in the image and provides a basis for subsequent feature extraction and processing; the local features in the image are further extracted and enhanced by projecting, normalizing, and performing window multi-head self-attention calculations on the initial feature map. This helps to capture the detailed information in the image; on the basis of the first-level feature map, further spatial dimension compression and depth dimension expansion are performed, and then the correlation between the spatial information and channel information of the feature map is further enhanced through sliding window multi-head self-attention calculations; the channel information and spatial information in the first-level feature map are extracted, and interactively fused to generate a first fused attention weight map. This fusion method can effectively combine channel information and spatial information to enhance the recognition ability of target features; the channel information and spatial information are extracted in the second-level feature map, and interactively fused to generate a second fused attention weight map, which further enhances the feature map. target information; through weighted processing, the fused attention weight map is combined with the corresponding feature map to generate the first and second target feature maps, which makes the feature map more focused on the target information and improves the detection accuracy; the second target feature map is processed and added element by element with the first target feature map, and the generated target fusion feature map integrates multi-level feature information, further enhancing the comprehensiveness and accuracy of target detection; based on the target fusion feature map, the target category and location information in the transmission line can be accurately identified. This multi-level and multi-step processing method fully considers the correlation between channel information and spatial information in the image, and realizes the comprehensiveness and accuracy of the detection results.
[0076] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0078] Figure 1 This is a flow chart of the first embodiment of the UAV power transmission line target detection method in this application.
[0079] Figure 2 for Figure 1 Schematic diagram of the process of obtaining the first-level feature map in .
[0080] Figure 3 for Figure 1 Schematic diagram of the process of obtaining the second-level feature map in .
[0081] Figure 4 for Figure 1 Schematic diagram of the flow chart of the method for obtaining the first target feature map.
[0082] Figure 5 for Figure 1 Schematic diagram of the flow of the method for obtaining the second target feature map.
[0083] Figure 6 This is a flow chart of the second embodiment of the UAV power transmission line target detection method in this application.
[0084] Figure 7 for Figure 6 Schematic diagram of the flow of the method for obtaining target fusion feature map.
[0085] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0086] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0087] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0088] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0089] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0090] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0091] Reference Figure 1 The present application discloses a method for detecting a target of a UAV transmission line, which specifically comprises the following steps:
[0092] S100, performing block processing on the aerial image of the power transmission line to obtain an initial feature map, wherein the initial feature map includes a plurality of sub-block images of the same size.
[0093] Specifically, aerial photography of the transmission lines is carried out using drones to obtain aerial images of the corresponding areas. The aerial images are then segmented and cut into multiple small blocks (i.e., sub-block images) of the same size dimension, thereby obtaining multiple sub-block images of the same size. By obtaining the multiple sub-block images, it is possible to focus on the local area of the image, and all the sub-block images constitute the initial feature map.
[0094] For example, when identifying transmission lines, more subtle information such as wire details, insulator status, surrounding environment, etc. can be obtained from small blocks, focusing on detailed analysis of local areas.
[0095] S200, processing the initial feature map based on a first preset strategy to obtain a first-level feature map.
[0096] In this step, it specifically includes projecting, normalizing, and window multi-head self-attention calculation on the initial feature map based on the first preset strategy, wherein the projection and normalization processing can improve the expressiveness of the features and facilitate the capture of more feature information. Through the multi-head self-attention mechanism, global correlations can be found in different subspaces to improve the global expressiveness of the features.
[0097] Specific reference Figure 2 , the method for obtaining the first-level feature map includes the following steps:
[0098] S210, projecting the initial feature map to any dimension to obtain a projected feature map of the corresponding dimension.
[0099] Specifically, the initial feature map is projected to an arbitrary dimension D to obtain a projection feature map of the corresponding dimension, whose dimension is D. For example, a tensor of dimension [H / 4, W / 4, 48] can be projected to an arbitrary dimension C through a linear embedding layer, that is, the size is transformed to [H / 4, W / 4, C], which can be achieved through a convolutional layer.
[0100] Through projection, the dimension of the feature map can be adjusted to a dimension that is more suitable for subsequent processing, which can better capture features at different levels. In some cases, the amount of calculation can be reduced by reducing the dimension, especially in the subsequent multi-head self-attention calculation, the low-dimensional feature map can speed up the calculation process.
[0101] Assume that the initial feature map is X∈R H×W×C , where H and W are the height and width, and C is the number of channels. We want to project it to a new dimension D. Usually D is a hyperparameter that can be adjusted according to task requirements. The mapping can be done through a linear layer (fully connected layer): Y = X·W+b, where W∈R C×D is the weight matrix, b∈R D is the bias vector, Y∈R H×W×D It is the feature map after projection.
[0102] S220, normalize the projected feature map to obtain a first normalized feature map.
[0103] Through this step, the normalized feature map has better numerical stability, which helps the model better learn the dependencies between features.
[0104] Specifically, the normalization process can use Layer Normalization or BatchNormalization. Assuming we use Layer Normalization, the normalization process is as follows:
[0105] LN(Y)=γ·(Y−μ) / σ+β, where μ and σ are the mean and standard deviation of feature map Y, respectively, and γ and β are learnable scaling and offset parameters.
[0106] S230, performing window multi-head self-attention calculation on the first normalized feature map to obtain a first-level feature map.
[0107] Through this step, the window multi-head self-attention can effectively capture the feature relationship within the local window, capture the information of multiple different feature subspaces, and enhance the expressiveness of the features.
[0108] Specifically, Window-based Multi-Head Self-Attention (W-MSA) is an attention mechanism in which the feature map is divided into multiple windows, and the features in each window are self-attention calculated. The calculation process of window multi-head self-attention is as follows: 1) Window division: divide the normalized feature map LN(Y) into K×K windows, each of which is W×W×D in size; 2) Multi-head self-attention: multi-head self-attention is calculated for the features in each window.
[0109] The specific steps are as follows: 1) Linear transformation of query, key and value: Q = LN (Y) W Q , K = LN(Y)·W K , V = LN(Y);
[0110] 2) Calculate attention weight: ;
[0111] 3) Multi-head stitching: The final output is the stitching result of multiple heads.
[0112] The method for acquiring the first-level feature map disclosed in this embodiment (i.e., S210-S230) can gradually extract and enhance the information of different levels of the feature map through the combination of projection, normalization and multi-head self-attention; projection and normalization can reduce the computational complexity, while multi-head self-attention enhances the expression ability, and the overall scheme finds a balance between computational efficiency and model performance; the flexibility of the projection dimension and the stability of normalization enable the scheme to adapt to different task requirements, and can achieve better results whether it is classification, detection or segmentation tasks.
[0113] S300, processing the first-level feature map based on a second preset strategy to obtain a second-level feature map.
[0114] Specifically, based on the second preset strategy, the first-level feature map is subjected to spatial dimension compression, depth dimension expansion, normalization, and sliding window multi-head self-attention calculation. By processing the first-level feature map, feature maps of different scales can be obtained.
[0115] Specific reference Figure 3 , the method for obtaining the second-level feature map includes the following steps:
[0116] S310, halving the height and width of the first-level feature map and doubling its depth to obtain a first updated feature map.
[0117] By reducing the spatial dimension and increasing the depth dimension, information at different levels can be obtained.
[0118] Specifically, assuming that the first-level feature map is F1∈R H×W×C , where H is the height, W is the width, and C is the number of channels (depth). To perform spatial dimension compression and depth expansion, the following steps can be used:
[0119] 1) Spatial dimension compression: reduce the height and width by half through pooling or strided convolution. Commonly used are 2x2 average pooling or maximum pooling:
[0120] Pool(F1)∈R H / 2×W / 2×C ;
[0121] 2) Depth dimension expansion: double the number of channels through a 1x1 convolution:
[0122] F2=Conv 1x1 (Pool(F1)), F2∈R H / 2×W / 2×C .
[0123] S320, normalize the first updated feature map to obtain a second normalized feature map.
[0124] Through this step, the normalized first updated feature map has better numerical stability.
[0125] S330, performing sliding window multi-head self-attention calculation on the second normalized feature map to obtain a second-level feature map.
[0126] The sliding window mechanism can effectively capture long-distance dependencies, and multi-head self-attention can capture information from a variety of different feature subspaces and enhance the expressiveness of features.
[0127] Specifically, Shifted Window Multi-Head Self-Attention (SW-MSA) is a variant of Window Multi-Head Self-Attention, in which the position of the window is periodically shifted to capture cross-window dependencies. The specific steps are as follows:
[0128] 1) Window division: The normalized feature map LN(F2) is divided into multiple windows, each of which is of size M×M×2C.
[0129] 2) Sliding window mechanism: offset the window, move and merge some windows at the same time, use masks to isolate information in different areas and perform attention calculation again.
[0130] 3) Multi-head self-attention: Multi-head self-attention calculation is performed in each window. The steps are similar to the previous window multi-head self-attention: .
[0131] The method for acquiring the second-level feature map disclosed in this embodiment (i.e., S310-S330) can gradually extract and enhance the information of different levels of the feature map through the combination of spatial dimension compression, depth expansion and sliding window multi-head self-attention, and can better understand the complex structure of the input data; the compression of the spatial dimension significantly reduces the computational complexity, while the depth expansion and sliding window multi-head self-attention enhance the expressiveness of the model. The overall solution finds a balance between computational efficiency and model performance.
[0132] S400, extracting first channel information and first spatial information from the first-level feature map, and interactively fusing the first channel information and the first spatial information to obtain a first fused attention weight map;
[0133] The first fused attention weight map is weighted with the first-level feature map to obtain the first target feature map.
[0134] In this step, through the interactive fusion of channel and spatial information, the channel characteristics, spatial layout and complex interactions in the aerial images obtained by the UAV can be fully captured, the ability to select key features can be enhanced, and weighted processing can further strengthen the target features and improve the accuracy of target detection.
[0135] Specific reference Figure 4 , the method for obtaining the first target feature map includes:
[0136] S410, performing average pooling on the first-level feature map in the channel dimension and the spatial dimension respectively to obtain a first spatial feature vector and first channel information (channel feature vector).
[0137] Among them, the first channel information is the channel feature vector; through spatial dimension average pooling, the global spatial information can be extracted to capture the overall structure of the image; through channel dimension average pooling, the channel dimension can be reduced and the global response of each channel can be extracted.
[0138] Specifically, assuming that the first-level feature map is F1∈R H×W×C , where H is the height, W is the width, and C is the number of channels.
[0139] Spatial dimension average pooling includes: performing global average pooling on each channel to obtain a first spatial feature vector with a dimension of C:
[0140] GlobalAvgPool(F1)→Spatial_Vector∈R C , whose size is 1×1×C.
[0141] Channel dimension average pooling includes: performing global average pooling on each spatial position (pixel point) to obtain a first channel feature vector with a dimension of H×W:
[0142] ChannelAvgPool(F1)→Channel_Vector∈R H×W , whose size is H×W×1.
[0143] S420, performing Reshape processing on the first spatial feature vector to obtain first spatial information.
[0144] Through the Reshape operation, the spatial feature vector can match the channel feature vector in dimension, which is convenient for subsequent splicing.
[0145] Specifically, the first spatial feature vector Spatial_Vector∈R C Reshape into the first spatial information with a dimension of H×W / 4:
[0146] Reshape(Spatial_Vector)→Spatial_Info∈R H×W / 4 .
[0147] S430: Concatenate the first channel information and the first spatial information to obtain a first concatenated feature vector.
[0148] The size of the first concatenated feature vector is 1×1×(C+WH).
[0149] Through the splicing operation, channel information and spatial information are combined together, multi-dimensional information is integrated, and a more comprehensive feature representation is provided.
[0150] S440, performing spatial and channel interactions on the first concatenated feature vector through a preset linear embedding function to obtain a first fused feature vector.
[0151] Through the linear embedding function, spatial and channel information can interact with each other and enhance the expressiveness of features.
[0152] Specifically, a fully connected layer (linear embedding function) can be used to process the concatenated feature vector Concat_Vector:
[0153] Linear(Concat_Vector)→Fusion_Vector∈R 2C .
[0154] S450, performing segmentation processing on the first fused feature vector to obtain a first spatial feature subset and a first channel feature subset.
[0155] The first fused feature vector is divided into a first spatial feature subset and a first channel feature subset, so that more focus is placed on features of a specific dimension in subsequent processing. This focus helps to more effectively capture and utilize spatial structures and channel features, thereby enhancing the expressiveness of features.
[0156] S460, performing convolution operations on the first spatial feature subset and the first channel feature subset respectively to obtain a first spatial attention weight map and a first channel attention weight map;
[0157] Based on the Sigmoid function, the weight of the first spatial attention weight map and the weight of the first channel attention weight map are obtained.
[0158] In this step, the convolution operation can capture the attention weight in a local range and enhance the focus on important features; the Sigmoid function can limit the weight to [0, 1], making the attention mechanism more flexible and interpretable.
[0159] Specifically, the two subsets can be processed using 1x1 convolution to obtain the spatial and channel attention weight maps:
[0160] Conv 1x1 (Spatial_Subset)→Spatial_Attention_Map∈R H×W ;
[0161] Conv 1x1 (Channel_Subset)→Channel_Attention_Map∈R C .
[0162] Obtain weights based on the Sigmoid function:
[0163] σ(Spatial_Attention_Map)→Spatial_Attention_Weights;
[0164] σ(Channel_Attention_Map)→Channel_Attention_Weights.
[0165] S470, fuse the first spatial attention weight map with the first channel attention weight map to obtain a first fused attention weight map.
[0166] In this step, the first spatial attention weight map and the first channel attention weight map can be element-wise multiplied or added to obtain a first fused attention weight map; by fusing the spatial and channel attention weights, multi-dimensional information in the spatial and channel dimensions can be captured; the fusion operation can enhance the expressive power of the attention mechanism and can better distinguish important spatial and channel features.
[0167] S480, performing a dot multiplication process on the first fused attention weight map and the first-level feature map to obtain a first target feature map.
[0168] Through the dot multiplication operation, the feature map can be weighted according to the fused attention weight map, so that important features are highlighted and unimportant features are suppressed.
[0169] In this step, through the dot multiplication operation, the importance weight in the first fused attention weight map can be used to dynamically adjust the weight of each element in the first-level feature map, so that important features can be highlighted and unimportant features can be suppressed, thereby enhancing the overall expressiveness of the feature map; the dot multiplication operation enables the feature map to be adaptively adjusted according to the needs of the current task. By fusing the attention weight map, the key features related to the task can be better captured and the noise information irrelevant to the task can be ignored. This dynamic adjustment capability helps to maintain efficient performance in different tasks; the fused attention weight map usually highlights the key areas or features in the image. Through the dot multiplication operation, these key areas will be further enlarged in the final target feature map. This emphasis can enhance the sensitivity of the model and can more accurately identify and classify targets.
[0170] Through the dot multiplication operation, the lower weight value in the first fusion attention weight map will suppress the corresponding irrelevant features in the first-level feature map, thereby reducing the interference of redundant information, effectively improving the purity of the feature map, effectively suppressing noise and interference information, and making the target feature map more robust to noise.
[0171] The method for obtaining the first target feature map disclosed in this embodiment (S410-S480) realizes a multi-dimensional attention mechanism by separately processing and fusing the spatial and channel dimensions, and can capture richer feature information; through a series of operations such as splicing, linear embedding, convolution and dot multiplication, it can dynamically adjust the information in the feature map to enhance the expressiveness of the features and the discriminativeness of the model. Specifically, by performing dot multiplication processing on the first fused attention weight map and the first-level feature map to obtain the first target feature map, it can enhance the expressiveness of important features, dynamically adjust the structure of the feature map, improve sensitivity and discrimination, reduce redundant information, and enhance the robustness of the features.
[0172] S500, extracting second channel information and second spatial information from the second-level feature map, and interactively fusing the second channel information and the second spatial information to obtain a second fused attention weight map;
[0173] The second fused attention weight map is weighted with the second level feature map to obtain a second target feature map.
[0174] In this step, the interactive fusion of hierarchical channel and spatial information can enhance the ability to select key features, and weighted processing can further strengthen target features and improve the accuracy of target detection.
[0175] Specific reference Figure 5 , the method for obtaining the second target feature map includes:
[0176] S510, performing average pooling on the second-level feature map in the channel dimension and the spatial dimension respectively to obtain a second spatial feature vector and second channel information.
[0177] The second channel information is the channel feature vector.
[0178] S520, performing Reshape processing on the second spatial feature vector to obtain second spatial information;
[0179] S530, concatenating the second channel information with the second spatial information to obtain a second concatenated feature vector;
[0180] S540, performing spatial and channel interaction on the second concatenated feature vector by using a preset linear embedding function to obtain a second fused feature vector;
[0181] S550, performing segmentation processing on the second fused feature vector to obtain a second spatial feature subset and a second channel feature subset;
[0182] S560, performing convolution operations on the second spatial feature subset and the second channel feature subset respectively to obtain a second spatial attention weight map and a second channel attention weight map;
[0183] Based on the Sigmoid function, the weight of the second spatial attention weight map and the weight of the second channel attention weight map are obtained;
[0184] S570, fusing the second spatial attention weight map with the second channel attention weight map to obtain a second fused attention weight map;
[0185] S580, perform dot multiplication processing on the second fused attention weight map and the second level feature map to obtain a second target feature map.
[0186] In this embodiment, the specific steps of the method for acquiring the second target feature map can refer to the specific steps of the method for acquiring the first target feature map, so they are not described one by one.
[0187] The method for obtaining the second target feature map disclosed in this embodiment can dynamically adjust the weight of each element in the second-level feature map by obtaining the second fused attention weight map, so that the important features in the second-level feature map can be highlighted and the noise information irrelevant to the task can be ignored. That is, the lower weight value in the second fused attention weight map will suppress the corresponding irrelevant features in the second-level feature map, thereby reducing the interference of redundant information, and can effectively improve the purity of the second-level feature map, effectively suppress noise and interference information, and make the second-level feature map more robust to noise.
[0188] S600, processing the second target feature map to obtain a processed feature map having the same size as the first target feature map, and adding the processed feature map to the first target feature map to obtain a target fusion feature map.
[0189] In this step, by fusing feature maps at different levels, the model's ability to capture multi-scale features can be enhanced. Multi-scale feature fusion can further improve the accuracy and robustness of target detection.
[0190] By fusing feature maps from different levels or from different sources, more feature information can be introduced, thereby enhancing the diversity of features and improving the expressiveness of the obtained target fused feature map. In this step, the interaction of cross-level information is realized, and the obtained target fused feature map has good global correlation and high resolution.
[0191] S700, obtaining target category and target location information in the transmission line based on the target fusion feature map.
[0192] In this embodiment, the obtained target fusion feature map contains feature information of multiple levels and sources, which can better capture the details and global structure of the target. According to the target fusion feature map, the texture, color, shape and other information of the target can be extracted from different levels and angles, so as to more comprehensively identify the category and position of the target.
[0193] Specifically, the target fusion feature map can be classified by a classifier. Assuming that a Softmax classifier is used, the probability distribution of the target category can be obtained. The target fusion feature map can be regressed by a regressor. Assuming that a fully connected layer is used for regression, the coordinates of the target position can be obtained.
[0194] Furthermore, according to the UAV transmission line target detection method, different target categories in the transmission line can be identified and classified, such as: transmission towers (including different types of towers, such as straight towers, tension towers, etc.), transmission lines (including conductors, ground wires, etc.), insulators, shock-absorbing hammers, other ancillary equipment (such as lightning arresters, hardware, etc.), etc. Based on the target fusion feature map, the model can determine which of the above equipment or structure categories each detected target belongs to.
[0195] In addition, the target position information in the transmission line can also be obtained, and the precise position of each detected target in the image can be provided, including: 1) Bounding box coordinates: Through the target detection algorithm, the bounding box of each target can be obtained. The coordinates of the bounding box (usually the pixel coordinates of the upper left corner and the lower right corner, or the center point coordinates and the width and height) can accurately locate the position of the target in the image; 2) Relative position information: Based on the global image taken by the drone, the relative position of each target relative to other targets or the entire transmission line can be calculated; 3) Actual geographic coordinates: If the drone is equipped with a high-precision GPS device, combined with the positioning information of the image, the detected target position can be mapped to the actual geographic coordinate system to obtain its actual longitude and latitude.
[0196] In addition to identifying equipment types and locations, this method can also be used to detect equipment status information, such as: insulator damage or contamination, conductor breakage or wear, transmission tower tilt or rust, auxiliary equipment missing or abnormal position (such as displacement of the anti-vibration hammer). These abnormal information can help operation and maintenance personnel to promptly discover potential problems and prevent accidents. Because this method uses a multi-level feature extraction and fusion strategy (processing and fusion of the first-level feature map and the second-level feature map), it can obtain feature information of the target at different scales, which is especially important for detecting transmission equipment of different sizes and shapes, ensuring that everything from insulators to transmission towers can be accurately detected.
[0197] In summary, the information that can be obtained by this method includes target categories, precise location information, abnormal state detection, and multi-scale feature information of various types of equipment in the transmission line. This information is of great value for the intelligent inspection, maintenance, and management of transmission lines.
[0198] The UAV power transmission line target detection method disclosed in the present application makes full use of the correlation between channel information and spatial information through multi-step processing and feature extraction. Specifically, the aerial image is divided into blocks to obtain the initial feature map, which helps to capture the local features in the image and provides a basis for subsequent feature extraction and processing; the local features in the image are further extracted and enhanced by projecting, normalizing, and performing window multi-head self-attention calculations on the initial feature map. This helps to capture the detailed information in the image; on the basis of the first-level feature map, further spatial dimension compression and depth dimension expansion are performed, and then the correlation between the spatial information and channel information of the feature map is further enhanced through sliding window multi-head self-attention calculations; the channel information and spatial information in the first-level feature map are extracted, and interactively fused to generate a first fused attention weight map. This fusion method can effectively combine channel information and spatial information to enhance the recognition ability of target features; the channel information and spatial information are extracted in the second-level feature map, and interactively fused to generate a second fused attention weight map, which further enhances the feature map. target information; through weighted processing, the fused attention weight map is combined with the corresponding feature map to generate the first and second target feature maps, which makes the feature map more focused on the target information and improves the detection accuracy; the second target feature map is processed and added element by element with the first target feature map, and the generated target fusion feature map integrates multi-level feature information, further enhancing the comprehensiveness and accuracy of target detection; based on the target fusion feature map, the target category and location information in the transmission line can be accurately identified. This multi-level and multi-step processing method fully considers the correlation between channel information and spatial information in the image, and realizes the comprehensiveness and accuracy of the detection results.
[0199] The UAV power transmission line target detection method disclosed in this embodiment, through layered feature extraction and processing, the feature map of each layer gradually enhances the correlation between channel information and spatial information; in each layer, through multi-head self-attention calculation and sliding window attention calculation, the interaction and correlation between channel information and spatial information in the feature map are enhanced; by fusing channel information and spatial information, the generated fusion attention weight map can better capture the target features, improving the accuracy and comprehensiveness of detection. Through multi-level feature extraction and fusion, the final target fusion feature map integrates feature information from low-level to high-level, ensuring the comprehensiveness of the detection results; through the attention mechanism, it can effectively focus on important areas and target features in the image, improving the accuracy of detection; the processed second target feature map is added element by element to the first target feature map, further enhancing the target information in the feature map, ensuring the comprehensiveness and accuracy of the detection results.
[0200] In summary, the transmission line target detection method fully utilizes the correlation between channel information and spatial information through multi-level feature extraction and fusion, and can achieve comprehensiveness and accuracy of detection results.
[0201] Reference Figure 6 The second embodiment of the present application discloses a method for detecting a target on a power transmission line of an unmanned aerial vehicle, which specifically includes the following methods:
[0202] S10, performing block processing on the aerial image of the power transmission line to obtain an initial feature map, where the initial feature map includes a number of sub-block images with the same size dimension.
[0203] In this step, block processing can obtain finer features.
[0204] S20, processing the initial feature map based on the first extraction strategy to obtain a first-level feature map.
[0205] Specifically, it includes: S21, projecting the initial feature map to any dimension to obtain a projection feature map of the corresponding dimension; S22, normalizing the projection feature map to obtain a first normalized feature map; S23, performing window multi-head self-attention calculation on the first normalized feature map to obtain a first-level feature map.
[0206] In this embodiment, by projecting to a higher dimension, more levels of feature information can be captured and the expressive power of the features can be enhanced. By increasing the dimension in the initial stage, high-level features can be extracted more effectively and the amount of calculation in subsequent processing steps can be reduced. Through window multi-head self-attention calculation, richer feature information can be captured in the local range, the expressive power of the features can be improved, and the diversity and complementarity of the features can be increased.
[0207] S30, performing downsampling processing on the first-level feature map three times to obtain a second-level feature map, a third-level feature map, and a fourth-level feature map respectively.
[0208] Specifically, the height and width of the first-level feature map are halved, and the depth is doubled to obtain a first updated feature map; the first updated feature map is normalized to obtain a second normalized feature map; and a sliding window multi-head self-attention calculation is performed on the second normalized feature map to obtain a second-level feature map.
[0209] The height and width of the second-level feature map are halved, and the depth is doubled to obtain the second updated feature map; the second updated feature map is normalized to obtain the third normalized feature map; the third normalized feature map is subjected to sliding window multi-head self-attention calculation to obtain the third-level feature map.
[0210] The height and width of the third-level feature map are halved, and the depth is doubled to obtain the third updated feature map; the third updated feature map is normalized to obtain the fourth normalized feature map; the fourth normalized feature map is subjected to sliding window multi-head self-attention calculation to obtain the fourth-level feature map.
[0211] In this embodiment, through three downsampling processes and multi-head self-attention calculations, rich feature information can be extracted from feature maps at different levels to enhance feature expression capabilities; through downsampling operations, the spatial size of the feature map is gradually reduced, significantly reducing the amount of calculation in subsequent steps; by increasing the number of channels, deeper feature information can be captured from different feature levels; multi-level feature extraction and normalization processing can capture more comprehensive feature information at different scales and dimensions.
[0212] S40, based on the channel space fusion strategy, the first-level feature map, the second-level feature map, the third-level feature map, and the fourth-level feature map are processed respectively to obtain a first fused attention weight map, a second fused attention weight map, a third fused attention weight map, and a fourth fused attention weight map.
[0213] Through the channel space fusion strategy, feature maps at different levels are processed and the corresponding fusion attention weight maps are obtained to effectively enhance the feature extraction capability.
[0214] Specifically, the method for obtaining the first fused attention weight map includes: performing average pooling on the first-level feature map in the channel dimension and the spatial dimension respectively to obtain a first spatial feature vector and a first channel information; performing Reshape processing on the first spatial feature vector to obtain the first spatial information; splicing the first channel information with the first spatial information to obtain a first spliced feature vector; performing space and channel interaction on the first spliced feature vector through a preset linear embedding function to obtain a first fused feature vector; segmenting the first fused feature vector to obtain a first spatial feature subset and a first channel feature subset; performing convolution operations on the first spatial feature subset and the first channel feature subset respectively to obtain a first spatial attention weight map and a first channel attention weight map; obtaining the weight of the first spatial attention weight map and the weight of the first channel attention weight map based on the Sigmoid function; fusing the first spatial attention weight map with the first channel attention weight map to obtain a first fused attention weight map.
[0215] The method for obtaining the second fused attention weight map includes: performing average pooling on the second-level feature map in the channel dimension and the spatial dimension respectively to obtain a second spatial feature vector and second channel information; performing Reshape processing on the second spatial feature vector to obtain second spatial information; splicing the second channel information with the second spatial information to obtain a second spliced feature vector; performing spatial and channel interaction on the second spliced feature vector through a preset linear embedding function to obtain a second fused feature vector; segmenting the second fused feature vector to obtain a second spatial feature subset and a second channel feature subset; performing convolution operations on the second spatial feature subset and the second channel feature subset respectively to obtain a second spatial attention weight map and a second channel attention weight map; obtaining the weight of the second spatial attention weight map and the weight of the second channel attention weight map based on the Sigmoid function; fusing the second spatial attention weight map with the second channel attention weight map to obtain a second fused attention weight map.
[0216] Specifically, the method for obtaining the third fused attention weight map includes: performing average pooling on the third-level feature map in the channel dimension and the spatial dimension respectively to obtain a third spatial feature vector and third channel information; performing Reshape processing on the third spatial feature vector to obtain third spatial information; splicing the third channel information with the third spatial information to obtain a third spliced feature vector; performing spatial and channel interaction on the third spliced feature vector through a preset linear embedding function to obtain a third fused feature vector; segmenting the third fused feature vector to obtain a third spatial feature subset and a third channel feature subset; performing convolution operations on the third spatial feature subset and the third channel feature subset respectively to obtain a third spatial attention weight map and a third channel attention weight map; obtaining the weight of the third spatial attention weight map and the weight of the third channel attention weight map based on the Sigmoid function; fusing the third spatial attention weight map with the third channel attention weight map to obtain a third fused attention weight map.
[0217] Specifically, the method for obtaining the fourth fused attention weight map includes: performing average pooling on the fourth-level feature map in the channel dimension and the spatial dimension respectively to obtain a fourth spatial feature vector and a fourth channel information; performing Reshape processing on the fourth spatial feature vector to obtain fourth spatial information; splicing the fourth channel information with the fourth spatial information to obtain a fourth spliced feature vector; performing space and channel interaction on the fourth spliced feature vector through a preset linear embedding function to obtain a fourth fused feature vector; segmenting the fourth fused feature vector to obtain a fourth spatial feature subset and a fourth channel feature subset; performing convolution operations on the fourth spatial feature subset and the fourth channel feature subset respectively to obtain a fourth spatial attention weight map and a fourth channel attention weight map; obtaining the weight of the fourth spatial attention weight map and the weight of the fourth channel attention weight map based on the Sigmoid function; fusing the fourth spatial attention weight map with the fourth channel attention weight map to obtain a fourth fused attention weight map.
[0218] S50, performing weighted processing on the first fused attention weight map and the first level feature map to obtain a first target feature map;
[0219] Perform weighted processing on the second fused attention weight map and the second level feature map to obtain a second target feature map;
[0220] Perform weighted processing on the third fusion attention weight map and the third level feature map to obtain a third target feature map;
[0221] The fourth fusion attention weight map and the fourth level feature map are weighted to obtain a fourth target feature map.
[0222] In this step, through weighted processing, important features can be automatically emphasized and irrelevant features can be suppressed according to the attention weights, so that each layer of feature maps corresponds to its importance, thereby obtaining a richer and more effective target feature map, which can focus more on key features and enhance the effectiveness of the corresponding layer feature map.
[0223] Feature maps at different levels contain different information dimensions of the image. After being weighted with attention weights, they can make full use of the complementarity of features at each level and improve the performance of the final features. By weighting feature maps at different levels with the corresponding fused attention weight maps to generate target feature maps, important features can be extracted more accurately and feature representation capabilities can be enhanced.
[0224] S60, based on a multi-scale fusion strategy, the fourth target feature map, the third target feature map, the second target feature map, and the first target feature map are fused to obtain a target fused feature map.
[0225] S70, obtaining target category and target location information in the transmission line based on the target fusion feature map.
[0226] The second embodiment of the present application discloses a method for detecting a target of a UAV power transmission line. Through multi-level feature extraction and downsampling processing, feature information of different scales can be captured. This multi-level feature extraction helps to identify targets of different sizes, especially various equipment and structures existing in the power transmission line. The channel space fusion strategy can effectively combine feature maps of different levels to generate a fusion attention weight map. This strategy helps to enhance attention to key features and reduce the influence of noise and irrelevant information, thereby improving the accuracy of target detection. By weighting the fusion attention weight map with the feature map of the corresponding level, the target area can be further highlighted and background noise can be suppressed. This weighted processing helps to improve the accuracy and robustness of target detection. The multi-scale fusion strategy can comprehensively utilize feature information of different levels to generate a target fusion feature map. This strategy helps to improve the comprehensiveness and accuracy of target detection, especially in complex backgrounds and multi-target scenes. By obtaining target categories and target position information in the power transmission line based on the target fusion feature map, it is possible to realize automatic identification and positioning of various equipment and structures in the power transmission line. This capability helps to improve the efficiency and accuracy of power transmission line inspections and reduce the workload and cost of manual inspections.
[0227] This UAV transmission line target detection method can effectively improve the accuracy, robustness and comprehensiveness of target detection through strategies such as multi-level feature extraction, channel space fusion, weighted processing and multi-scale fusion, providing strong technical support for the intelligent inspection of transmission lines.
[0228] Reference Figure 7, the method for obtaining the target fusion feature map specifically includes the following methods:
[0229] S61, processing the fourth target feature map to obtain a processed feature map having the same size as the third target feature map, which is recorded as the first processed feature map.
[0230] S62, adding the first processed feature map and the third target feature map element by element to obtain a first fused feature map.
[0231] S63, processing the first fused feature map to obtain a processed feature map having the same size as the second target feature map, which is recorded as the second processed feature map.
[0232] S64, adding the second processed feature map and the second target feature map element by element to obtain a second fused feature map.
[0233] S65, processing the second fused feature map to obtain a processed feature map having the same size as the first target feature map, which is recorded as a third processed feature map.
[0234] S66, adding the third processed feature map to the first target feature map element by element to obtain a target fusion feature map.
[0235] The method for obtaining the target fusion feature map disclosed in this embodiment processes the feature map to ensure that the sizes of target feature maps at different levels are consistent. This processing method ensures that the problem of size mismatch will not be introduced during the subsequent element-by-element addition, thereby improving the stability and reliability of the operation; through the element-by-element addition method, the feature maps at different levels can be effectively fused. This method ensures that the key information from the features of each layer can be retained and enhanced, helping the system to better capture the target features; through multi-level fusion (for example, first fusing the fourth and third target feature maps, and then fusing the second and first target feature maps), the method effectively integrates the low-level and high-level feature information. This information integration enables the final target fusion feature map to more comprehensively reflect the entire image. target features, improving the accuracy and reliability of detection; through gradual fusion layer by layer, it can relatively better reduce information loss. In traditional feature fusion, information may be lost in a one-time fusion, while this method uses a gradual fusion strategy to retain key features at each step; after multiple processing and element-by-element addition, the target fusion feature map finally obtained has stronger expression ability, which means that the fusion feature map can better distinguish different categories of targets and improve the accuracy of subsequent classification and positioning, thereby improving the overall performance of the detection system; because the target fusion feature map can effectively integrate feature information from different levels, its detection effect has been significantly improved, especially in the face of complex environments and multi-target scenes, the system can more stably identify targets and improve practicality.
[0236] In summary, the target fusion feature map obtained through the above steps has the advantages of enhancing feature expression, reducing information loss and improving detection effect, which provides stronger data support for UAVs in the task of transmission line target detection.
[0237] In a third aspect, the present application discloses a UAV power transmission line target detection system, comprising:
[0238] A block division module is used to perform block processing on the aerial image of the power transmission line to obtain an initial feature map, which includes a number of sub-block images with the same size dimension;
[0239] The first-level feature map acquisition module is used to project, normalize, and perform window multi-head self-attention calculation on the initial feature map to obtain the first-level feature map;
[0240] The second-level feature map acquisition module is used to perform spatial dimension compression, depth dimension expansion, normalization, and sliding window multi-head self-attention calculation on the first-level feature map to obtain the second-level feature map;
[0241] A first interactive module is used to extract first channel information and first spatial information from the first-level feature map, and interactively fuse the first channel information and the first spatial information to obtain a first fused attention weight map; and perform weighted processing on the first fused attention weight map and the first-level feature map to obtain a first target feature map;
[0242] The second interactive module is used to extract the second channel information and the second spatial information in the second-level feature map, and interactively fuse the second channel information and the second spatial information to obtain a second fused attention weight map; and perform weighted processing on the second fused attention weight map and the second-level feature map to obtain a second target feature map;
[0243] A fusion module is used to process the second target feature map to obtain a processed feature map with the same size as the first target feature map, and add the processed feature map to the first target feature map to obtain a target fusion feature map;
[0244] The analysis module is used to obtain target category and target location information in the transmission line based on the target fusion feature map.
[0245] The specific acquisition scheme in the UAV power transmission line target detection system disclosed in this application is consistent with the UAV power transmission line target detection method disclosed in the first aspect of this application, so it will not be discussed one by one here.
[0246] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.
[0247] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device executes all or part of the steps of the UAV power transmission line target detection method of each embodiment of the present disclosure.
[0248] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.
[0249] like Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 8 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0250] like Figure 8 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0251] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 8A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0252] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the drone power transmission line target detection method of the embodiment of the present disclosure are executed.
[0253] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0254] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by the processor, all or part of the steps of the UAV power transmission line target detection method of each embodiment of the present disclosure are executed.
[0255] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).
[0256] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0257] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0258] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0259] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0260] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0261] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0262] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0263] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A UAV power transmission line target detection method, characterized in that: include: The aerial image of the power transmission line is processed into blocks to obtain an initial feature map, wherein the initial feature map includes a plurality of sub-block images with the same size dimension; Processing the initial feature map based on a first preset strategy to obtain a first-level feature map; Processing the first-level feature map based on a second preset strategy to obtain a second-level feature map; Extracting first channel information and first spatial information from the first hierarchical feature map, and interactively fusing the first channel information and the first spatial information to obtain a first fused attention weight map; performing weighted processing on the first fused attention weight map and the first hierarchical feature map to obtain a first target feature map; Extracting the second channel information and the second spatial information from the second-level feature map, and interactively fusing the second channel information and the second spatial information to obtain a second fused attention weight map; performing weighted processing on the second fused attention weight map and the second-level feature map to obtain a second target feature map; Processing the second target feature map to obtain a processed feature map having the same size as the first target feature map, and adding the processed feature map to the first target feature map to obtain a target fusion feature map; Obtaining target category and target location information in the transmission line based on the target fusion feature map; The method for obtaining the first target feature map and the second target feature map includes: performing average pooling on the first hierarchical feature map and the second hierarchical feature map in the channel dimension and the spatial dimension respectively to obtain a first spatial feature vector, first channel information, a second spatial feature vector, and second channel information; performing Reshape processing on the first spatial feature vector and the second spatial feature vector respectively to obtain first spatial information and second spatial information; splicing the first channel information with the first spatial information to obtain a first spliced feature vector; splicing the second channel information with the second spatial information to obtain a second spliced feature vector; Performing spatial and channel interactions on the first concatenated feature vector and the second concatenated feature vector respectively through a preset linear embedding function to obtain a first fused feature vector and a second fused feature vector; performing segmentation processing on the first fused feature vector and the second fused feature vector respectively to obtain a first spatial feature subset, a first channel feature subset, a second spatial feature subset, and a second channel feature subset; Perform convolution operations on the first spatial feature subset, the first channel feature subset, the second spatial feature subset, and the second channel feature subset respectively to obtain a first spatial attention weight map, a first channel attention weight map, a second spatial attention weight map, and a second channel attention weight map; obtain the weights of the first spatial attention weight map, the first channel attention weight map, the second spatial attention weight map, and the second channel attention weight map respectively based on the Sigmoid function; fuse the first spatial attention weight map with the first channel attention weight map to obtain a first fused attention weight map; fuse the second spatial attention weight map with the second channel attention weight map to obtain a second fused attention weight map; The first fused attention weight map is dot-multiplied with the first hierarchical feature map to obtain a first target feature map; the second fused attention weight map is dot-multiplied with the second hierarchical feature map to obtain a second target feature map.
2. The UAV power transmission line target detection method according to claim 1 is characterized in that: The processing of the initial feature map based on the first preset strategy to obtain a first-level feature map includes: Projecting the initial feature map to any dimension to obtain a projection feature map of the corresponding dimension; Normalizing the projection feature map to obtain a first normalized feature map; Perform window multi-head self-attention calculation on the first normalized feature map to obtain a first-level feature map.
3. The UAV power transmission line target detection method according to claim 1 is characterized in that: The step of processing the first-level feature map based on the second preset strategy to obtain the second-level feature map includes: The height and width of the first-level feature map are halved and the depth is doubled to obtain a first updated feature map; Normalizing the first updated feature map to obtain a second normalized feature map; Perform sliding window multi-head self-attention calculation on the second normalized feature map to obtain a second-level feature map.
4. A UAV power transmission line target detection method, characterized in that: include: The aerial image of the power transmission line is processed into blocks to obtain an initial feature map, wherein the initial feature map includes a plurality of sub-block images with the same size dimension; Processing the initial feature map based on a first extraction strategy to obtain a first-level feature map; The first-level feature map is downsampled three times to obtain a second-level feature map, a third-level feature map, and a fourth-level feature map respectively; Based on the channel space fusion strategy, the first-level feature map, the second-level feature map, the third-level feature map, and the fourth-level feature map are processed respectively to obtain a first fused attention weight map, a second fused attention weight map, a third fused attention weight map, and a fourth fused attention weight map; Performing weighted processing on the first fused attention weight map and the first hierarchical feature map to obtain a first target feature map; Performing weighted processing on the second fused attention weight map and the second hierarchical feature map to obtain a second target feature map; Performing weighted processing on the third fused attention weight map and the third hierarchical feature map to obtain a third target feature map; Performing weighted processing on the fourth fused attention weight map and the fourth hierarchical feature map to obtain a fourth target feature map; Based on a multi-scale fusion strategy, the fourth target feature map, the third target feature map, the second target feature map, and the first target feature map are fused to obtain a target fused feature map; Obtaining target category and target location information in the transmission line based on the target fusion feature map; The fourth target feature map, the third target feature map, the second target feature map, and the first target feature map are processed based on the multi-scale fusion strategy to obtain a target fusion feature map; Processing the fourth target feature map to obtain a processed feature map having the same size as the third target feature map, recorded as a first processed feature map; Adding the first processed feature map and the third target feature map element by element to obtain a first fused feature map; Processing the first fused feature map to obtain a processed feature map having the same size as the second target feature map, recorded as a second processed feature map; Adding the second processed feature map and the second target feature map element by element to obtain a second fused feature map; Processing the second fused feature map to obtain a processed feature map having the same size as the first target feature map, recorded as a third processed feature map; The third processed feature map is added element by element to the first target feature map to obtain a target fusion feature map.
5. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the UAV power transmission line target detection method described in any one of claims 1-3 or 4.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the UAV power transmission line target detection method described in any one of claims 1-3 or 4.
7. A computer program product comprising computer instructions, characterized in that When the computer instruction is executed by the processor, the steps of the UAV power transmission line target detection method described in any one of claims 1-3 or 4 are implemented.
Citation Information
Patent Citations
Unmanned aerial vehicle aerial image target detection method and device and storage medium
CN116403127A
Small target detection method, system and device based on multilayer interactive attention feature fusion mechanism and medium
CN117953203A