An unmanned aerial vehicle image small target detection method fusing space-frequency features
By using a small target feature preservation network with a dual-branch structure and combining spatial and frequency domain feature extraction, the problems of insufficient feature preservation and inadequate utilization of global context information in existing methods are solved, thereby improving the performance of small target detection.
Patent Information
- Application Number
- CN202510996818.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Existing methods lack the ability to preserve features in small object detection and do not make full use of global contextual information, resulting in insufficient detection performance.
The small target feature preservation network adopts a dual-branch structure. Through spatial and frequency domain feature extraction branches, combined with sub-pixel-excitation modules, frequency domain feature extraction modules, and self-attention encoding, it achieves complementary feature enhancement and full utilization of global contextual information.
It improves the accuracy and performance of small object detection, especially the detection performance under multiple IoU thresholds, and enhances the ability to preserve features and model global context.
Smart Images

Figure CN120894537B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a UAV image small target detection method fusing space-frequency features and belongs to the field of UAV remote sensing image detection. TECHNICAL BACKGROUND
[0002] With technological breakthroughs and policy support, the low-altitude economy is about to experience explosive growth. As the core carrier of the low-altitude economy, the unmanned aerial vehicle (UAV) has great potential in the field of intelligent transportation. UAV target detection technology has been widely used in road sign detection, traffic flow statistics, traffic diversion, accident handling and other scenarios. UAV aerial images have the characteristics of wide viewing angle and small target, making small target detection a major technical difficulty. In fact, target detection technology has always been an important research direction in the field of computer vision, and improving target detection accuracy is a continuous challenge. In recent years, target detection technology based on deep learning has developed rapidly, and many algorithms have shown excellent performance for regular-sized target detection. However, these algorithms still face great challenges in small target detection, and their detection performance still lags far behind actual needs.
[0003] The main difficulty of small target detection is that small targets have few pixels, unobvious features, and are easily disturbed by background information. To address these difficulties in small target detection, various optimization methods have been proposed to improve small target detection performance. The main methods include super-resolution, multi-scale fusion, context learning, and generative adversarial learning. These methods have improved small target detection performance to some extent and provided important references for small target detection research. In particular, the multi-scale fusion strategy has been adopted by current mainstream target detection models.
[0004] However, current methods still follow the paradigm of convolutional neural networks (CNNs). That is, the spatial resolution of feature maps is continuously reduced and the receptive field of feature maps is increased through multi-layer pooling or stride convolution downsampling methods. This process inevitably causes the loss of small target features and increases the difficulty of small target recognition. Some research works have optimized the downsampling method to reduce the loss of detailed information to some extent. However, at present, how to preserve more small target features during downsampling is still a challenge.
[0005] In recent years, with the introduction of the Transfomer architecture into the visual field, Transfomer-based target detection algorithms have been widely studied. For small target detection, the global context modeling capability of the self-attention mechanism has great advantages. Transfomer provides another paradigm for target detection. However, due to the computational complexity of the self-attention mechanism, which is proportional to the square of the input sequence length. It is not feasible to directly input the image into the Transformer encoder. Therefore, when using the Transfomer model for target detection, it is still necessary to use a convolutional neural network to complete feature extraction. The Transfomer-based target detection model, from the beginning of directly inputting high-level semantic features into the encoder, to selecting several feature points from different scale feature maps and inputting them into the encoder, to the cross-scale feature fusion mechanism of RT-DETR (Real-Time Detection Transformer), its detection performance is continuously improved.
[0006] As a visual Transfomer architecture, RT-DETR combines the excellent mechanisms of various Transformer models, and has achieved a relatively advanced level in target detection at different scales. However, by analyzing the structure of RT-DETR, it can be found that the feature fusion strategy is to input high-level semantic feature maps into the encoder and then perform cross-scale fusion with shallow feature maps. This strategy does not fully utilize the advantages of the self-attention mechanism in small target detection. SUMMARY
[0007] In view of the problems existing in the prior art, the purpose of the present application is to provide a small target detection method for unmanned aerial vehicle images based on fusion of spatial and frequency features, which solves the problems of insufficient feature preservation capability and insufficient utilization of global context information in the prior art, and improves the performance of small target detection.
[0008] The present application provides a small target detection method for unmanned aerial vehicle images based on fusion of spatial and frequency features, comprising the following steps:
[0009] S1, divide the original data set into a training set, a validation set and a test set.
[0010] S2, input the image data into a small target feature preservation network, the small target feature preservation network is composed of a spatial feature extraction branch and a frequency feature extraction branch, the spatial feature extraction branch extracts shallow, intermediate and deep spatial feature maps by ResNet, and the frequency feature extraction branch extracts frequency feature maps, the frequency feature extraction branch comprises:
[0011] Sub-pixel excitation module: the sub-pixel excitation module takes the original RGB image as input, increases the feature information through sub-pixel processing, saves the increased sub-pixels in the channel dimension through the Focus strategy, and learns the important channel weight scalar through the compression excitation mechanism to obtain the feature map with channel weight.
[0012] Frequency domain feature extraction module: the frequency domain feature extraction module receives the feature map with channel weight, decomposes each channel feature map into sub-maps of different frequency bands through frequency band separation, extracts the frequency domain features of the image through convolution, and filters out the key frequency domain features in combination with the attention mechanism to obtain the frequency domain feature map.
[0013] S3, the frequency domain feature map is fused with the spatial domain feature map to obtain a space-frequency fusion feature map.
[0014] S4, the extracted feature map is mixed coded to obtain an image feature sequence, and the mixed coding includes:
[0015] Self-attention coding: the self-attention coding takes the space-frequency fusion feature map as input to obtain an encoded feature map containing global context information.
[0016] Cross-scale feature fusion: the cross-scale feature fusion takes the encoded feature map, the shallow spatial domain feature map and the deep spatial domain feature map as input, performs layer-by-layer fusion through a bidirectional feature aggregation network, and outputs an image feature sequence.
[0017] S5, feature screening is performed, the decoder with an auxiliary prediction head is used to complete target category and position detection, iterative training is performed, and model parameters are saved.
[0018] S6, the pictures of the test set are input into the detection model to identify and position the targets in the images.
[0019] Further, the sub-pixel excitation module comprises:
[0020] The bilinear interpolation method is used to perform 2 times up-sampling on the HxWx3 image to obtain a 2Hx2Wx3 sub-pixel image.
[0021] The image is sliced, and every other pixel in the width and height directions of the image is sampled, and spliced in the channel dimension to obtain an HxWx12 feature map.
[0022] Compression processing is performed, and a global average pooling is used to generate a channel-level statistic.
[0023] The sigmoid activation gating mechanism is used for excitation to obtain a channel weight scalar.
[0024] The channel weight scalar is weighted to each channel gray scale image, and a 1x1 convolution operation is performed again to obtain a feature map with channel weight.
[0025] Further, the frequency domain feature extraction module comprises:
[0026] Each channel feature map in the input feature map is decomposed into 8 subgraphs of different frequency bands through frequency band separation.
[0027] All subgraphs are spliced in the channel dimension to obtain an initial frequency domain feature map.
[0028] The initial frequency domain feature map is subjected to channel attention processing to obtain a channel weight matrix, and the weight value is multiplied by the initial frequency domain feature map to obtain a weighted feature map, thereby screening important frequency band channels.
[0029] The weighted feature map is subjected to spatial attention processing to obtain a spatial attention weight, and the spatial weight value is multiplied to the weighted feature map to obtain a final frequency domain feature map.
[0030] Further, the frequency band separation process is implemented as follows:
[0031] First, the gray scale image is subjected to discrete Fourier transform;
[0032] Then, two filters are constructed, which are Gaussian low-pass filter and Gaussian high-pass filter;
[0033] Next, the frequency spectrum is multiplied by the filter and subjected to inverse Fourier transform to obtain a gray scale image containing low frequency information and high frequency information respectively;
[0034] Finally, two-dimensional discrete wavelet transform is adopted to further decompose the high frequency gray scale image and the low frequency gray scale image, to obtain four frequency subbands: horizontal detail, vertical detail, diagonal detail and approximation subband. Thus, each single channel image is decomposed into 8 subgraphs with different frequency bands, and the resolution of each subgraph is down-sampled to half of the original image.
[0035] Further, the channel attention processing adopts two different parameter matrices when calculating the attention weight, and the calculation formula is as follows:
[0036] M c (U1)=σ(W2(W1(F avg (U1)))+W4(W3(F max (U1))))
[0037] In the formula, σ represents the sigmoid function, W1, W2, W3 and W4 represent different parameter matrices, F avg () represents global average pooling, and Fmax () represents global max pooling, U1 represents an input feature map, M c represents the output channel attention weight matrix.
[0038] Further, the frequency domain feature map and the spatial domain feature map are fused, first, n times of 3*3 convolution is performed to downsample, and the size of the frequency domain feature map is adjusted to be consistent with the size of the intermediate layer spatial domain feature map, then the frequency domain feature map is spliced with the intermediate layer spatial domain feature map in the channel dimension.
[0039] Further, the self-attention encoding is realized by 4 stacked encoder layers, each encoder layer includes two key sub-layers: a multi-head self-attention layer and a feedforward neural network layer, each layer is provided with layer normalization and residual connection.
[0040] Compared with the prior art, the present application has the following beneficial results:
[0041] 1. The small target feature preservation network is proposed, the network adopts a double-branch structure, extracts and fuses spatial and frequency features, realizes complementary enhancement of features, and improves the feature preservation capability.
[0042] 2. The frequency domain feature extraction branch designed by the present application is composed of a sub-pixel-excitation module and a frequency domain feature extraction module, the sub-pixel-excitation module fuses sub-pixel processing, Focus strategy and compression excitation mechanism, realizes the improvement of small target detection precision under the condition of increasing a small amount of parameters and computational complexity; the frequency domain feature extraction module combines frequency band separation and attention mechanism, and can adaptively learn important frequency domain features, effectively improving the frequency domain feature processing efficiency.
[0043] 3. The hybrid coding strategy is improved, the spatial and frequency fused feature maps are encoded by self-attention, the advantages of global context modeling in small target detection are fully played, and the small target feature extraction capability is further enhanced.
[0044] 4. The present application is tested on VisDrone 2019 and TT100K data sets, and the experimental results prove the effectiveness of the algorithm in enhancing the performance of small target detection. DETAILED DESCRIPTION
[0045] The above and other objects, features and advantages of the present application will become more apparent from the following description of the preferred embodiments of the present application with reference to the accompanying drawings, in which:
[0046] Figure 1 The flow chart of the unmanned aerial vehicle image small target detection method for fusing spatial and frequency features provided by the first embodiment of the present application is shown in the figure.
[0047] Figure 2This is an overall schematic diagram of the UAV image small target detection method that integrates air frequency features according to the first embodiment of the present invention.
[0048] Figure 3 This is a diagram of the sub-pixel-excitation module provided in the first embodiment of the present invention;
[0049] Figure 4 This is a diagram of the frequency domain feature extraction module provided in the first embodiment of the present invention;
[0050] Figure 5 This is a flowchart of the frequency band separation process provided in the first embodiment of the present invention. Detailed Implementation
[0051] To make the objectives, advantages, and technical methods of this invention clearer, the technical solutions in the embodiments of this invention will be described in detail below with reference to the accompanying drawings. The specific examples described herein are for illustrative purposes only and are not intended to limit the scope of this invention.
[0052] like Figure 1 The diagram shows a flowchart of a method for detecting small targets in UAV images by fusing space-frequency features according to an embodiment of the present invention, including steps S1-S6:
[0053] S1, divide the original dataset into training set, validation set, and test set;
[0054] In this invention, image data required for model training and testing is obtained from two publicly available datasets: the VisDrone 2019 dataset and the TT100K dataset. These two datasets will be described in detail below.
[0055] (1) VisDrone 2019 dataset:
[0056] The VisDrone 2019 dataset is designed specifically for object detection in everyday scenes captured by drones. This dataset focuses on small object detection; 60% of object instances are smaller than 20 pixels, and 25% are between 20 and 30 pixels in size, which places higher demands on the algorithms. It is suitable for testing the performance of small object detection algorithms.
[0057] (2) TT100K dataset:
[0058] TT100K(Tsinghua-Tencent 100K) is a large dataset specially designed for traffic sign recognition, proposed by Tsinghua-Tencent Joint Laboratory, covering 100 common traffic signs, totaling more than 30,000 fine-labeled instances. The traffic signs in the dataset are usually small, and there are problems such as illumination changes, occlusions, and blurring, which is a typical dataset suitable for small target detection.
[0059] S2, input the image data to the small target feature preservation network, and extract the spatial domain feature and the frequency domain feature by the double-branch structure respectively;
[0060] As Figure 2 shown, the present application provides a small target detection method for unmanned aerial vehicle image, and the model is composed of a small target feature preservation network, a hybrid coding, a feature screening, and a decoder with an auxiliary detection head (FFN).
[0061] In the present application, the small target feature preservation network is composed of two branches for extracting spatial domain features and frequency domain features, which will be described in detail below.
[0062] (1) Spatial domain feature extraction branch
[0063] The image with a channel number of 3 is input to the ResNet network to extract three different scale feature maps, namely the shallow spatial domain feature map C3, the intermediate layer spatial domain feature map C4, and the deep layer spatial domain feature map C5.
[0064] (2) Frequency domain feature extraction branch
[0065] The frequency domain feature extraction branch is composed of a sub-pixel-excitation module and a frequency domain feature extraction module. The structure of the sub-pixel-excitation module is as Figure 3 shown, and the specific implementation is as follows:
[0066] Firstly, the bilinear interpolation method is used to up-sample the HxWx3 and the image to obtain a sub-pixel image of 2Hx2Wx3. The new pixel value in the target image is obtained by weighted average of the four adjacent pixel values in the original image in its nearby area. Assuming that a point (x, y) in the target image, its four adjacent points in the original image are Q 11 , Q 12 , Q 21 , Q 22 , then the pixel value f(x, y) at (i, j) is calculated as follows:
[0067] f(x, y) = f(Q 11 )ω 11 +f(Q 21 )ω 21 +f(Q 12 )ω12 +f(Q 22 )ω 22
[0068] where ω ij is the weight of each point. The bilinear interpolation method is fast in calculation, and has low complexity while maintaining image quality. This is the important reason for using bilinear interpolation in the sub-pixel excitation module.
[0069] Then, the image is sliced, that is, every other pixel in the width and height directions of the image is sampled, so that the feature maps of the R, G and B channels are each decomposed into four independent feature layers, which are spliced in the channel dimension to obtain a feature layer of HxWx12. The added sub-pixel information is saved to the channel.
[0070] At this time, the channel information contains a large amount of redundant information. Therefore, a compression-excitation mechanism is introduced to establish the mutual dependence between channels and adaptively learn the channel weight response, emphasizing important information and suppressing irrelevant information.
[0071] The compression step uses global average pooling to generate channel-level statistics. The calculation formula is as follows:
[0072]
[0073] where x c (x,y) represents the value of position (x,y) in the gray image of the cth channel. z c represents the statistics of the cth channel.
[0074] The excitation step uses a sigmoid activation gating mechanism. Here, since only preliminary screening of redundant information is performed and the number of channels is relatively small, a single-layer fully connected layer is used, and the formula is expressed as follows:
[0075] s = σ(W1*z + b1)
[0076] where σ represents the sigmoid activation function.
[0077] Then, the channel weight scalar s is weighted to each channel gray image, and a 1x1 convolution operation is performed again to obtain the final output. The formula is expressed as follows:
[0078]
[0079] where represents multiplication by the channel. Since the value range of s is [0,1], through the compression-excitation module, important information is emphasized and irrelevant information is suppressed, and this process can be learned.
[0080] The frequency domain feature extraction module structure is as shown in Figure 4 The implementation is as follows:
[0081] First, the gray scale image of each channel is subjected to frequency band separation processing, and the frequency band separation flow is as shown in Figure 5 The implementation process is as follows:
[0082] First, the gray scale image is subjected to discrete Fourier transform. The formula is as follows:
[0083]
[0084] In the formula, f(x, y) represents the original image, and F(u, v) is the corresponding frequency spectrum.
[0085] Second, two filters, a Gaussian low-pass filter and a Gaussian high-pass filter, are constructed, and the formula is as follows:
[0086]
[0087] In the formula, D(u, v) represents the distance from the point (u, v) to the origin of the frequency plane; D0 represents the cutoff frequency. H(u, v) is the Gaussian filter.
[0088] Third, the frequency spectrum is multiplied by the filter, and then inverse Fourier transform is performed, that is, the gray scale images containing low frequency information and high frequency information are obtained. The formula is as follows:
[0089]
[0090] In the formula, H(u, v) is H L (u, v), that is, the low frequency gray scale image is obtained, and H H (u, v), that is, the high frequency gray scale image is obtained.
[0091] Fourth, two-dimensional discrete wavelet transform (DWT) is used to further decompose the high frequency gray scale image and the low frequency gray scale image, respectively, to obtain four frequency subbands: horizontal detail (LH), vertical detail (HL), diagonal detail (HH), and approximate subband (LL). This part is realized by four filters with a step of 2. The four filters are:
[0092] Then, for each input channel, the output of the convolution is:
[0093] [G LL ,G LH ,G HL ,G HH ]=Conv([f LL ,f LH ,f HL f HH ],g(x,y))
[0094] Thus the band separation of the image is completed, and each single channel image is decomposed into 8 sub-images with different frequency bands. And the resolution of each sub-image is down-sampled to half of the original image.
[0095] Then, all the sub-images of C channels are spliced in the channel dimension, and the spliced feature map is denoted as U1. This down-sampling process saves the information of different frequency bands in the channel dimension and does not cause loss of information.
[0096] Then, the convolution attention mechanism is used to extract the key frequency domain features. In this process, the channel attention mechanism is first applied to filter out important frequency band channels. Then the spatial attention mechanism is applied to highlight the key regions. The specific process of channel attention is to perform global maximum pooling and global average pooling on the input feature map respectively, compress the spatial dimension to 1, and retain the channel information. The two pooled features are sent to different multi-layer perceptron (MLP) to extract features. The pooled features after MLP are added, and the final channel attention weight matrix M c is obtained after sigmoid activation. The formula is as follows:
[0097] M c (U1)=σ(W2(W1(F avg (U1)))+W4(W3(F max (U1))))
[0098] In the formula, σ represents the sigmoid function, W1, W2, W3, and W4 represent different parameter matrices, F avg () represents global average pooling, F max () represents global maximum pooling, U1 represents the input feature map, and M c represents the output channel attention weight matrix. The weight value is multiplied with the feature map U1 to obtain the weighted feature map U2.
[0099] Then, the spatial attention processing is performed on the U2 feature layer to further highlight its features in the spatial dimension. The specific implementation process of the spatial attention module is as follows: the feature map (after channel attention calculation) is respectively subjected to maximum value pooling and average pooling in the channel dimension, the channel dimension is compressed to 1, and the spatial information is retained. The pooled features are spliced in the channel dimension, and then a convolution layer is used to extract features while reducing the channel dimension to 1. After sigmoid activation, the spatial attention weight matrix is obtained. The expression of the spatial attention weight matrix is as follows:
[0100]
[0101] In the formula, f represents convolution operation, and the convolution kernel is 3 here.
[0102] The weight value is multiplied to the original feature map to obtain the final frequency domain feature map.
[0103] S3, the frequency domain feature map is fused with the spatial domain feature map to obtain a space-frequency fusion feature map.
[0104] Downsampling is performed through n times of 3*3 convolution, and the size of the frequency domain feature map is adjusted to be consistent with the intermediate layer feature map extracted by the ResNet. The feature maps extracted by the two branches are spliced in the channel dimension to complete the fusion of the space-frequency features.
[0105] S4, the extracted feature map is mixed coded to obtain an image feature sequence.
[0106] The space-frequency fusion feature map is input into a self-attention encoder to obtain a feature map containing global context information; then, the coded feature map is cross-scale fused with the shallow spatial domain feature map and the deep spatial domain feature map extracted by the ResNet network; through this strategy, the small target feature extraction capability can be further improved; the self-attention coding is realized by 4 stacked encoder layers, each encoder layer contains two key sub-layers: a multi-head self-attention layer and a feedforward neural network layer, each layer is equipped with layer normalization and residual connection.
[0107] S5, feature screening is performed, the decoder with an auxiliary prediction head is used to complete target class and position detection, iterative training is performed, and model parameters are saved;
[0108] S6, the picture of the test set is input into the detection model to recognize and position the target in the image.
[0109] In this embodiment, the batch size is set to 2, the AdamW optimizer is used, the initial learning rate is 0.0001, and no pre-training weight is used before model training.
[0110] Table 1 Comparison results of typical algorithms on VisDrone dataset
[0111]
[0112] Table 1 shows the comparison results of the UAV image small target detection method (SOD-DETR) fused with spatial frequency features on the VisDrone dataset with typical target detection methods. This invention adopts COCO-style evaluation metrics. AP is used to measure the performance of the trained model in each category, and mAP is used to measure the performance of the model across all categories. mAP50 refers to the average accuracy across all categories when the IoU threshold is 0.5. mAP50-95 refers to calculating the AP at 10 IoU thresholds from 0.5 to 0.95 with a step size of 0.05, and then taking the average. S Representing small goals, AP M Representing mesoscale targets, AP L Representing large-scale targets. To further measure the model's computational complexity, inference time, and other performance metrics, this invention employs several evaluation indicators, including parameter count, gigaflops per second (GFLOPs), and frames per second (FPS). Compared to RT-DETR, SOD-DETR improves mAP50 by 3.2%, mAP50-95 by 5.1%, and AP... S It increased by 2.7%, AP M It increased by 2.8%, AP L It increased by 5.7%.
[0113] Table 2 Comparison results of RT-DETR and SOD-DETR on the TT100K dataset.
[0114]
[0115] Table 2 shows the comparison results of SOD-DETR and RT-DETR on the TT100K dataset. On this dataset, SOD-DETR improved mAP50 by 2.2%, mAP50-95 by 3.7%, APS by 2.4%, APM by 2.2%, and APL by 2.8%.
[0116] Overall, the detection accuracy of SOD-DETR is improved on the two datasets, and the improvement of mAP50-95 is relatively high. mAP50-95 is a more stringent evaluation indicator than mAP50, which means that SOD-DETR performs better in multiple IoU thresholds, especially at high precision thresholds. Although the improvement of small target detection accuracy is lower than that of large and medium scale targets, it is due to the difficulty of small target detection. SOD-DETR still achieves an advanced level in small target detection performance. Of course, compared with Drone-DETR and SOD-YOLO, the parameter quantity and computational complexity of SOD-DETR increase, but the increase is not large. The model inference speed can also be maintained at 64 frames per second. SOD-DETR is more suitable for tasks with higher detection accuracy requirements.
[0117] The specific embodiments of the present application are described above. It should be understood that the present application is not limited to the specific embodiments described above, and various modifications or changes can be made by those skilled in the art within the scope of the claims, which does not affect the essential content of the present application.
Claims
1. A method for detecting small targets in UAV images by fusing spatial and frequency features, characterized in that, The method comprises the following steps: S1, dividing the original data set into a training set, a validation set and a test set; S2, inputting image data into a small target feature preservation network, the small target feature preservation network being composed of a spatial feature extraction branch and a frequency domain feature extraction branch, the spatial feature extraction branch extracting shallow, middle and deep spatial feature maps by ResNet, and the frequency domain feature extraction branch extracting a frequency domain feature map, the frequency domain feature extraction branch comprising: A sub-pixel-stimulating module: the sub-pixel-stimulating module takes an original RGB image as input, increases feature information through sub-pixel processing, saves the increased sub-pixels in the channel dimension through a Focus strategy, and learns important channel weight scalars through a compression stimulating mechanism to obtain a feature map with channel weights; A frequency domain feature extraction module: the frequency domain feature extraction module receives the feature map with channel weights, decomposes each channel feature map in the input feature map into sub-maps of different frequency bands through frequency band separation, extracts frequency domain features of the image through convolution, and filters out key frequency domain features in combination with an attention mechanism to obtain a frequency domain feature map; S3, fusing the frequency domain feature map and the spatial feature map to obtain a spatial-frequency fusion feature map; S4, performing hybrid coding on the extracted feature map to obtain an image feature sequence, the hybrid coding comprising: Self-attention coding: the self-attention coding takes the spatial-frequency fusion feature map as input to obtain an encoded feature map containing global context information; Cross-scale feature fusion: the cross-scale feature fusion takes the encoded feature map, the shallow spatial feature map and the deep spatial feature map as input, performs layer-by-layer fusion through a bidirectional feature aggregation network, and outputs an image feature sequence; S5, performing feature filtering, completing target class and position detection by a decoder with an auxiliary prediction head, iteratively training, and saving model parameters; S6, inputting pictures of the test set into the detection model to recognize and position targets in the images.
2. The UAV image small target detection method of claim 1, wherein, The sub-pixel-stimulating module comprises: Using a bilinear interpolation method, performing 2 times upsampling on an HxWx3 image to obtain a 2Hx2Wx3 sub-pixel image; Performing slice processing on the image, sampling every other pixel in the width and height directions of the image, and splicing in the channel dimension to obtain an HxWx12 feature map; Performing compression processing, using global average pooling to generate channel-level statistics; Using a sigmoid activation gating mechanism to stimulate to obtain a channel weight scalar; Weighting the channel weight scalar to each channel grayscale map and then performing a 1x1 convolution operation to obtain a feature map with channel weights. 3.The UAV image small target detection method of claim 1, wherein, The frequency domain feature extraction module comprises: Each channel feature map in the input feature map is decomposed into 8 sub-maps of different frequency bands through frequency band separation; Splicing all the sub-maps in the channel dimension to obtain an initial frequency domain feature map; Performing channel attention processing on the initial frequency domain feature map to obtain a channel weight matrix, and point multiplying the weight values with the initial frequency domain feature map to obtain a weighted feature map, thereby filtering out important frequency band channels. The spatial attention processing is performed on the weighted feature map to obtain spatial attention weights, and then the spatial weight values are multiplied to the weighted feature map to obtain a final frequency domain feature map.
4. The UAV image small target detection method of claim 3, wherein, The frequency band separation process is implemented as follows: Firstly, discrete Fourier transform is performed on the gray image; Then, two filters are constructed, which are a Gaussian low-pass filter and a Gaussian high-pass filter; Next, the frequency spectrum is multiplied by the filters and inverse Fourier transform is performed to obtain a gray image containing low-frequency information and high-frequency information respectively; Finally, two-dimensional discrete wavelet transform is used to further decompose the high-frequency gray image and the low-frequency gray image respectively to obtain four frequency subbands: horizontal detail, vertical detail, diagonal detail and approximation subband, so that each single channel image is decomposed into eight sub-images with different frequency bands, and the resolution of each sub-image is down-sampled to half of the original image.
5. The UAV image small target detection method of claim 3, wherein, The channel attention processing adopts two different parameter matrices when calculating the attention weights, and the calculation formula is as follows: M c (U1) = σ(W2(W1(F avg (U1)) + W4(W3(F max (U1)))) In the formula, σ represents a sigmoid function, W1, W2, W3, and W4 represent different parameter matrices, F avg () represents global average pooling, F max () represents global maximum pooling, U1 represents an input feature map, M c represents an output channel attention weight matrix.
6. The UAV image small target detection method of claim 1, wherein, The frequency domain feature map and the spatial domain feature map are fused, first, n times of 3*3 convolution is performed for down-sampling, and the size of the frequency domain feature map is adjusted to be consistent with the size of the intermediate layer spatial domain feature map, then the frequency domain feature map is spliced with the intermediate layer spatial domain feature map in the channel dimension.
7. The UAV image small target detection method of claim 1, wherein, The self-attention encoding is realized by four stacked encoder layers, each encoder layer includes two key sub-layers: a multi-head self-attention layer and a feed-forward neural network layer, and each layer is provided with layer normalization and residual connection.
Citation Information
Patent Citations
Small target detection method and system based on visual attention mechanism
CN117274661A
Remote sensing image super-resolution reconstruction method based on multi-stage space-frequency combination
CN118052712A