1. Introduction
Unmanned Aerial Vehicles (UAVs) have evolved from simple flight platforms into intelligent systems equipped with onboard edge computing capabilities. These systems can process complex algorithms in real time without continuous ground station communication, enabling critical applications such as traffic monitoring, disaster relief, tactical reconnaissance, and automated surveillance [
1,
2,
3,
4]. However, UAV vision systems face severe challenges in dense urban environments as follows: object detection must simultaneously achieve high accuracy and real-time performance. The unique characteristics of aerial imagery—including extreme scale variations, complex backgrounds, and diverse viewpoints—pose fundamental technical barriers to conventional computer vision frameworks.
In complex UAV aerial scenarios, small object detection faces multiple technical challenges. Traditional convolutional neural networks often cause irreversible loss of small object geometric details during multiple downsampling operations, while fixed receptive field designs cannot simultaneously accommodate feature extraction for objects of different scales [
5]. Although attention mechanisms show potential in global modeling, their effectiveness in shallow network layers is limited [
6,
7], and conventional feature maps often carry significant redundant information, leading to higher computational overhead. Particularly, the P5 layer (stride 32) of standard backbone networks causes complete loss of tiny object information [
8].
To address this feature degradation problem, we design a lightweight backbone network specifically tailored for UAV scenarios, adopting a
hierarchical differentiation strategy and
removing redundant deepest-layer features. In shallow layers (P2/P3), the Multi-Domain Feature Blending (MDFB) module maximizes feature reuse through dense connections and split–merge strategies; in deep layers (P4), the Hierarchical Attention-guided Feature Modulation Block (HAFMB) employs channel splitting strategies, utilizing single-head self-attention mechanisms to enhance global semantic modeling.
Meanwhile, due to dramatic variations in flight altitude and viewing angles, objects of the same category may exhibit vastly different scale distributions [
9,
10], posing severe challenges for
cross-scale feature transformation. Existing feature pyramids employ simple interpolation methods during upsampling stages, which cannot reconstruct sub-pixel level details; during downsampling stages, aliasing effects caused by strided convolutions convert high-frequency details into low-frequency noise [
11,
12]. To address this information distortion problem, we propose a high-fidelity feature transformation framework encompassing both upsampling and downsampling processes. In the upsampling stage, Channel-Adaptive Shift Upsampling (CASU), employs a channel cyclic shift mechanism to avoid interpolation blur; subsequently, the Multi-scale Context Alignment Fusion (MCAF) module utilizes bidirectional gating mechanisms to dynamically coordinate deep and shallow layer features, ensuring semantic alignment; in the downsampling stage, Diversified Residual Frequency-aware Downsampling (DRFD)
adopts a three-branch parallel architecture to suppress high-frequency aliasing effects from multiple dimensions.
More critically, the effective receptive field of traditional convolutional networks is far smaller than the theoretical value, lacking sufficient long-range dependency modeling capability for tiny objects [
5,
13,
14], which constitutes a
fundamental bottleneck for contextual reasoning. To overcome this limitation, we develop the FocusFeature module as the core aggregation node. This module
first aligns multi-scale features to a unified scale, and it then employs
parallel multi-scale large-kernel depthwise convolutions to significantly expand the effective receptive field, collaboratively capturing cross-scale long-range dependencies. The module ultimately generates semantically rich P3 and P4 features. This
dual-scale feature generation strategy (P3/P4) fully leverages the high-resolution advantage of P3 and the semantic abstraction capability of P4, significantly reducing decoder computational complexity while maintaining detection accuracy.
From the perspective of detection framework evolution, traditional methods are mainly divided into CNN-based single-stage detectors (such as RetinaNet [
15] and the YOLO series [
16,
17,
18]) and two-stage detectors (such as Faster R-CNN [
19]). Although these CNN methods perform well in general scenarios, they face significant challenges in UAV small object detection. In recent years, Transformer-based detectors have demonstrated new possibilities. DETR [
20] redefined object detection as a set prediction problem by introducing self-attention mechanisms [
21], eliminating traditional post-processing steps. RT-DETR [
22] achieved real-time detection on this foundation. Recently, DEIM [
23] achieved significant breakthroughs based on the DETR framework. By introducing the Dense O2O matching strategy and Matchability-Aware Loss, DEIM effectively addresses the sparse supervision problem in traditional one-to-one matching, demonstrating excellent performance on general object detection tasks. Nevertheless, regardless of whether they employ CNN or Transformer architectures, most current detectors are tailored for general-purpose applications and fail to effectively handle the distinctive challenges posed by aerial imagery, such as extreme scale variations, densely packed objects, and complex viewpoint changes.
Based on DEIM’s excellent performance in general object detection and its end-to-end training advantages, we select it as our baseline model. However, DEIM still faces numerous challenges in UAV aerial scenarios, as follows: its standard backbone network has insufficient feature representation capability when processing multi-scale small objects, the original feature fusion mechanism struggles to effectively integrate semantic and detail features from different hierarchical levels, and traditional downsampling operations easily cause loss of small object features. To resolve these problems, we propose HMF-DEIM (Hierarchical Multi-scale Fidelity Transformer), an end-to-end detection architecture specifically tailored for UAV small object detection. The core design philosophy of this architecture is reflected in the following aspects:
Hierarchical differentiation in the feature extraction stage: The lightweight backbone network removes redundant deepest-layer features, adopting a hierarchical strategy of MDFB (shallow layers) and HAFMB (deep layers), achieving progressive feature extraction from geometric details to semantic abstraction while maintaining parameter efficiency.
Full-chain fidelity in the feature transformation stage: The CASU-MCAF-DRFD framework constitutes a complete bidirectional closed loop—CASU achieves lossless upsampling through cyclic shifting, MCAF resolves the semantic gap between deep and shallow layers through gating mechanisms, and DRFD suppresses aliasing noise through a three-branch architecture, ensuring information integrity during cross-scale transfer.
Cross-scale reasoning in the feature aggregation stage: The FocusFeature module breaks through the locality limitation of convolutional networks through spatial alignment combined with parallel large-kernel convolutions, enabling the model to establish macro-level contextual associations while preserving micro-level details, and generates dual-level features balancing details and semantics for final decoding.
In summary, our main contributions are as follows:
Hierarchical differentiation backbone network design: We propose a lightweight backbone network specifically tailored for UAV scenarios, adopting a hierarchical differentiation strategy and removing redundant deepest-layer features to prevent small object information loss. In the shallow stage, MDFB maximizes feature reuse through dense connections and split–merge strategies, ensuring high-fidelity preservation of small object geometric features; in the deep stage, HAFMB employs a channel splitting strategy, utilizing single-head self-attention for global semantic modeling on partial channels, suppressing background noise while maintaining lightweight characteristics.
Full-chain high-fidelity feature transformation framework: We propose a high-fidelity feature transformation framework encompassing both upsampling and downsampling processes. In the upsampling stage, CASU employs a channel cyclic shift mechanism to avoid interpolation blur, effectively reconstructing sub-pixel level details; in the fusion stage, MCAF utilizes bidirectional gating mechanisms to achieve semantic alignment between deep and shallow layer features; in the downsampling stage, DRFD suppresses high-frequency aliasing effects, ensuring full-chain feature flow fidelity.
Multi-scale context-focused aggregation and dual-scale feature generation: We develop the FocusFeature module as the core aggregation node, breaking through the locality limitation of convolutional neural networks. This module first aligns multi-scale features to a unified medium resolution, and it then employs parallel multi-scale large-kernel depthwise convolutions to expand the effective receptive field, capturing cross-scale long-range dependencies, generating semantically rich medium-resolution features, and producing deep-layer features through DRFD downsampling, reducing decoder computational complexity while maintaining high-resolution detail perception.
End-to-end UAV detection architecture: We propose the HMF-DEIM architecture specifically suited for UAV small object detection. By removing deepest-layer features that cause tiny object information loss and by utilizing a dual-scale decoding strategy to optimize fine-grained feature distribution, we achieve an optimal trade-off between detection accuracy and inference speed. Experiments demonstrate that HMF-DEIM significantly outperforms the baseline DEIM and other state-of-the-art detectors on aerial datasets including VisDrone2019, AI-TOD-v2, and DOTA-v1.5, validating the effectiveness and generalization capability of our method.
The remainder of this paper is organized as follows:
Section 2 comprehensively reviews related work,
Section 3 details our proposed method,
Section 4 presents experimental results, and
Section 5 concludes the paper.
3. Proposed Method
3.1. Overall Framework
Tiny object detection in UAV aerial imagery faces the dual challenges of extreme scale variations and background interference. Multiple downsampling operations in traditional convolutional networks cause irreversible loss of high-frequency details, while existing feature pyramids struggle to balance deep-layer semantics with shallow-layer geometric details when fusing multi-scale information, often introducing noise due to aliasing effects. To resolve these problems, we propose the HMF-DEIM architecture, as illustrated in
Figure 1. This framework achieves optimization through the following four key designs: a lightweight backbone network based on MDFB and HAFMB, high-fidelity feature transformation covering the entire upsampling and downsampling process, cross-scale contextual aggregation based on multi-granularity large-kernel convolutions, and a decoder optimized for dual-scale features.
The overall pipeline is divided into four stages as follows: feature extraction, hybrid encoding enhancement, cross-scale focused aggregation, and distribution-aware decoding. In the feature extraction stage, we design a customized lightweight backbone network that adopts a hierarchical differentiation strategy and removes the redundant deepest layer P5. After initial convolution, the input image progressively generates the following three hierarchical features: P2 at the shallow layer with 4× downsampling, P3 at the middle layer with 8× downsampling, and P4 at the deep layer with 16× downsampling. In the shallow and middle layers, the Multi-Domain Feature Blending module is introduced to maximize inter-level feature reuse through split–merge strategies and dense connections, preventing the loss of tiny object geometric information. In the deep layer, the Hierarchical Attention-guided Feature Modulation Block is integrated, employing a channel splitting strategy where partial channels utilize self-attention for global semantic modeling while remaining channels preserve detail information, simultaneously introducing multi-scale depthwise convolutions to enhance local representation. The backbone network outputs the following three hierarchical features: , , and .
In the encoding and feature enhancement stage, the Transformer encoder is applied only to for global contextual modeling. The encoded progressively recovers spatial resolution through a top-down pathway. First, is processed through Channel-Adaptive Shift Upsampling and added to to obtain . Subsequently, continues through Channel-Adaptive Shift Upsampling to the shallow-layer scale and undergoes gated fusion with , dynamically coordinating fine-grained features with deep-layer semantics to resolve the semantic gap problem, generating .
In the feature aggregation stage, three feature streams are fed into the FocusFeature module as follows: carrying high-resolution details, representing middle layer features, and encoding semantic abstraction. This module first spatially aligns the three feature streams to the P3 scale. Specifically, is reduced through frequency-aware downsampling, is enlarged through Channel-Adaptive Shift Upsampling, and undergoes direct channel alignment. The aligned features are concatenated along the channel dimension, and parallel large-kernel depthwise convolutions with kernel sizes of 5, 7, 9, and 11 are employed to expand the effective receptive field, collaboratively capturing cross-scale long-range dependencies and outputting . To accommodate dual-scale decoding requirements, is further processed through frequency-aware downsampling to generate , ensuring semantic alignment while suppressing aliasing noise.
In the decoding stage, the deeply optimized and are fed into the D-FINE Transformer decoder. The dual-scale strategy offers several advantages. Removing P5 prevents complete loss of tiny object information. P3 provides fine localization capability while P4 provides semantic context, with both being complementary. Compared to three-scale schemes, computational complexity is significantly reduced to meet real-time requirements.
3.2. Lightweight Backbone Network
Standard backbone networks employ fixed receptive field convolutions, making it difficult to simultaneously accommodate shallow-layer geometric information and deep-layer semantic abstraction, while dense convolution stacking introduces redundant parameters. In particular, the P5 layer with 32× downsampling causes tiny objects to have representations smaller than one pixel in feature maps, resulting in complete information loss. For example, a small object of 16 × 16 pixels corresponds to only 0.5 × 0.5 pixels at the P5 layer, where neither geometric nor semantic information can be preserved. Therefore, we remove the P5 layer and retain the following three hierarchical features: P2 at the shallow layer with 4× downsampling, P3 at the middle layer with 8× downsampling, and P4 at the deep layer with 16× downsampling.
Our designed multi-stage backbone network adopts a hierarchical differentiation strategy. MDFB is introduced in shallow and middle layers to efficiently reuse multi-scale features and preserve geometric details, while HAFMB is deployed in the deep layer to enhance global semantic modeling, as illustrated in
Figure 2. This hierarchical design fully accommodates the level-specific requirements where shallow and middle layers demand fine details while deep layers require semantic abstraction, maintaining parameter efficiency through feature reuse and channel splitting.
3.2.1. Shallow and Middle Layer Feature Extraction Module
In shallow and middle layer stages, geometric details such as the edge textures of small objects are distributed across feature maps. The MDFB module achieves multi-scale feature interaction through a feature split–merge mechanism. Given input
, it is first mapped to a higher dimension through 1 × 1 convolution, yielding
, where
doubles the channel capacity to provide sufficient representational bandwidth for the subsequent multi-branch processing. Subsequently,
is decomposed into four parallel branches, each operating on the full or partial channels of
to capture features at different granularities as follows:
where
denotes standard convolution and
denotes depthwise convolution with kernel size
k that performs spatial convolution independently per channel. The four branches serve distinct and complementary roles. Branch
applies a standard 1 × 1 convolution to perform cross-channel feature recombination. Branch
sequentially applies a 1 × 1 convolution followed by a 3 × 3 depthwise convolution, extracting local spatial patterns such as edges and textures while maintaining per-channel independence. Branches
and
, each
, are obtained by evenly splitting
along the channel dimension, where
directly preserves original low-level geometric information as an identity shortcut, while
is forwarded for further hierarchical refinement.
To enhance representational capability, branch
is iteratively refined using InceptionDWBlock, which employs multi-scale depthwise convolution kernels such as 3 × 3 and 5 × 5 in parallel to capture multi-scale spatial patterns. Specifically, each InceptionDWBlock internally splits its input along the channel dimension into two sub-groups processed by 3 × 3 and 5 × 5 depthwise convolutions, respectively, then concatenates and fuses the outputs through a 1 × 1 pointwise convolution with a residual connection to the block input. Two InceptionDWBlocks are cascaded to progressively extract hierarchical features:
where
denotes the
i-th InceptionDWBlock. This cascaded design enables the module to capture increasingly abstract multi-scale patterns while maintaining computational efficiency. The first block
extracts initial multi-scale features from
, producing
, while the second block
further refines these features to generate
with richer spatial representations. Through this two-stage cascaded processing, the effective receptive field progressively expands from 3 × 3/5 × 5 to 5 × 5/9 × 9, enabling the capture of spatial patterns ranging from fine textures to medium-range structures.
All branches are then aggregated through dense connections, and a 1 × 1 convolution fusion operation
maps the concatenated multi-channel features back to the target dimension as follows:
The concatenation operates along the channel dimension, yielding an intermediate tensor of , and reduces the channel count back to C, performing cross-branch feature interaction and compression simultaneously. This dense connection strategy ensures that features at different processing stages are all preserved in the final output. The original split features and provide low-level geometric information, while the refined features and contribute multi-scale spatial patterns learned through the InceptionDWBlocks. The fixed-scale branches and supply complementary channel-recombined and locally filtered representations, and this six-stream dense aggregation ensures maximum feature reuse across all processing stages.
Compared to standard convolution blocks, as illustrated in
Figure 3, MDFB reduces parameter count through feature splitting and depthwise convolutions while retaining rich multi-scale feature representations, ensuring that geometric details such as small object edge textures are not lost during forward propagation.
3.2.2. Deep Layer Semantic Modeling Module
In deep-layer feature maps, the semantics of small objects have become relatively abstract, requiring a global receptive field to capture long-range context. The HAFMB module combines self-attention with multi-scale convolutions to achieve collaborative modeling of local and global features. Given input
, a channel splitting strategy is adopted to divide it into a global branch
and a local branch
, where
denotes the splitting ratio that controls the proportion of channels allocated to global self-attention modeling. We set
by default, equally partitioning channels between the global and local branches. This balanced allocation ensures that sufficient channels are devoted to capturing long-range dependencies via self-attention, while the remaining channels preserve local detail information. The selection of
is empirically validated through ablation experiments in
Section 4.4.1, a channel splitting strategy is adopted to divide it into a global branch
and a local branch
. In the global branch, spatial feature enhancement is performed through single-head self-attention as follows:
where
,
, and
are the query, key, and value mapping functions, respectively, and
is the dimension of query and key vectors. Multi-scale depthwise convolution branches are simultaneously introduced to enhance local representation, and final fusion is achieved through residual connections as follows:
Through channel splitting and single-head attention design, global modeling capability is maintained while meeting lightweight requirements, providing semantically robust feature representations for the detection head.
3.3. High-Fidelity Feature Transformation Mechanism
Traditional methods employ nearest-neighbor or bilinear interpolation for upsampling, which cannot reconstruct sub-pixel level geometric details, leading to the degradation of small object edge sharpness and texture information. Meanwhile, simple concatenation of shallow and deep layer features ignores the essential differences in semantic hierarchy and spatial alignment, causing spatial misalignment during feature fusion. In the downsampling direction, when strided convolutions or max pooling directly reduce resolution, insufficient sampling rates trigger aliasing effects that convert high-frequency details into low-frequency noise. We propose a high-fidelity transformation framework covering the entire upsampling and downsampling process. The upsampling stage avoids interpolation blur through a channel cyclic shift mechanism, transforming resolution recovery into channel-spatial reorganization. The deep–shallow layer fusion stage resolves the semantic gap through bidirectional gating mechanisms, achieving adaptive alignment. The downsampling stage suppresses aliasing distortion through a three-branch parallel architecture.
3.3.1. Channel-Adaptive Shift Upsampling
To address the inherent deficiencies of traditional upsampling, we reformulate the resolution recovery problem as channel-spatial reorganization. Given input
, local spatial patterns are first extracted through depthwise convolution as follows:
Subsequently, a channel shift mixing operation is introduced to cyclically shift feature channels along spatial dimensions, enabling adjacent positions to capture context from different receptive fields. For an upsampling factor of
, the shift operation is formalized as follows:
where
denotes the shift vector for the
i-th channel. The shift direction is determined by a fixed cyclic assignment based on the channel index as follows:
, where
corresponds to upward, downward, leftward, and rightward shifts, respectively. This deterministic pattern ensures that every four consecutive channels uniformly cover all cardinal directions, enabling the subsequent pointwise convolution to aggregate information from all four spatial neighborhoods for
sub-pixel reconstruction without introducing any learnable parameters.
where
denotes pointwise convolution implemented as 1 × 1 convolution, and
represents the activation function. This design effectively alleviates edge blur caused by traditional interpolation, providing a high-quality resolution foundation for subsequent deep–shallow layer feature fusion.The network are illustrated in
Figure 4.
3.3.2. Multi-Scale Context Alignment Fusion
Relying solely on high-fidelity upsampling is insufficient to bridge the semantic gap between deep and shallow layer features. Shallow layer features are rich in spatial details but have low semantic abstraction, while deep layer features possess rich semantics but limited resolution. The two exhibit significant distributional differences in feature space. We dynamically regulate fusion weights through bidirectional gating mechanisms to achieve adaptive balance between semantics and details.
Given the upsampled deep layer feature
and the shallow layer feature
at the same resolution, adaptive gating weights are first generated through independent 1 × 1 convolutions as follows:
where
denotes the Sigmoid activation function, and
control the fusion proportions of shallow and deep layer features, respectively, achieving pixel-wise adaptive weight allocation.
Based on the gating weights, bidirectional interaction enhancement is performed. Shallow layer features are refined through deep layer semantic guidance, while deep layer features recover local textures through shallow layer detail compensation:
This formula achieves the self-enhancement of shallow layer features and the selective incorporation of deep layer semantics through the gating mechanism, where the term ensures complementary balance between the two types of information.
Finally, the bidirectionally enhanced features are aggregated through channel concatenation and convolution as follows:
This operation concatenates the enhanced shallow layer features with the upsampled deep layer features along the channel dimension, learning the optimal fusion strategy through the convolutional layer. This enables the network to adaptively adjust the contributions of deep and shallow layer information according to object scale and scene complexity. For regions with dense small objects, the gating mechanism tends to preserve more shallow layer details, while in complex background regions, it relies on deep layer semantics for feature filtering.
3.3.3. Frequency-Aware Downsampling (DRFD)
Traditional strided convolutions or pooling operations act as low-pass filters. When the sampling rate is insufficient, high-frequency details such as small object edge textures undergo spectral aliasing, converting into unrecoverable noise. To address this problem, we adopt a three-branch parallel architecture, termed Diversified Residual Frequency-aware Downsampling (DRFD)
Figure 5, to capture features from the following three dimensions: detail preservation, semantic extraction, and feature enhancement. The branches are fused through residual connections to minimize information loss.
Given input
, the features are distributed into the following two main paths: a detail preservation path and a semantic-enhancement path, where the latter further consists of a convolution branch and a pooling branch, forming three parallel branches in total. The
detail preservation branch employs the Cut operation, which performs Space-to-Depth transformation by periodically rearranging pixels from 2 × 2 neighborhoods into the channel dimension, achieving lossless geometric reorganization as follows:
where
represents the sub-pixel grid sampled with stride 2 at position
, with
. This operation avoids high-frequency information loss inherent in traditional downsampling, completely preserving the original feature distribution.
The
semantic extraction branch and
feature enhancement branch extract abstract features and key object responses through strided convolution and max pooling, respectively, as follows:
The semantic branch employs 3 × 3 convolution with stride 2 to learn contextual semantics, with outputs sequentially processed through batch normalization and GELU activation. The enhancement branch highlights local peak features through 2 × 2 max pooling, with outputs processed through batch normalization. The two branches collaborate in a complementary manner as follows: the convolution branch learns feature abstraction capability while the pooling branch enhances responses in object regions. Together they compensate for the insufficiency of the detail branch in semantic understanding.
After concatenating the three feature streams along the channel dimension, cross-channel interaction is performed through a convolutional layer with dimensionality reduction to the target channel count as follows:
This fusion strategy embodies the residual philosophy. The Cut branch preserves original detail information, while the convolution and pooling branches supplement semantic and enhancement features. The complementary mechanism among the three branches effectively suppresses downsampling aliasing effects, significantly improving the representation capability of deep layer features for small objects.
3.4. Multi-Scale Context Focus Aggregation
Although high-fidelity feature transformation ensures complete information transmission across hierarchical levels, the effective aggregation of multi-scale features still faces the fundamental challenge of limited receptive fields. The effective receptive field of networks is typically much smaller than the theoretical receptive field and concentrates in the central region of feature maps, resulting in the low utilization of edge information. For tiny objects that inherently lack discriminative texture features, long-range spatial context must be relied upon for inference.
We design the Multi-Scale Contextual Focus Aggregation module, termed FocusFeature (
Figure 6), inspired by the collaborative working mechanism of human foveal and peripheral vision. This module serves as the central hub of the feature pyramid, simultaneously receiving three feature streams from different processing stages as follows:
carrying high-resolution details,
representing middle layer features, and
encoding semantic abstraction. Multi-granularity spatial context focusing is achieved within a single module through parallel large-kernel depthwise convolutions.
First, spatial alignment is performed on the three inputs at different scales. To unify features to the P3 scale with 8× downsampling, frequency-aware downsampling using the three-branch architecture described in Equations (12)–(14) is applied to
, Channel-Adaptive Shift Upsampling using the shift reorganization mechanism described in Equations (6)–(8) is applied to
, and
undergoes direct channel alignment through 1 × 1 convolution. We concatenate the aligned features along the channel dimension, thereby obtaining a unified multi-scale representation
as follows:
where
and
denote the frequency-aware downsampling and Channel-Adaptive Shift Upsampling operations, respectively.
After obtaining the aligned features, a multi-granularity parallel focusing mechanism is introduced, where depthwise convolution kernels of different sizes
simultaneously operate on
. Small kernels capture local fine textures, corresponding to the high-resolution perception of foveal vision, while large kernels establish long-range spatial dependencies, simulating the wide-field background understanding of peripheral vision. The parallel multi-kernel outputs are fused with the original features through residual connections and undergo cross-channel interaction via pointwise convolution as follows:
Through the FocusFeature module, multi-granularity receptive field coverage ranging from 5 × 5 to 11 × 11 is achieved within a single aggregation layer. Compared to traditional FPN architectures that require stacking dozens of convolutional layers to achieve equivalent receptive fields, this design significantly improves computational efficiency. More importantly, this parallel large-kernel architecture enables the model to perceive deep-layer environmental semantic context through large kernels while preserving the shallow-layer geometric details of tiny objects, achieving cross-scale reasoning capability that discerns the significant from the subtle.
To accommodate the dual-scale input requirements of the decoder,
directly serves as the enhanced P3 feature. Simultaneously, to generate semantically consistent deep-layer features,
is fed into the frequency-aware downsampling module again for 2× downsampling as follows:
This design ensures that and are highly aligned in contextual semantics, while the three-branch architecture further suppresses aliasing noise when generating P4 features, maintaining semantic fidelity. Compared to traditional three-scale schemes, the dual-scale features significantly reduce decoder computational complexity while avoiding information loss of small objects.
3.5. Decoder and Training Strategy
To preserve the advantages of end-to-end training, we inherit the decoder architecture and training strategy from DEIM, while performing key adaptations for UAV small object detection. The deeply optimized dual-scale features at the middle layer with 8× downsampling and at the deep layer with 16× downsampling are fed into the D-FINE Transformer decoder. This decoder redefines the regression task as a distribution modeling problem and progressively refines prediction results on dual-scale feature maps through an IoU-aware query selection strategy.
The training phase employs Dense O2O matching strategy and Matchability-Aware Loss. Dense O2O strengthens supervision signals by increasing the number of target matches per image, addressing the sparse supervision problem inherent in traditional one-to-one matching. Matchability-Aware Loss performs adaptive optimization for matches of different quality levels, applying stronger supervision to high-quality matches while adopting more relaxed constraints for low-quality matches, significantly accelerating model convergence. This training strategy is particularly suitable for detecting dense small objects in UAV scenarios, improving training efficiency while ensuring accuracy.
Although P2 features are extracted by the backbone, they are deliberately excluded from the final decoding stage. This is because P2 at resolution would incur quadratic attention complexity in the Transformer decoder, violating real-time constraints, while its semantically weak responses may introduce low-level noise that degrades query matching quality. Crucially, P2 information is not discarded but already absorbed into and through the upstream MCAF gated fusion and FocusFeature large-kernel aggregation, rendering direct P2 decoding both redundant and counterproductive.
Unlike DEIM, our decoder only performs predictions on dual-scale features consisting of P3 and P4, avoiding the loss of small object information caused by the deepest layer features. This design maintains the advantages of end-to-end training while achieving specialized optimization for UAV small object detection, ultimately generating high-confidence bounding boxes and category scores.
5. Conclusions
This paper presents HMF-DEIM, a novel end-to-end detection architecture specifically designed to address the challenges of small object detection in UAV aerial scenarios. Based on comprehensive analyses and validations, we confirm that fusing hierarchical differential feature extraction, full-link high-fidelity feature transformation, and cross-scale contextual focus aggregation can effectively boost detection performance under multi-scale conditions and complex aerial environments.
HMF-DEIM achieves significant performance gains across multiple benchmark datasets. On the VisDrone2019 test set, it improves mAP50 by 2.1% and mAP50–95 by 1.6% compared to the baseline, with a remarkable relative improvement of 21.3% in APs for tiny object detection. On the AI-TOD-v2 test set, the model demonstrates increases of 6.2% in mAP50 and 2.7% in mAP50–95, while on the DOTA-v1.5 validation set, improvements of 5.4% in mAP50 and 4.4% in mAP50–95 are achieved. Ablation studies further confirm the synergistic effectiveness of each architectural component as follows: removing the redundant P5 layer yields a 5.7% improvement in APs while reducing computational cost, and the progressive integration of MDFB, HAFMB, and the high-fidelity transformation modules demonstrates clear cumulative gains. Notably, HMF-DEIM achieves a TensorRT FP16 inference speed of 465FPS on an NVIDIA A100 GPU, fully meeting the stringent real-time processing requirements of UAV onboard platforms. The overall experimental findings verify that the model performs effectively in complicated real-world UAV environments and exhibits great promise for real applications.
Although the proposed method achieves notable gains, several aspects warrant further investigation. First, the multi-scale large-kernel convolutions in the FocusFeature module, while effective for expanding the receptive field, increase GFLOPs by approximately 37% compared to the baseline; future work will explore decomposed convolution strategies and alternative feature aggregation schemes to retain cross-scale modeling capacity while cutting computational costs. Second, objects under severe occlusion in dense urban scenarios remain challenging; occlusion-aware learning mechanisms capable of reconstructing holistic object features from partial visibility will be investigated, with particular emphasis on discriminating between visually confusable categories such as pedestrians and people. Third, objects of extremely small scale (below 8×8 pixels) continue to pose difficulties despite our improved architecture, as evidenced by the AI-TOD-v2 experiments in which 86% of targets measure under 16 pixels; improved shallow-layer feature representations and purpose-built attention mechanisms for sub-pixel objects will be pursued. Beyond these, adaptive multi-resolution processing pipelines will be explored to efficiently manage ultra-high-resolution aerial imagery on resource-limited UAV systems, and hardware-aware compression strategies—namely quantization and pruning—will be adopted to facilitate efficient deployment on UAV onboard processors, reconciling computational efficiency with detection performance by leveraging dedicated neural processing hardware.