Abstract
Existing DEtection TRansformer-based (DETR) object detection methods have been widely applied to standard object detection tasks, but still face numerous challenges in detecting small objects. These methods frequently miss the fine details of small objects and fail to preserve global context, particularly under scale variation or occlusion. The resulting feature maps lack sufficient spatial and structural information. Moreover, some DETR-based models specifically designed for small object detection often have poor generalization capabilities and are difficult to adapt to datasets with diverse object scales and complex backgrounds. To address these issues, this paper proposes a novel object detection model—small object detection with efficient multi-scale collaborative attention and depth feature fusion based on DETR (ED-DETR)—which consists of three core modules: an efficient multi-scale collaborative attention mechanism (EMCA), DepthPro, a zero-shot metric monocular depth estimation model, and an adaptive feature fusion module for depth maps and feature maps. Specifically, EMCA extends the single-space attention mechanism in efficient multi-scale attention (EMA) to a composite structure of parallel spatial and channel attention, enhancing ED-DETR’s ability to express features collaboratively in both spatial and channel dimensions. DepthPro generates depth maps to extract depth information. The adaptive feature fusion module integrates depth information with RGB visual features, improving ED-DETR’s ability to perceive object position, scale, and occlusion. The experimental results show that ED-DETR achieves the current best 33.6% mAP on the AI-TOD-V2 dataset, which predominantly contains tiny objects, outperforming previous CNN-based and DETR-based methods, and shows excellent generalization performance on the VisDrone and COCO datasets.
1. Introduction
Small object detection is essential for real-world applications such as drone-based aerial surveillance, autonomous driving, and intelligent security systems. Despite advancements in generic detection technologies, detecting small objects remains difficult. Small objects often occupy extremely few pixels in images and exhibit blurred texture features and scarce geometric structures. In aerial imagery or congested scenes, dense distributions and background occlusion complicate detection. These factors make it difficult for traditional detection models to extract effective information from low-resolution features, resulting in missed detections and false positives. Therefore, improving semantic extraction and feature discriminability from limited pixels is required.
Current research in small object detection primarily follows two directions: Convolutional Neural Network (CNN)-based methods and Transformer-based architectures. Early CNN-based ones, such as two-stage R-CNN series and single-stage YOLO series, perform well in generic detection tasks due to their robust local feature extraction capabilities and efficient inference speeds. However, these methods rely on prior knowledge, including hand-crafted anchors and complex post-processing strategies like non-maximum suppression. This dependency limits generalization in dense scenarios. Furthermore, the local receptive fields inherent to CNNs fail to capture long-range contextual dependencies. With the advent of DETR, Transformer-based end-to-end detectors have become a standard paradigm.
DETR utilizes self-attention mechanisms to model global relationships, thereby eliminating the need for cumbersome post-processing steps. To address slow convergence and suboptimal performance on small objects inherent in the original DETR, many models have been introduced. For general improvements, Deformable-DETR [1] introduces a deformable attention module that samples only a limited set of key points around reference points, mitigating the high computational complexity of the original Transformer, while DINO-DETR [2] stabilizes training via contrastive denoising. Specifically targeting the small object domain, DAB-DETR [3] introduces 4D anchor boxes to provide explicit spatial guidance, while DDQ [4] employs dense distinct queries to improve recall rates. Building on these, DQ-DETR handles instance imbalance by dynamically adjusting query volume and position. However, while these methods optimize query strategies or feature pyramids, they rely on RGB appearance features, which often lack sufficient power in complex backgrounds or under severe occlusion.
Integrating geometric perception into Transformer-based detection is a current research focus. Many studies use depth guidance to improve feature representation. For instance, MonoDETR [5] introduces a depth-aware Transformer that predicts foreground depth maps to explicitly guide object queries, while D-ViT [6] utilizes normalizing flows to embed depth priors into vision Transformers for precise localization. However, while these approaches effectively leverage geometric cues for 3D localization, they predominantly focus on cross-modal alignment, often overlooking the fine-grained synergy required across spatial and channel dimensions. Consequently, this limits feature discriminability and background noise suppression.
To bridge these gaps and address the limitations of existing DETR-based approaches, we face the following specific challenges:
- Lack of efficient spatial-channel collaborative attention mechanisms: The features of small objects are weak and easily overwhelmed by background noise. Existing attention mechanisms often suffer from trade-offs. For instance, deformable attention [1] prioritizes sparse spatial sampling but neglects channel-wise semantic correlations. Conversely, traditional attention mechanisms such as SE [7] or ECA [8] concentrate on channel recalibration but often degrade spatial localization. The lack of synergistic optimization between spatial and channel dimensions limits the ability to isolate fine-grained details from background noise.
- Neglect of geometric depth prior utilization: Most DETR-based methods rely solely on RGB appearance features. However, small objects in 2D images often lack discriminability due to their sizes and similarity to the background. Overlooking depth, which provides geometric spatial information, limits the model’s ability to perceive the physical position and scale of targets under occlusion or complex backgrounds. This results in insufficient detection robustness.
To address these limitations, this work introduces a high-performance and innovative paradigm for small object detection: small object detection with efficient multi-scale collaborative attention and depth feature fusion based on DETR (ED-DETR). The architecture improves feature representation through the efficient multi-scale collaborative attention (EMCA) module. This module uses a dual-branch parallel structure that combines EMA-based [9] spatial attention with self-attention-based channel attention via a gating mechanism. This design refines features across spatial and channel dimensions, improving the resolution of local details for small objects. To address the absence of geometric information, we introduce a DepthPro (available at https://github.com/apple/ml-depth-pro, accessed on 11 October 2025) [10] module. Leveraging monocular depth estimation, this module generates high-resolution depth maps to provide precise geometric and scale priors. These multimodal cues are then synthesized via an adaptive feature fusion module, which aligns depth information with RGB features to ensure robustness regarding object position and scale in complex scenarios. The main contributions of this study are as follows:
- We propose EMCA and integrate DepthPro for monocular depth map generation. This combination allows the model to capture local object details while preserving global context.
- We fuse depth features with RGB visual features through an adaptive fusion mechanism, thereby enhancing our model’s perception robustness regarding object position, scale, and occlusion.
- Experimental results show that ED-DETR outperforms current methods on the AI-TOD-V2 dataset while exhibiting strong generalization performance on the VisDrone and COCO datasets.
The remainder of this paper is organized as follows: Section 2 reviews the current research status of small object detection methods. Section 3 presents ED-DETR model and elaborates on the functionality of its core modules. Section 4 describes the datasets utilized in our experiments and compares ED-DETR’s performance against state-of-the-art approaches. Finally, Section 5 concludes this paper.
2. Related Work
2.1. Small Object Detection Based on CNN
Identifying minute targets is fraught with difficulties stemming from limited pixel counts, extensive scale fluctuations, environmental noise, and target blockage. The emergence of deep learning has led to the widespread adoption of CNN in this domain. To overcome issues such as low resolution and large-scale variations of small objects, researchers introduce multi-scale feature extraction methods. For example, the Feature Pyramid Network (FPN) proposed by Lin et al. [11] extracts multi-level, multi-scale features, enabling small objects to benefit from the comprehensive fusion of low-level detail information with high-level semantic information. Additionally, the integration of attention mechanisms has seen extensive adoption within the domain of small object detection. For instance, the squeeze-and-excitation module [7] focuses on channel attentions. CBAM [12] extends an attention mechanism to both channel and spatial dimensions. Additionally, Ma et al. [13] propose linking multiple attention modules together to allow for the free flow of information, enhancing collaboration between attention modules rather than just inserting a single isolated module. These modules are used to help a model focus on key regions in an image, reducing interference from irrelevant backgrounds. Ren et al. propose a faster R-CNN model [14] which introduces region proposal networks to enable end-to-end training, improving object detection speed and achieving near real-time performance. Ji et al. [15] introduce super-resolution techniques to enhance the details of small objects in low-resolution images, improving image quality. To enhance the precision of small object detection while curbing computational overhead, Zhu et al. [16] utilize a knowledge distillation approach to relay expertise from a sophisticated teacher model to its more compact student model counterpart.
Although CNN-based methods have advanced small object detection, they face specific limitations. They typically rely on fixed anchor boxes and prior knowledge for object localization, which makes them poorly adapted to small objects. When the object size is much smaller than an anchor box, detection accuracy tends to decrease significantly. These models exhibit limitations in modeling global context information, a factor that is indispensable for small object detection. This is because small objects are frequently overwhelmed by complex background information, which poses hurdles for the detector to accurately identify their subtle features.
2.2. Small Object Detection Based on Transformer
Transformer models have recently been adapted for object detection. The Vision Transformer (ViT) [17] first applies a Transformer architecture to image processing by dividing an image into multiple patches and passing them as input sequences to a Transformer model, effectively capturing long-range dependencies within an image. The pioneering DETR [18] introduces the first end-to-end object detection framework centered on the Transformer architecture. Within this pipeline, instance-level features are derived from the input image via a Transformer encoder, while a Transformer decoder leverages a collection of learnable queries to investigate and consolidate these features, ultimately predicting object location and class information. Ultimately, DETR optimizes its model parameters through end-to-end training to achieve precise detection of objects in an image. The DETR model achieves true end-to-end training and inference through a self-attention mechanism, without the need for any post-processing operations such as NMS. Although DETR achieves results comparable to previous classic CNN-based detectors [14,19], it faces challenges regarding slow convergence and reduced accuracy in small object detection.
To address these issues, a series of DETR-based models have been proposed. Deformable-DETR [1] introduces a deformable attention mechanism, which improves object detection efficiency and accuracy, especially when processing large-scale images, thus reducing computational costs. Dynamic-DETR [20] introduces a dynamic attention mechanism, which significantly accelerates the training convergence while maintaining an end-to-end structure and improving detection accuracy. Efficient DETR [21] introduces a hierarchical attention mechanism and an improved decoder structure, which boosts the training speed and detection accuracy while reducing computational overhead. DINO-DETR [2] introduces improved denoising anchor boxes, which enable faster training convergence while significantly enhancing small object detection accuracy. DN-DETR [22] incorporates a dynamic denoising mechanism, effectively addressing the performance degradation issue during long training periods, enhancing robustness and accuracy in object detection. Although these methods show substantial improvements in convergence speed and detection accuracy, they are still limited when handling datasets with small objects and large variations in object counts. RT-DETR [23] introduces a regression-based decoder and local refinement mechanism, improving performance in small object detection and efficient training. DQ-DETR [24] proposes a dynamic query selection module, which adaptively selects different numbers of object queries in the decoder stage of DETR, enhancing its adaptability to complex datasets and significantly improving small object detection. Despite recent advancements, existing methods typically overlook the significant performance improvements offered by depth information and fail to fully exploit the synergistic collaboration between spatial and channel attention, limiting their sensitivity to small objects in complex backgrounds.
3. ED-DETR
3.1. The Framework of ED-DETR
Figure 1 illustrates the framework of ED-DETR. Built as an end-to-end DETR-based detector, ED-DETR primarily incorporates a CNN backbone, a deformable encoder–decoder [1] framework, and a set of prediction heads. Building upon DQ-DETR, we present a framework consisting of a feature preprocessing stage, an output stage and three key modules.
Figure 1.
Framework of ED-DETR.
For a feature preprocessing stage, an input image undergoes feature extraction via a CNN backbone to yield multi-scale features, which are then augmented with positional encoding prior to entering a transformer encoder. Subsequently, the categorical counting module from DQ-DETR extracts the density map and determines the number of object queries required by a decoder. After fusing a feature map with a density map, the enhanced features are further processed by three core modules for more feature details:
- EMCA: This module first performs spatial weighting through an innovative EMA [9] mechanism, processes the channel-wise information using self-attention, and optimizes spatial and channel features collaboratively through a gating mechanism and residual connections.
- DepthPro [10]: The RGB features are fed into a DepthPro depth estimation network. It serves as an auxiliary branch, predicting a dense depth map from a monocular image through an encoder–decoder structure, providing geometric priors for small object detection. The generated depth map is aligned with the original RGB image, providing geometric information for subsequent fusion.
- Adaptive feature fusion module: Through this module, we dynamically refine the fusion of RGB appearance features and depth geometric features.
For the output stage, the fused features are input into a dynamic query module, where object queries are further optimized through dynamic query selection. These queries, along with the fused features serving as keys and values, are then fed into the Transformer decoder for decoding. Finally, the predicted results are obtained through prediction heads.
3.2. Feature Preprocessing
The feature preprocessing stage prepares representations for detection tasks. Multi-scale feature maps are first extracted from a backbone network and directed to a Transformer encoder. To form the required input sequence, these feature maps are flattened (transforming each scale from to , where c represents the channel dimension, and and denote the spatial height and width of a feature map at the i-th scale, respectively) and subsequently concatenated along channel dimensions.
Furthermore, leveraging the categorical counting module proposed in DQ-DETR, we enable precise dynamic adjustment of the number of object queries for a Transformer decoder. First, the largest feature map from multi-scale feature maps undergoes dilated convolution processing to generate density map . Through density map generation, a model can predict the density and number of objects based on the distribution of targets in each image, which helps determine the required number of object queries in a decoder, thereby avoiding the computational waste and low recall rate issues caused by a fixed number of queries. When the number of objects in an image is small, a categorical counting module selects fewer object queries; otherwise, the module automatically increases the number of queries to improve detection accuracy. Meanwhile, the generated density map is fed into EMCA to enhance feature representations.
3.3. EMCA
We position EMCA after the encoder to refine multi-scale features. Since encoder downsampling reduces spatial resolution, fine-grained details for small objects are often lost. By implementing collaborative spatial-channel refinement at this stage, we recover object saliency and suppress background noise before the decoder interaction. This preserves the necessary local details alongside global semantic context for accurate localization, which is fundamental for small object detection. Structurally, EMCA integrates two complementary branches: an EMA-based spatial attention and a self-attention-based channel mechanism. By jointly optimizing features through two components, EMCA balances spatial localization with semantic channel context. This integration of local details and global context enhances the feature representation of small objects, particularly in dense and complex scenarios. The framework of EMCA is illustrated in Figure 2.
Figure 2.
The architecture of EMCA. It consists of two branches: a spatial attention branch based on an EMA mechanism (top) and a channel attention branch based on the self-attention mechanism (bottom). The meanings of the symbols “+”, “*”, and the black dot are the same as those defined in Figure 1.
3.3.1. Spatial Attention Based on EMA Mechanism
EMA is EMCA’s core component. To address high computational complexity and information loss in traditional spatial attention mechanisms when processing multi-scale images, EMA employs grouped convolutions and bidirectional pooling strategies. Initially, we perform a simple addition fusion of density map from the preprocessing stage and a feature map output from a decoder to obtain fused feature map . Specifically, we partition the input feature map into g separate groups. Here, B, C, H, and W denote the batch size, channel count, and spatial resolution (height and width), respectively. This regrouping process assigns channels to each group, resulting in a reshaped tensor .
Next, EMA introduces two parallel convolution branches. The first branch uses average pooling along horizontal and vertical axes to extract contextual information across different spatial dimensions of the image, i.e.,
where and represent horizontal and vertical average pooling operations applied to features, respectively, and and represent vertical and horizontal features obtained after pooling.
Furthermore, and are concatenated into a new feature map and processed through a 1 × 1 convolution to generate a spatially enhanced feature map , i.e.,
where ‖ denotes a feature concatenation operation.
is transformed into a spatial attention map through the activation function. Then, we derive the spatially enhanced feature map by performing element-wise multiplication between the attention map and the feature map.
where the function is denoted by , and the element-wise multiplication between features is indicated by ⊙.
The second branch uses a 3 × 3 convolution to capture broader spatial dependencies, resulting in the feature map . For and , we extract global features by using global average pooling to obtain a pooled feature map. The attention weights are then generated by reshaping the map and applying the activation function, i.e.,
Subsequently, and are reshaped to match the dimensions required for matrix multiplication with attention weights, resulting in and . The attention weights from different convolution branches are then weighted and fused with convolved features through matrix multiplication. The specific matrix multiplication computation is
where represents weighted attention weights, and M denotes matrix multiplication.
Finally, by applying the weighted attention weights to the input feature map and normalizing the weights using the function, the output feature map is generated, i.e.,
3.3.2. Channel Attention Based on Self-Attention Mechanism
To address small object detail loss and insufficient spatial feature representation in complex backgrounds, the channel attention part in EMCA is based on a self-attention mechanism, which aims to optimize the feature representation by calculating the mutual relationships between each channel.
First, we further process output feature map from EMA by applying downsampling and convolution operations to a downsampled feature map, resulting in feature map y, i.e.,
where D is downsampling achieved through pooling. It is motivated by the inherent quadratic complexity of self-attention mechanisms relative to the spatial resolution. In small object detection, maintaining high-resolution feature maps is essential for localization but leads to prohibitive computational overhead. Downsampling serves as a strategic inductive bias that filters out high-frequency spatial noise and pixel-level artifacts, thereby forcing the attention mechanism to focus on structurally robust semantic cues rather than redundant local fluctuations. At this point, feature map y has the shape , where and are the height and width of the image after downsampling.
Next, a feature map y undergoes a normalization operation to standardize it. We apply Group Normalization (GN) with a single group () to the downsampled feature y, i.e.,
Normalized feature map also has the shape of and is then passed through three Depth-Wise Convolution (DWConv) layers to generate the Query, Key, and Value matrices, i.e.,
where the Q, K, and V matrices have the shape and are used to compute inter-channel dependencies and are weighted through a self-attention mechanism.
Next, to perform multi-head attention, we partition the channel dimension C into independent heads, each with a dimension of , i.e.,
where denotes the total number of pixels in the compressed spatial domain. This option splits the channel dimension into multiple heads and flattens the spatial dimensions. This transformation facilitates the dot product computation between the query and key to directly obtain attention weights , i.e.,
where is the dimension of each attention head, and scaling factor is used to stabilize gradients and avoid excessively large or small dot products.
Next, a computed attention matrix is passed through an activation function to obtain normalized weights for each channel. By applying attention weights to value matrix V, weighted feature map is obtained, i.e.,
Subsequently, we apply global average pooling to a weighted feature map to obtain channel attention weights , with the shape . The attention weights are then further adjusted through a channel gating mechanism, i.e.,
where we use a configurable gating layer to normalize channel attention weights using the or function and perform element-wise multiplication to achieve feature enhancement. The configurable or gating adapts to distinct data characteristics. allows independent channel activation, which is ideal for dense small object scenarios, while emphasizes inter-channel competition and relative importance. It balances computational efficiency with task-specific requirements.
Finally, we multiply weight map element-wise with feature map from EMA to obtain final feature-enhanced output map , i.e.,
3.4. Depth Feature Extraction Based on DepthPro
We use the zero-shot metric depth estimation of DepthPro as an auxiliary branch to overcome the scale limitations of relative depth maps. Unlike standard approaches, DepthPro provides absolute scale information, which resolves the scale ambiguity inherent in small object detection. By integrating metric depth estimation, we inject explicit geometric priors that enable the network to disentangle tiny instances from complex backgrounds based on physical distance. It enhances localization precision without requiring domain-specific depth supervision.
In terms of implementation, we integrate the pre-trained DepthPro as a frozen auxiliary branch. During inference, depth maps are dynamically generated on-the-fly from input images, providing immediate geometric guidance. The visualization results of DepthPro are shown in Figure 3.
Figure 3.
Visualization of depth estimation results generated by DepthPro. In depth maps, higher brightness indicates objects closer to the camera, while lower brightness represents more distant objects.
DepthPro adopts a multi-scale ViT architecture, combining the advantages of depth estimation and feature extraction. DepthPro includes image preprocessing and multi-scale depth estimation. An input RGB image is first standardized and adjusted to a fixed input size , preparing it for subsequent depth estimation. After normalization, an image is fed into a network for feature extraction. We downsample into multiple scale versions , forming multi-scale inputs. For each scale of the image, the network leverages the multi-scale ViT architecture to capture long-range spatial dependencies and preserve fine-grained details, generating a high-resolution depth estimation map , i.e.,
where denotes the i-th image patch extracted at scale s, and is the depth estimation network that performs multi-scale feature extraction on an image by using ViT.
Distinct from traditional methods that rely on post-processing, DepthPro achieves boundary sharpness through rigorous training supervision. During a training phase, in addition to standard depth consistency losses, gradient constraints are applied to align the edges of the predicted depth map with the ground truth, i.e.,
where is a ground truth depth map. This optimization forces a network to learn high-frequency details effectively. In our framework, once a high-precision metric depth map is generated by DepthPro, we further employ convolutional layers to extract semantic depth features , which are used for fusion with RGB features.
DepthPro does not rely on camera intrinsics, enabling zero-shot monocular depth estimation. Traditional methods typically require camera intrinsics for depth recovery, while DepthPro directly infers absolute depth from monocular images by using a deep learning model. During training, a model optimizes depth estimation by minimizing the Mean Absolute Error (MAE) loss, i.e.,
where n serves as the total number of pixels, with and corresponding to the predicted depth and its ground truth counterpart, respectively. Through this training, DepthPro can accurately predict the depth values of each pixel without relying on camera intrinsics.
3.5. Adaptive Feature Fusion Module
The adaptive feature fusion module improves small object detection via cross-modal interaction, context enhancement and multi-scale feature fusion. By fully exploiting the complementary nature of RGB visual features and depth geometric cues, this module employs an adaptive weighting mechanism and residual connections to preserve fine-grained details. Consequently, it enhances a model’s sensitivity to small objects and robustness against occlusion and complex backgrounds. Its architecture is shown in Figure 4.
Figure 4.
The architecture of the adaptive feature fusion module. It takes the enhanced RGB features () and depth features () as inputs and fuses them through cross-modal interaction and context enhancement mechanisms to generate the final feature representation (F). The meanings of the symbols “+” and the black dot are the same as those defined in Figure 1.
Initially, the RGB feature map obtained from EMCA and depth map obtained from DepthPro are each processed through two convolutional layers, i.e.,
where and represent downsampled results of feature map and depth map , respectively. These convolutional layers reduce the number of feature channels to 1/16 of the original channels to reduce computational complexity while retaining effective feature information, thus improving computational efficiency.
After feature channel compression, we design two interaction methods for cross-modal feature interaction. The first fuses features by using an additive attention mechanism. The second processes the concatenation of two features through convolutional layers. The additive attention mechanism combines RGB and depth map features pixel-wise, and generates an initial attention map through the activation function and channel-wise averaging, i.e.,
where represents the additive attention map and represents channel average pooling.
The concatenated RGB and depth map features are then fed into a convolutional layer to further generate a convolutional attention map:
where represents a convolutional attention map, and denotes the concatenation of two features. Furthermore, we fuse two attention maps, i.e.,
where is the weighted combination of an additive attention map and a convolutional attention map, which is used to capture the complementary information between an RGB image and a depth map, thereby obtaining more refined interactive information.
To better capture the spatial structure and scale information of objects, we design a context enhancement mechanism. Two pooling operations are employed: average pooling and max pooling. They are applied to the fused attention map to enhance the contextual information at different scales, i.e.,
where and represent contextual information at two different scales obtained through average pooling and max pooling, respectively.
To further enhance the ability of feature fusion, we generate final adaptive weights through convolutional layers. These weights apply context-based weighting to the fusion of RGB and depth features, i.e.,
The fused feature map, after convolution operations, has two channels. and represent the weights extracted from the first and second channels, respectively. They are used to control the contribution of an RGB feature map and a depth features in the final output. Finally, the fused feature map F is generated as follows:
To preserve the detailed feature information, we introduce residual connections by adding a fused feature map to the original RGB feature map, further enhancing an object detection model’s sensitivity to details.
3.6. Output
3.6.1. Output Result
We incorporate the dynamic query selection strategy to address the extreme density variance inherent in small object scenarios. Unlike standard DETR methods that employ a fixed number of queries—leading to low recall in dense clusters and excessive false positives in sparse regions—our approach adaptively modulates the query volume based on the predicted instance count. By selecting top-K relevant features as priors, we replace abstract positional embeddings with explicit spatial guidance, ensuring that queries are initialized at high-confidence regions to accurately localize tiny, pixel-limited instances.
The feature map F output by an adaptive feature fusion module is fed into a dynamic query selection module. This process involves predicting the object count N via the categorical counting module and adaptively defining the number of queries as K based on the image content. Specifically, feature map F is flattened and scored to select the top-K most relevant features, denoted as , which act as priors. We then generate both content and positional information for queries based on these selected features, i.e.,
where represents the top-K features selected from F, query content is derived from via a linear mapping operation, and query position bias is predicted through a feed-forward network to compute offsets, which are then added to the original anchor boxes of the selected features to refine the query positions.
After (25), the enhanced query content and position are customized based on the density and number of objects in each image, helping the decoder more accurately localize small objects.
Following the enhancement stage, the refined queries are forwarded to a Transformer decoder. Within this module, query content and position are integrated with feature map F through a combination of self-attention and cross-attention layers, effectively formulating the final feature representation of objects. A decoder’s output is then passed through the prediction heads for final object detection. The prediction heads consist of two components: bounding box regression and object classification.
3.6.2. Loss Function
Following the standard training protocol of end-to-end detectors [18], our framework utilizes a set-centric loss objective to mandate a singular one-to-one matching between predictions and their ground-truth counterparts. This assignment is achieved via the Hungarian algorithm, which minimizes the global matching cost. The primary detection loss, denoted as :
where and represent the L1 loss and generalized IoU loss for box localization, respectively, and denotes the Focal loss used for category prediction.
Beyond the standard detection loss, our model incorporates two additional supervision signals. To optimize the density estimation capability, Cross-entropy loss is applied to the categorical counting module. To facilitate model convergence, we adopt the auxiliary decoding loss strategy, applying to the output of each decoder layer, denoted as . Consequently, the total objective function for training is
This composite loss ensures that the model jointly optimizes for object counting, precise localization, and accurate classification.
4. Experiments
4.1. Datasets
To evaluate the performance and generalization of ED-DETR in small object detection, we conducted experiments on the AI-TOD-V2 [25], VisDrone [26], and COCO datasets.
4.1.1. AI-TOD-V2
AI-TOD-V2 focuses on tiny object detection in aerial imagery. It encompasses a total of 28,036 images and 752,745 annotated instances, which are partitioned into training, validation, and testing subsets comprising 11,214, 2804, and 14,018 images, respectively. A defining trait of this dataset is the exceptionally small scale of its objects, averaging 12.7 pixels, with 86% of targets falling below the 16-pixel threshold. Object density varies from 1 to 2667 per image. These characteristics—weak feature representation and dense distribution—make detection difficult for standard IoU-based methods.
4.1.2. VisDrone
VisDrone is a benchmark for object detection in UAV-captured data. Collected across 14 cities, it covers diverse urban scenes (e.g., pedestrians and vehicles). For a detection subtask, with approximately 540,000 annotated instances, it provides 6471 training, 548 validation, and 1610 testing images. It presents challenges inherent to the drone perspective, including small object sizes, dense distributions, heavy occlusion, and scale variations.
4.1.3. COCO
It is a widely recognized benchmark for general object detection. It contains approximately 118,000 training images and 5000 validation images, covering 80 categories of everyday objects. It is known for its rich scene context, diverse object scales, and dense instance annotations, providing a standard test platform to evaluate the generalization ability of models in complex real-world environments.
Table 1 summarizes the statistical differences among datasets used in this study.
Table 1.
Statistical overview of the datasets.
4.2. Comparison Methods and Experimental Metrics
4.2.1. Comparison Methods
To evaluate the efficacy of ED-DETR, we benchmark it against a diverse set of state-of-the-art techniques within the small object detection domain, encompassing both CNN-based and DETR-based frameworks. CNN-based methods contain Yolov3 [27], Yolov5 [28], RetinaNet [29], Faster R-CNN [14], Cascade R-CNN [30], RFLA [31], DetectoRs [32], DotD [33], and NWD-RKA [25]. DETR-based methods contain DETR-DC5 [18], Deformable-DETR [1], DAB-DETR [3], DINO-DETR [2], and DQ-DETR [24]. For fairness, ResNet-50 was used as the backbone network for most of comparison models. Among CNN-based models, we employ the FPN structure for feature enhancement. For DETR-based models, we utilize multi-scale feature maps and a deformable attention mechanism.
4.2.2. Evaluation Metric
Average Precision (AP) serves as our primary evaluation criterion, with a detection cap established at 1500 instances per image. Specifically, AP is calculated by averaging precision values across the IoU threshold spectrum from 0.50 to 0.95 with a step size of 0.05. To provide a granular analysis of the AI-TOD dataset, we incorporate , , , and to quantify the model’s proficiency in detecting very tiny-, tiny-, small-, and medium-scale objects. For the COCO benchmark, however, we report , , and to reflect the detection accuracy across small, medium, and large object categories.
4.3. Experimental Setting
As a DETR-based method, ED-DETR uses ResNet50 as a backbone network and employs a 6-layer Transformer encoder–decoder structure. Our experiments are conducted by using the PyTorch framework (v2.4.0), with Python (v3.9) as the programming language, and run on an NVIDIA GeForce RTX 3090 GPU. Similar to DQ-DETR, we apply a two-stage training scheme: first, we train the categorical counting module. After stabilizing the counting, we add the proposed three modules. For the Loss function (26), we adopt hyperparameters from DQ-DETR [24], setting the weights as , , and . The experimental settings are shown in Table 2.
Table 2.
Experimental settings.
4.4. Main Results
4.4.1. Evaluation on AI-TOD-V2
We conducted a comparative study between ED-DETR and leading CNN and DETR variants, using ResNet50 as the standard backbone (excluding YOLOv3). Performance metrics detailed in Table 3 confirm the remarkable effectiveness of our approach. ED-DETR stands out due to its unique capacity to maintain high precision despite the challenges of multi-scale target variations and complex background interference.
Table 3.
Experiments on AI-TOD-V2. Bold values indicate the best performance for each metric.
From Table 3, ED-DETR outperforms the other 13 methods, achieving an AP of 33.6, which is a 3.4 percentage point improvement over the baseline model DQ-DETR. For other metrics , , , , , and , we also achieved improvements of 4.2, 3.5, 2.6, 2.8, 3, and 4.4, respectively. Figure 5 shows a visual comparison of the detection results between our model and DQ-DETR. In densely packed regions, the number of blue boxes in our model’s detection results is significantly lower than that in DQ-DETR’s. In sparse areas, the number of red boxes is also fewer in our model. The results indicate ED-DETR improves accuracy and discriminability in small object detection. The improvement of our model is mainly attributed to two factors: multi-scale feature enhancement allows our model to capture more detailed information at different scales; and the introduction of depth maps provides rich additional spatial information, enabling our model to more accurately identify and localize objects when dealing with complex backgrounds and diverse targets.
Figure 5.
Visual comparison of detection results between the proposed ED-DETR and the baseline DQ-DETR. The green, red, and blue bounding boxes represent true positives, false positives, and missed detections, respectively. Compared to DQ-DETR, our model significantly reduces missed detections in dense areas and false positives in sparse scenes, demonstrating superior capability in small object detection.
In addition to detection accuracy, we report the key efficiency metrics—inference time and parameter counts—in Table 4. ED-DETR operates with 62.2 M parameters and an inference latency of 90.2 ms. Compared to the baseline DQ-DETR, this results in a marginal increase of only 3.5 M parameters and 2.3 ms per image. These figures confirm that the proposed depth-aware modules improve performance without imposing significant computational burdens, maintaining the model’s suitability for practical deployment.
Table 4.
Comparison of model complexity, computational cost, and inference speed on AI-TOD-V2 dataset. Bold values indicate the best performance for each metric.
4.4.2. Evaluation on VisDrone
Given the high density of small targets in VisDrone, we conducted experiments on this dataset to validate detection performance and generalization. We compared our model with several state-of-the-art methods. Table 5 summarizes the comparative outcomes on the VisDrone dataset. ED-DETR attained the highest accuracy with an AP of 39.3, representing a 2.3 percentage point gain over DQ-DETR. Furthermore, in terms of detection accuracy at higher IoU thresholds, our model also shows significant advantages. For and , our model outperforms the baseline model by 2.7 and 1.3 percentage points, respectively. These results indicate that ED-DETR maintains high accuracy and robustness against scale variations and complex backgrounds.
Table 5.
Experiments on Visdrone. Bold values indicate the best performance for each metric.
4.4.3. Evaluation on COCO
The robustness and generalization capacity of our model were further scrutinized through a series of tests on the COCO 2017 dataset. Some small object detection methods have shown reduced detection performance when applied to general datasets or datasets with large variations in object sizes, as they were primarily focused on small object detection. To address this challenge, our model improves generalization by using efficient multi-scale feature enhancement and incorporating depth maps as additional information. To validate the effectiveness of these improvements, we compared our model with previous state-of-the-art methods, particularly DETR-based models. Table 6 presents the detailed experimental findings. Compared to other DETR-based models, our model achieved the best performance, with an AP of 51.8, surpassing the baseline model by 1.6 percentage points. This indicates that our model effectively addresses the performance drop in general object detection for DQ-DETR.
Table 6.
Experiments on COCO. Bold values indicate the best performance for each metric.
4.5. Ablation Study
Our model proposes three modules to enhance its small object detection capability: EMCA, DepthPro, and the adaptive feature fusion module. To assess the individual impact of each proposed component, we performed comprehensive ablation studies across the three previously described datasets, utilizing DQ-DETR as our primary baseline.
Initially, we perform ablation trials on the AI-TOD-V2 dataset, with the quantitative findings summarized in Table 7. The data confirms that every introduced module plays a vital role in enhancing the overall detection performance of ED-DETR.
Table 7.
Ablation study of different components on the AI-TOD-V2. Note that EMCA, DP, and FF represent efficient multi-Scale attention, DepthPro, and feature fusion, respectively. The checkmark symbol (✓) indicates that the corresponding module is employed. Bold values indicate the best performance for each metric.
Incorporating the EMCA module results in a 0.9 AP gain over the baseline. Integrating DepthPro with simple addition fusion increases AP by 2.7 compared to the baseline and 1.8 compared to the EMCA-only configuration. This indicates that depth information improves detection results. Finally, adding an adaptive feature fusion module further improved a model’s performance, achieving the best AP of 33.6, a 0.7 improvement over the simple addition fusion. In addition to the AP metric, each module contributes to other metrics , , , and . In summary, through the ablation study on AI-TOD-V2, we have fully shown the functionality of each module and its contribution to the final performance.
Similarly to the ablation studies conducted on the AI-TOD-V2 dataset, we performed ablation experiments on VisDrone and COCO datasets. As shown in Table 8 and Table 9, the results further validate functionality and contributions of each module in our model, thereby confirming the rationality and accuracy of our ablation studies.
Table 8.
Ablation study of different components on the VisDrone dataset. The checkmark symbol (✓) indicates that the corresponding module is employed. Bold values indicate the best performance for each metric.
Table 9.
Ablation study of different components on the COCO. The checkmark symbol (✓) indicates that the corresponding module is employed. Bold values indicate the best performance for each metric.
5. Conclusions
In this work, we present ED-DETR to tackle intrinsic challenges of small object detection in complex scenarios. By fusing the feature maps enhanced by EMCA with the high-resolution depth maps generated by DepthPro, our method effectively mitigates the issues of insufficient feature representation and scale ambiguity, attaining top-tier results on the AI-TOD-V2 benchmark while showcasing exceptional versatility across both the VisDrone and COCO evaluation platforms. While the current dual-branch architecture introduces a modest increase in computational overhead, it establishes a solid foundation for precise geometric perception. In subsequent studies, we intend to enhance the computational economy of our framework by exploring model compression strategies, such as knowledge distillation, to ensure its suitability for edge-device deployment. Furthermore, we aim to explore unified multi-task learning strategies to jointly optimize depth estimation and object detection. By sharing backbone features and refining geometric priors in an end-to-end manner, we expect to further reduce computational redundancy and facilitate real-time deployment on resource-constrained edge platforms.
Author Contributions
Conceptualization, B.S. and G.Y.; methodology, B.S. and G.Y.; software, B.S.; validation, B.S., X.Z. and C.L.; formal analysis, B.S.; investigation, B.S. and X.Z.; resources, G.Y.; data curation, B.S.; writing—original draft preparation, B.S.; writing—review and editing, G.Y., X.Z., H.W. and C.L.; visualization, B.S.; supervision, G.Y.; project administration, G.Y.; funding acquisition, H.W. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Shandong University of Science and Technology (grant number SKDHKQ20250746).
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The source code and data for the proposed ED-DETR are publicly available at https://github.com/borange12/ED-DETR (accessed on 3 February 2026).
Conflicts of Interest
The authors declare no conflict of interest.
References
- Zhu, X.; Su, W.; Lu, L.; Li, B.; Wang, X.; Dai, J. Deformable detr: Deformable transformers for end-to-end object detection. arXiv 2020, arXiv:2010.04159. [Google Scholar]
- Zhang, H.; Li, F.; Liu, S.; Zhang, L.; Su, H.; Zhu, J.; Ni, L.M.; Shum, H.Y. Dino: Detr with improved denoising anchor boxes for end-to-end object detection. arXiv 2022, arXiv:2203.03605. [Google Scholar]
- Liu, S.; Li, F.; Zhang, H.; Yang, X.; Qi, X.; Su, H.; Zhu, J.; Zhang, L. Dab-detr: Dynamic anchor boxes are better queries for detr. arXiv 2022, arXiv:2201.12329. [Google Scholar] [CrossRef] [Scilit]
- Zhang, S.; Wang, X.; Wang, J.; Pang, J.; Lyu, C.; Zhang, W.; Luo, P.; Chen, K. Dense distinct query for end-to-end object detection. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2023; pp. 7329–7338. [Google Scholar]
- Zhang, R.; Qiu, H.; Wang, T.; Guo, Z.; Cui, Z.; Qiao, Y.; Li, H.; Gao, P. MonoDETR: Depth-guided transformer for monocular 3D object detection. In 2023 IEEE/CVF International Conference on Computer Vision; IEEE: New York, NY, USA, 2023; pp. 9155–9166. [Google Scholar]
- Pan, C.; Peng, J.; Zhang, Z. Depth-guided vision transformer with normalizing flows for monocular 3D object detection. IEEE/CAA J. Autom. Sin. 2024, 11, 673–689. [Google Scholar] [CrossRef] [Scilit]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In 2018 IEEE Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2018; pp. 7132–7141. [Google Scholar]
- Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2020; pp. 11534–11542. [Google Scholar]
- Ouyang, D.; He, S.; Zhang, G.; Luo, M.; Guo, H.; Zhan, J.; Huang, Z. Efficient multi-scale attention module with cross-spatial learning. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP); IEEE: New York, NY, USA, 2023; pp. 1–5. [Google Scholar]
- Bochkovskii, A.; Delaunoy, A.; Germain, H.; Santos, M.; Zhou, Y.; Richter, S.R.; Koltun, V. Depth pro: Sharp monocular metric depth in less than a second. arXiv 2024, arXiv:2410.02073. [Google Scholar] [CrossRef] [Scilit]
- Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In 2017 IEEE Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2017; pp. 2117–2125. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Computer Vision—ECCV 2018; Springer: Cham, Switzerland, 2018; pp. 3–19. [Google Scholar]
- Ma, X.; Guo, J.; Tang, S.; Qiao, Z.; Chen, Q.; Yang, Q.; Fu, S. DCANet: Learning connected attentions for convolutional neural networks. arXiv 2020, arXiv:2007.05099. [Google Scholar] [CrossRef] [Scilit]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 28, 91–99. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ji, H.; Gao, Z.; Liu, X.; Zhang, Y.; Mei, T. Small object detection leveraging on simultaneous super-resolution. In 2020 25th International Conference on Pattern Recognition (ICPR); IEEE: New York, NY, USA, 2021; pp. 803–810. [Google Scholar]
- Zhu, Y.; Zhou, Q.; Liu, N.; Xu, Z.; Ou, Z.; Mou, X.; Tang, J. Scalekd: Distilling scale-aware knowledge in small object detector. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2023; pp. 19723–19733. [Google Scholar]
- Dosovitskiy, A. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In European Conference on Computer Vision; Springer: Cham, Switzerland, 2020; pp. 213–229. [Google Scholar]
- Tian, Z.; Shen, C.; Chen, H.; He, T. FCOS: Fully convolutional one-stage object detection. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV); IEEE: New York, NY, USA, 2019; pp. 9626–9635. [Google Scholar]
- Dai, X.; Chen, Y.; Yang, J.; Zhang, P.; Yuan, L.; Zhang, L. Dynamic detr: End-to-end object detection with dynamic attention. In 2021 IEEE/CVF International Conference on Computer Vision; IEEE: New York, NY, USA, 2021; pp. 2988–2997. [Google Scholar]
- Yao, Z.; Ai, J.; Li, B.; Zhang, C. Efficient detr: Improving end-to-end object detector with dense prior. arXiv 2021, arXiv:2104.01318. [Google Scholar]
- Li, F.; Zhang, H.; Liu, S.; Guo, J.; Ni, L.M.; Zhang, L. Dn-detr: Accelerate detr training by introducing query denoising. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2022; pp. 13619–13627. [Google Scholar]
- Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. Detrs beat yolos on real-time object detection. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2024; pp. 16965–16974. [Google Scholar]
- Huang, Y.X.; Liu, H.I.; Shuai, H.H.; Cheng, W.H. Dq-detr: Detr with dynamic query for tiny object detection. In European Conference on Computer Vision; Springer: Cham, Switzerland, 2024; pp. 290–305. [Google Scholar]
- Xu, C.; Wang, J.; Yang, W.; Yu, H.; Yu, L.; Xia, G.S. Detecting tiny objects in aerial images: A normalized Wasserstein distance and a new benchmark. ISPRS J. Photogramm. Remote Sens. 2022, 190, 79–93. [Google Scholar] [CrossRef] [Scilit]
- Zhu, P.; Wen, L.; Du, D.; Bian, X.; Fan, H.; Hu, Q.; Ling, H. Detection and tracking meet drones challenge. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 44, 7380–7399. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar] [CrossRef] [Scilit]
- Jocher, G. Yolov5 by Ultralytics. 2023. Available online: https://github.com/ultralytics/yolov5 (accessed on 15 October 2025).
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In 2017 IEEE International Conference on Computer Vision; IEEE: New York, NY, USA, 2017; pp. 2980–2988. [Google Scholar]
- Cai, Z.; Vasconcelos, N. Cascade r-cnn: Delving into high quality object detection. In 2018 IEEE Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2018; pp. 6154–6162. [Google Scholar]
- Xu, C.; Wang, J.; Yang, W.; Yu, H.; Yu, L.; Xia, G.S. RFLA: Gaussian receptive field based label assignment for tiny object detection. In European Conference on Computer Vision; Springer: Cham, Switzerland, 2022; pp. 526–543. [Google Scholar]
- Qiao, S.; Chen, L.C.; Yuille, A. Detectors: Detecting objects with recursive feature pyramid and switchable atrous convolution. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2021; pp. 10213–10224. [Google Scholar]
- Xu, C.; Wang, J.; Yang, W.; Yu, L. Dot distance for tiny object detection in aerial images. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2021; pp. 1192–1201. [Google Scholar]
- Du, B.; Huang, Y.; Chen, J.; Huang, D. Adaptive sparse convolutional networks with global context enhancement for faster object detection on drone images. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2023; pp. 13435–13444. [Google Scholar]
- Ma, Y.; Chai, L.; Jin, L. Scale decoupled pyramid for object detection in aerial images. IEEE Trans. Geosci. Remote Sens. 2023, 61, 4704314. [Google Scholar] [CrossRef] [Scilit]
- Liu, H.I.; Tseng, Y.W.; Chang, K.C.; Wang, P.J.; Shuai, H.H.; Cheng, W.H. A DeNoising FPN with transformer R-CNN for tiny object detection. IEEE Trans. Geosci. Remote Sens. 2024, 62, 4704415. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.




