Unmanned aerial vehicle image small target detection method based on dynamic filtering and adaptive sparse Transform
By employing dynamic filtering and adaptive sparse Transformer methods, the problems of insufficient feature extraction and high computational complexity for small targets in UAV images are solved, achieving efficient small target detection and real-time processing.
Patent Information
- Application Number
- CN202511086683.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-25
AI Technical Summary
Existing methods for small target detection in UAV images suffer from insufficient feature extraction and a significant increase in computational burden when processing high-resolution images, making it difficult to meet real-time requirements.
The method employs dynamic filtering and adaptive sparse Transformer. The UAV input image is processed by the dynamic filtering module to generate multi-scale feature maps. The adaptive sparse self-attention module is used to enhance the context modeling capability. Combined with the uncertainty minimization query selection mechanism and multi-layer Transformer decoder optimization, the final detection box is generated.
It improves the feature extraction capability of small targets, reduces computational complexity, enhances the robustness and real-time performance of small target detection, and effectively solves the occlusion problem of small targets in complex scenes.
Smart Images

Figure CN121010905A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of target detection, and in particular to a UAV image small target detection method based on dynamic filtering and adaptive sparse Transformer. BACKGROUND
[0002] In recent years, with the vigorous development of UAV technology and the reduction of manufacturing cost, UAVs have been widely used in traffic management, search and rescue, equipment inspection and other industries. Target detection is an important task, which aims to identify all objects of interest in the image and accurately determine their categories and spatial positions. However, due to the flight height of the UAV, the captured image often contains a large number of small size targets (size less than 32x32 pixels). These small size targets occupy fewer pixels in the image, resulting in sparse apparent features, making it difficult to extract discriminative features. In complex scenes, targets are easily partially or completely occluded by other objects, further reducing the feature distinguishability. The boundary information of small targets in low resolution feature maps is easily lost, increasing the positioning error. Existing target detection methods expose significant bottlenecks in such scenarios. The target feature extraction capability is limited. CNN-based methods rely on local convolution operations, with limited receptive fields, making it difficult to model global context dependencies, resulting in insufficient small target feature extraction and high miss detection rate. Although the Transformer-based method can model long-range dependencies, the standard multi-head self-attention introduces noise, and all key-value pair feature vectors are involved in the calculation, making irrelevant background regions interfere with target feature aggregation. Moreover, the computational complexity of multi-head self-attention is proportional to the square of the resolution of the input image, and when processing high-resolution UAV images, the computational burden increases dramatically, making it difficult to meet the real-time requirements.
[0003] Therefore, it is necessary to provide a UAV image small target detection method based on dynamic filtering and adaptive sparse Transformer to solve the above problems. SUMMARY
[0004] The purpose of the present application is to provide a UAV image small target detection method based on dynamic filtering and adaptive sparse Transformer, which solves the problems of insufficient small target feature extraction in existing small target detection methods and the dramatic increase in computational burden when processing high-resolution UAV images.
[0005] To achieve the above purpose, the present application provides a UAV image small target detection method based on dynamic filtering and adaptive sparse Transformer, comprising the following steps:
[0006] S1: The backbone network processes the UAV input image through the dynamic filtering module to output multi-scale feature maps {P3, P4, P5}.
[0007] S2: The high-efficiency mixed encoder performs intra-scale feature interaction on the P5 feature map, and performs inter-scale fusion on the P3, P4 feature maps and the interacted P5 feature map to generate a feature sequence.
[0008] S3: Through an uncertainty minimization query selection mechanism, an initial query with high classification and positioning reliability is screened from the feature sequence.
[0009] S4: The initial query is iteratively optimized by a multi-layer Transformer decoder, each layer updates the query through self-attention and cross-attention, outputs an object query set, and generates a final detection box through an auxiliary prediction head.
[0010] Preferably, in step S1, the following steps are specifically included:
[0011] S1.1: The UAV input image is processed by a convolutional layer and a pooling layer to extract spatial domain features and generate a primary feature map. This step serves as the basic stage of feature extraction and provides input for subsequent frequency domain conversion.
[0012] S1.2: Fast Fourier transform is performed on the primary feature map to convert the spatial domain features to frequency domain representation. Low frequency components represent global structure information, and high frequency components carry target boundary details. A Hamming window function is used to suppress spectral leakage and improve the frequency domain separability of small target features.
[0013] S1.3: A lightweight multi-layer perceptron network is used to realize a dynamic generation mechanism for frequency domain filters. This process uses a data-dependent weight calculation paradigm to enable real-time generation of complex domain filter parameters based on the global statistical characteristics of the input features. Specifically, the lightweight multi-layer perceptron network analyzes the cross-channel correlation and spectral energy distribution of the frequency domain features through a two-layer fully connected structure to dynamically generate a learnable filter kernel. This content adaptive mechanism reorganizes the channels through 1x1 convolution, maintaining spectral modulation accuracy while significantly reducing computational complexity to meet the real-time processing needs of high-resolution images.
[0014] S1.4: Element-level multiplication is performed on the dynamically generated complex domain filter and Fourier feature in the frequency domain. This modulation process realizes dynamic enhancement and noise suppression of the frequency domain features, enhances the dominant frequency band of small targets to improve the signal-to-noise ratio of small targets, and attenuates high-frequency noise components. Subsequently, the optimized frequency domain representation is reconstructed to spatial domain features through inverse fast Fourier transform, and the reconstruction process combines jump connection to maintain gradient stability. The complete dynamic filtering process is shown in the following formula:
[0015]
[0016] wherein, represents the preprocessing of the original image feature X, This represents the 2D Fast Fourier Transform. Indicates the generation of data-dependent filters. This represents the inverse fast Fourier transform.
[0017] S1.5: Through the deep evolution of the feature pyramid network, the backbone network ultimately generates three-level multi-scale feature maps {P3, P4, P5}. The highest resolution P3 is a low-level feature that retains most of the detailed features of the original image, such as texture edges and local structures. P4 is a medium-resolution feature that balances details and semantic information, adapting to medium-scale target capture. P5 is a low-resolution high-level feature that compresses spatial dimensions and integrates global context to capture high-level semantic concepts.
[0018] Preferably, step S2 specifically includes the following steps:
[0019] S2.1: The P5 feature map output by the backbone network undergoes preprocessing operations such as channel transformation.
[0020] S2.2: The preprocessed feature maps significantly enhance the contextual modeling ability of small targets in the image through an adaptive sparse self-attention module. This module cleverly combines a sparse self-attention branch to effectively filter background noise and a dense self-attention branch to ensure the integrity of global dependencies, thereby improving the quality of feature representation while reducing redundant information. Specifically, the sparse self-attention branch uses ReLU. 2 The activation function calculates the attention score. The attention mechanism is sparsified by removing negatively correlated scores, selectively focusing on key-value pairs with high matching degrees. This helps suppress interference from irrelevant regions such as background noise. The dense self-attention branch uses a standard softmax layer, preserving all token interactions to ensure sufficient information flow and maintain global contextual dependencies. These two branches are fused using adaptive weights. The specific formula is as follows:
[0021] A=(w1×SSA+w2×DSA)V (2)
[0022] Where w1 and w2 represent the weights of the sparse self-attention branch and the dense self-attention branch, respectively, SSA represents the sparse self-attention branch, DSA represents the dense self-attention branch, and V represents the preprocessed P5 feature map.
[0023] S2.3: After preprocessing, feature map A is input together with the multi-scale feature map output by the backbone network into the inter-scale feature fusion module. This module adopts a bottom-up path structure, and processes adjacent scale features step by step through multiple fusion blocks composed of 1×1 convolutional layers and N reparameterizable modules. It uses a dual-path feature fusion mechanism to transfer the rich semantic information of low-resolution features to high-resolution features. While refining features in the channel dimension, it achieves cross-scale feature fusion, significantly enhances the representation ability of the detail layer and improves the semantic transfer efficiency.
[0024] Preferably, step S3 specifically includes the following steps:
[0025] S3.1: The multidimensional feature tensor output by the encoder is reshaped into a sequence format through a spatial dimension flattening operation. At the same time, a learnable position encoding vector is embedded to preserve spatial structure information, generating a geometrically perceptive serialized encoder feature matrix, which establishes visual feature primitives that conform to the sequence input specification for the subsequent decoder.
[0026] S3.2: The classification probability distribution and bounding box location confidence based on encoder features are constructed using KL divergence to create a joint uncertainty measure. This entropy value explicitly captures the predictive consistency of features in semantic classification and spatial localization tasks; the smaller the value, the stronger the discriminative power of the feature. The formula is as follows:
[0027] U(X)=||P(X)-C(X)|| (3)
[0028] Where C(X) represents the classification probability distribution of the encoder features, and P(X) represents the bounding box location confidence of the encoder features.
[0029] S3.3: During the training phase, uncertainty scores are calculated for features at all positions within a batch. The Gumbel-TopK algorithm is used to select the top K (K=300) features with the lowest scores, i.e., the most stable high-confidence features. The selected feature subset is then projected onto a pre-defined model dimensional space through a linear transformation layer, generating an initial object query in the form of a real matrix with K rows and K columns. This process is essentially a semantic distillation operation in the feature space, compressing high-dimensional visual features into a compact semantic representation that the decoder can process. This adaptive query construction scheme completely replaces the traditional heuristic method of manually pre-setting anchor boxes in object detection, allowing the decoder to directly obtain a high-information-entropy feature subset as the starting point for optimization.
[0030] Preferably, step S4 specifically includes the following steps:
[0031] S4.1: The input to the decoder consists of 300 high-confidence object query vectors selected by the uncertainty minimization mechanism and a semantic enhancement feature sequence generated by the efficient hybrid encoder. The two inputs carry object-level semantic priors and pixel-level visual features, respectively, forming the dual-modal cognitive basis of the decoder.
[0032] S4.2: Establish implicit semantic relationships between initial queries through a self-attention layer. This operation allows query vectors to be mutually calibrated through an attention weight matrix, forming a collaborative perceptual field between objects, as shown in the following formula:
[0033]
[0034] Where Q, K, and V are all obtained by linear transformation of the initial query feature vector, and d k Let K be the dimension size.
[0035] S4.3: A multi-scale deformable attention mechanism is used to achieve deep fusion of query features and image features. The corresponding K and V are obtained by direct linear transformation of the multi-scale feature sequence generated by the efficient hybrid encoder.
[0036] S4.4: The classification branch goes through a dimension transformation layer and a class projection layer, and the final output is converted into multi-label probabilities by the Sigmoid function. An adaptive focusing loss function is used to solve the foreground-background sample imbalance problem.
[0037] S4.5: The regression branch passes through the feature expansion layer, nonlinear transformation layer, and coordinate output layer, and finally outputs the normalized bounding box coordinates. The generalized intersection-union loss function is used to constrain the geometric consistency of the bounding box.
[0038] S4.6: The output of each layer of the decoder participates in the loss calculation, constructing deep supervision. The loss function is as follows:
[0039]
[0040] Where, λ cls and λ box These are the classification loss weights and regression loss weights, respectively. and These represent classification loss and regression loss, respectively.
[0041] Therefore, the present invention employs the above-mentioned method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer, which has the following beneficial effects:
[0042] (1) This invention incorporates a dynamic filter module into the backbone network, achieving global feature interaction with linear complexity through Fast Fourier Transform. This solves the problems of insufficient feature extraction and high computational complexity in traditional CNN methods.
[0043] (2) The present invention uses an adaptive sparse attention with a dual-branch design to replace the original multi-head attention. The sparse branch filters low-relevance interactions, the dense branch retains key information, and the gating machine suppresses redundant channels, focuses on discriminative features, and reduces parameter redundancy.
[0044] (3) This invention designs a collaborative innovation architecture. The bottom layer strengthens basic features through global interaction in the frequency domain, while the top layer comprehensively utilizes spatial attention denoising, channel-dimensional pruning, and lightweight upsampling kernels to replace traditional interpolation for information optimization. This architecture inherits the advantages of the DETR encoder and avoids post-processing delays. Through joint optimization of spatial and channel dimensions, the robustness of detecting occluded small targets is effectively improved. Attached Figure Description
[0045] Figure 1 This is a framework diagram of a small target detection method for UAV images based on dynamic filtering and adaptive sparse Transformer according to the present invention.
[0046] Figure 2 This is a block diagram of the dynamic filtering module of the present invention;
[0047] Figure 3 This is a block diagram of the adaptive sparse Transformer module of the present invention; Detailed Implementation
[0048] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0049] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0050] The terms "comprising" or "including" as used in this invention mean that the element preceding the term encompasses the element listed after the term, and do not exclude the possibility of encompassing other elements. Terms such as "inner," "outer," "upper," and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In this invention, unless otherwise explicitly specified and limited, the term "attached" and similar terms should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral part; it can refer to a direct connection or an indirect connection through an intermediate medium; it can refer to the internal communication of two elements or the interaction relationship between two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0051] like Figure 1 As shown, this invention provides a method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer, mainly including the following steps:
[0052] S1: The backbone network processes the UAV input image through a dynamic filtering module and outputs multi-scale feature maps {P3,P4,P5}.
[0053] S2: The high-efficiency hybrid encoder performs intra-scale feature interaction on the P5 feature map and performs inter-scale fusion of the P3 and P4 feature maps with the interacted P5 feature map to generate a feature sequence.
[0054] S3: Through an uncertainty-minimizing query selection mechanism, select initial queries with high classification and high location confidence from the feature sequence.
[0055] S4: The initial query is iteratively optimized through multiple Transformer decoders. Each layer updates the query through self-attention and cross-attention, outputting an object query set, which is then used by an auxiliary prediction head to generate the final detection box.
[0056] S1: The backbone network processes the UAV input image through a dynamic filtering module and outputs multi-scale feature maps {P3,P4,P5}.
[0057] Preferably, the UAV input image is processed through convolutional and pooling layers to extract spatial domain features and generate a primary feature map. This step serves as the foundational stage for feature extraction, providing input for subsequent frequency domain transformation. For example... Figure 2As shown, a Fast Fourier Transform (FFT) is performed on the primary feature map to convert the spatial domain features into a frequency domain representation. Low-frequency components represent global structural information, while high-frequency components carry target boundary details. A Hamming window function is used to suppress spectral leakage and improve the frequency domain separability of small target features.
[0058] Furthermore, a dynamic generation mechanism for frequency domain filters is implemented through a lightweight multilayer perceptron network. This process employs a data-dependent weighting paradigm, enabling the complex domain filter parameters to be generated in real time based on the global statistical characteristics of the input features. Specifically, the lightweight multilayer perceptron network analyzes the cross-channel correlation and spectral energy distribution of frequency domain features through a two-layer fully connected structure, dynamically generating learnable filter kernels. This content-adaptive mechanism uses 1×1 convolution for channel recombination, significantly reducing computational complexity while maintaining spectral modulation accuracy, thus meeting the real-time processing requirements of high-resolution images.
[0059] It is worth noting that element-wise multiplication is performed on the dynamically generated complex domain filter and Fourier features in the frequency domain. This modulation process achieves dynamic enhancement and noise suppression of the frequency domain features, improving the signal-to-noise ratio of small targets by strengthening the dominant frequency band while attenuating high-frequency noise components. Subsequently, the optimized frequency domain representation is reconstructed to spatial domain features through inverse fast Fourier transform. The reconstruction process incorporates skip connections to maintain gradient stability. The complete dynamic filtering process is shown in the following formula:
[0060]
[0061] in, This indicates the preprocessing of the original image features X. This represents the 2D Fast Fourier Transform. Indicates the generation of data-dependent filters. This represents the inverse fast Fourier transform.
[0062] Finally, through the deep evolution of the feature pyramid network, the backbone network ultimately generates three levels of multi-scale feature maps {P3, P4, P5}. The highest resolution P3 is a low-level feature that retains most of the detailed features of the original image, such as texture edges and local structures. P4 is a medium-resolution feature that balances details and semantic information, adapting to medium-scale object capture. P5 is a low-resolution high-level feature that compresses spatial dimensions and integrates global context to capture high-level semantic concepts.
[0063] S2: The high-efficiency hybrid encoder performs intra-scale feature interaction on the P5 feature map and performs inter-scale fusion of the P3 and P4 feature maps with the interacted P5 feature map to generate a feature sequence.
[0064] Preferably, the P5 feature map output by the backbone network undergoes preprocessing operations such as channel transformation.
[0065] Furthermore, such as Figure 3 As shown, the preprocessed feature map significantly enhances the contextual modeling ability of small targets in the image through an adaptive sparse self-attention module. This module cleverly combines a sparse self-attention branch to effectively filter background noise and a dense self-attention branch to ensure the integrity of global dependencies, thereby improving the quality of feature representation while reducing redundant information. Specifically, the sparse self-attention branch uses ReLU. 2 The activation function calculates the attention score. The attention mechanism is sparsified by removing negatively correlated scores, selectively focusing on key-value pairs with high matching degrees. This helps suppress interference from irrelevant regions such as background noise. The dense self-attention branch uses a standard softmax layer, preserving all token interactions to ensure sufficient information flow and maintain global contextual dependencies. These two branches are fused using adaptive weights. The specific formula is as follows:
[0066] A=(w1×SSA+w2×DSA)V (2)
[0067] Where w1 and w2 represent the weights of the sparse self-attention branch and the dense self-attention branch, respectively, SSA represents the sparse self-attention branch, DSA represents the dense self-attention branch, and V represents the preprocessed P5 feature map.
[0068] Finally, after preprocessing, feature map A is input together with the multi-scale feature map output by the backbone network into the inter-scale feature fusion module. This module adopts a bottom-up path structure, which processes adjacent scale features step by step through multiple fusion blocks composed of 1×1 convolutional layers and N reparameterizable modules. It uses a dual-path feature fusion mechanism to transfer the rich semantic information of low-resolution features to high-resolution features, refines features in the channel dimension, and achieves cross-scale feature fusion, which significantly enhances the representation ability of the detail layer and improves the semantic transfer efficiency.
[0069] S3: Through an uncertainty-minimizing query selection mechanism, select initial queries with high classification and high location confidence from the feature sequence.
[0070] Preferably, the multidimensional feature tensor output by the encoder is reshaped into a sequence format through a spatial dimension flattening operation, while a learnable position encoding vector is embedded to retain spatial structure information, generating a geometrically perceptive serialized encoder feature matrix, which establishes visual feature primitives that conform to the sequence input specification for the subsequent decoder.
[0071] Furthermore, a joint uncertainty measure is constructed using KL divergence between the classification probability distribution and bounding box location confidence based on encoder features. This entropy explicitly captures the predictive consistency of features in semantic classification and spatial localization tasks; a smaller value indicates stronger feature discriminative power. The formula is as follows:
[0072] U(X)=||P(X)-C(X)|| (3)
[0073] Where C(X) represents the classification probability distribution of the encoder features, and P(X) represents the bounding box location confidence of the encoder features.
[0074] Finally, during the training phase, uncertainty scores are calculated for features at all positions within a batch. The Gumbel-TopK algorithm is used to select the top K (K=300) features with the lowest scores, representing the most stable and high-confidence features. This selected feature subset is then projected onto a predefined model dimensional space through a linear transformation layer, generating an initial object query in the form of a real matrix with K rows and K columns. This process is essentially a semantic distillation operation in the feature space, compressing high-dimensional visual features into a compact semantic representation that the decoder can process. This adaptive query construction scheme completely replaces the traditional heuristic method of manually presetting anchor boxes in object detection, allowing the decoder to directly obtain a high-information-entropy feature subset as a starting point for optimization.
[0075] S4: The initial query is iteratively optimized through multiple Transformer decoders. Each layer updates the query through self-attention and cross-attention, outputting an object query set, which is then used by an auxiliary prediction head to generate the final detection box.
[0076] Preferably, the decoder's input consists of 300 high-confidence object query vectors selected by an uncertainty minimization mechanism and a semantically enhanced feature sequence generated by an efficient hybrid encoder. These two inputs carry object-level semantic priors and pixel-level visual features, respectively, forming the dual-modal cognitive foundation of the decoder. An implicit semantic association between the initial queries is established through a self-attention layer. This operation allows the query vectors to be mutually calibrated through an attention weight matrix, forming a collaborative perceptual field between objects, as shown in the following formula:
[0077]
[0078] Where Q, K, and V are all obtained by linear transformation of the initial query feature vector, and d k Let K be the dimension size.
[0079] Furthermore, a multi-scale deformable attention mechanism is adopted to achieve deep fusion of query features and image features. The corresponding K and V are obtained by direct linear transformation of the multi-scale feature sequence generated by the efficient hybrid encoder.
[0080] It is worth noting that the classification branch goes through a dimensionality transformation layer and a class projection layer, and the final output is converted into multi-label probabilities by the Sigmoid function. An adaptive focusing loss function is used to solve the foreground-background sample imbalance problem. The regression branch goes through a feature expansion layer, a nonlinear transformation layer, and a coordinate output layer to finally output normalized bounding box coordinates. The generalized intersection-union loss function is used to constrain the geometric consistency of the bounding box.
[0081] Finally, the output of each layer of the decoder participates in the loss calculation to construct deep supervision. The loss function is as follows:
[0082]
[0083] Where, λ cls and λ box These are the classification loss weights and regression loss weights, respectively. and These represent classification loss and regression loss, respectively.
[0084] Therefore, this invention employs a small target detection method for UAV images based on dynamic filtering and adaptive sparse Transformer. This method introduces a dynamic filtering module into the backbone network, achieving efficient global feature interaction through data-dependent frequency domain operations while maintaining linear computational complexity. Simultaneously, an adaptive sparse Transformer module is introduced for intra-scale feature interaction, enhancing the network's ability to focus on key information at high semantic levels and effectively suppressing noise interaction and feature redundancy. This achieves efficient prediction of the location and category information of small targets in UAV images.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer, characterized in that, Includes the following steps: S1: The backbone network processes the UAV input image through a dynamic filtering module and outputs multi-scale feature maps {P3,P4,P5}. S2: The high-efficiency hybrid encoder performs intra-scale feature interaction on the P5 feature map and performs inter-scale fusion of the P3 and P4 feature maps with the interacted P5 feature map to generate a feature sequence. S3: Through an uncertainty-minimizing query selection mechanism, select initial queries with high classification and high location confidence from the feature sequence. S4: The initial query is iteratively optimized through multiple Transformer decoders. Each layer updates the query through self-attention and cross-attention, outputting an object query set, which is then used by an auxiliary prediction head to generate the final detection box.
2. The method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer according to claim 1, characterized in that, The specific method for step S1 is as follows: S1.1: The drone input image is processed through convolutional and pooling layers to extract spatial domain features and generate a primary feature map. This step serves as the foundation for feature extraction, providing input for subsequent frequency domain transformation. S1.2: Perform a Fast Fourier Transform on the primary feature map to convert the spatial domain features into a frequency domain representation. Low-frequency components represent global structural information, while high-frequency components carry target boundary details. A Hamming window function is used to suppress spectral leakage and improve the frequency domain separability of small target features. S1.3: A dynamic generation mechanism for frequency domain filters is implemented through a lightweight multilayer perceptron network. This process employs a data-dependent weighting paradigm, enabling the complex domain filter parameters to be generated in real time based on the global statistical characteristics of the input features. Specifically, the lightweight multilayer perceptron network analyzes the cross-channel correlation and spectral energy distribution of frequency domain features through a two-layer fully connected structure, dynamically generating learnable filter kernels. This content-adaptive mechanism uses 1×1 convolution for channel recombination, significantly reducing computational complexity while maintaining spectral modulation accuracy, thus meeting the real-time processing requirements of high-resolution images. S1.4: In the frequency domain, element-wise multiplication is performed on the dynamically generated complex domain filter and Fourier features. This modulation process achieves dynamic enhancement and noise suppression of the frequency domain features, improving the signal-to-noise ratio of small targets by strengthening the dominant frequency band while attenuating high-frequency noise components. Subsequently, the optimized frequency domain representation is reconstructed to spatial domain features through inverse fast Fourier transform. The reconstruction process incorporates skip connections to maintain gradient stability. The complete dynamic filtering process is shown in the following formula: in, This indicates the preprocessing of the original image features X. This represents the 2D Fast Fourier Transform. Indicates the generation of data-dependent filters. This represents the inverse fast Fourier transform. S1.5: Through the deep evolution of the feature pyramid network, the backbone network ultimately generates three-level multi-scale feature maps {P3, P4, P5}. The highest resolution P3 is a low-level feature that retains most of the detailed features of the original image, such as texture edges and local structures. P4 is a medium-resolution feature that balances details and semantic information, adapting to medium-scale target capture. P5 is a low-resolution high-level feature that compresses spatial dimensions and integrates global context to capture high-level semantic concepts.
3. The method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer according to claim 1, characterized in that, The specific method for step S2 is as follows: S2.1: The P5 feature map output by the backbone network undergoes preprocessing operations such as channel transformation. S2.2: The preprocessed feature maps significantly enhance the contextual modeling ability of small targets in the image through an adaptive sparse self-attention module. This module cleverly combines a sparse self-attention branch to effectively filter background noise and a dense self-attention branch to ensure the integrity of global dependencies, thereby improving the quality of feature representation while reducing redundant information. Specifically, the sparse self-attention branch uses ReLU. 2 The activation function calculates the attention score. The attention mechanism is sparsified by removing negatively correlated scores, selectively focusing on key-value pairs with high matching degrees. This helps suppress interference from irrelevant regions such as background noise. The dense self-attention branch uses a standard softmax layer, preserving all token interactions to ensure sufficient information flow and maintain global contextual dependencies. These two branches are fused using adaptive weights. The specific formula is as follows: A=(w1×SSA+w2×DSA)V(2) Where w1 and w2 represent the weights of the sparse self-attention branch and the dense self-attention branch, respectively, SSA represents the sparse self-attention branch, DSA represents the dense self-attention branch, and V represents the preprocessed P5 feature map. S2.3: After preprocessing, feature map A is input together with the multi-scale feature map output by the backbone network into the inter-scale feature fusion module. This module adopts a bottom-up path structure, and processes adjacent scale features step by step through multiple fusion blocks composed of 1×1 convolutional layers and N reparameterizable modules. It uses a dual-path feature fusion mechanism to transfer the rich semantic information of low-resolution features to high-resolution features. While refining features in the channel dimension, it achieves cross-scale feature fusion, significantly enhances the representation ability of the detail layer and improves the semantic transfer efficiency.
4. The method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer according to claim 1, characterized in that, The specific method for step S3 is as follows: S3.1: The multidimensional feature tensor output by the encoder is reshaped into a sequence format through a spatial dimension flattening operation. At the same time, a learnable position encoding vector is embedded to preserve spatial structure information, generating a geometrically perceptive serialized encoder feature matrix, which establishes visual feature primitives that conform to the sequence input specification for the subsequent decoder. S3.2: The classification probability distribution and bounding box location confidence based on encoder features are constructed using KL divergence to create a joint uncertainty measure. This entropy value explicitly captures the predictive consistency of features in semantic classification and spatial localization tasks; the smaller the value, the stronger the discriminative power of the feature. The formula is as follows: U(X)=||P(X)-C(X)||(3) Where C(X) represents the classification probability distribution of the encoder features, and P(X) represents the bounding box location confidence of the encoder features. S3.3: During the training phase, uncertainty scores are calculated for features at all positions within a batch. The Gumbel-TopK algorithm is used to select the top K (K=300) features with the lowest scores, i.e., the most stable high-confidence features. The selected feature subset is then projected onto a pre-defined model dimensional space through a linear transformation layer, generating an initial object query in the form of a real matrix with K rows and K columns. This process is essentially a semantic distillation operation in the feature space, compressing high-dimensional visual features into a compact semantic representation that the decoder can process. This adaptive query construction scheme completely replaces the traditional heuristic method of manually pre-setting anchor boxes in object detection, allowing the decoder to directly obtain a high-information-entropy feature subset as the starting point for optimization.
5. The method for small target detection in UAV images based on dynamic filtering and adaptive sparse Transformer according to claim 1, characterized in that, The specific method for step S4 is as follows: S4.1: The input to the decoder consists of 300 high-confidence object query vectors selected by the uncertainty minimization mechanism and a semantic enhancement feature sequence generated by the efficient hybrid encoder. The two inputs carry object-level semantic priors and pixel-level visual features, respectively, forming the dual-modal cognitive basis of the decoder. S4.2: Establish implicit semantic relationships between initial queries through a self-attention layer. This operation allows query vectors to be mutually calibrated through an attention weight matrix, forming a collaborative perceptual field between objects, as shown in the following formula: Where Q, K, and V are all obtained by linear transformation of the initial query feature vector, and d k Let K be the dimension size. S4.3: A multi-scale deformable attention mechanism is used to achieve deep fusion of query features and image features. The corresponding K and V are obtained by direct linear transformation of the multi-scale feature sequence generated by the efficient hybrid encoder. S4.4: The classification branch goes through a dimension transformation layer and a class projection layer, and the final output is converted into multi-label probabilities by the Sigmoid function. An adaptive focusing loss function is used to solve the foreground-background sample imbalance problem. S4.5: The regression branch passes through the feature expansion layer, nonlinear transformation layer, and coordinate output layer, and finally outputs the normalized bounding box coordinates. The generalized intersection-union loss function is used to constrain the geometric consistency of the bounding box. S4.6: The output of each layer of the decoder participates in the loss calculation, constructing deep supervision. The loss function is as follows: Where, λ cls and λ box These are the classification loss weights and regression loss weights, respectively. and These represent classification loss and regression loss, respectively.
Citation Information
Cited By
Lightweight target detection Transform model based on space-frequency domain joint modeling, method and application
CN121280870A
Remote sensing small target detection network and method based on frequency domain and space domain adaptive enhancement
CN121437859A
Historical place name classification method and device and computer readable storage medium
CN121456676A
Curve structure image enhancement method and device based on filtering and geometric constraint interaction
CN121481874A
Small target detection method and device based on dynamic state space and flow matching
CN121482370A