# RS-DETR: An Improved Remote Sensing Object Detection Model Based on RT-DETR
## 3 Methodology
### The EBiFPN Module  
In complex scenarios such as occlusion and overlap, RT-DETR's CNN-based cross-scale feature fusion (CCFF) has difficulty capturing intricate feature interactions, potentially leading to false positives and missed detections. To address this issue, we propose an EBiFPN to strengthen feature fusion across scales, thereby improving detection performance in complex remote sensing images. Furthermore, we incorporate low-level features that contain richer small-target information into the feature fusion process to improve small-target detection accuracy. The bidirectional feature pyramid network (BiFPN) [37] is a feature pyramid structure enabling bidirectional information flow between resolution levels, which better integrates low- and high-level features. It also employs an adaptive feature adjustment mechanism that learns weights to adjust features across different levels, meeting the requirements of various tasks. The EBiFPN adopts an architecture similar to BiFPN, with several key improvements. First, we introduce DySample [38] for upsampling that is designed from the perspective of point sampling. Compared to kernel-based dynamic upsamplers, DySample reduces computational load and increases feature map resolution without adding extra burden. Additionally, we have designed an adaptive fusion method to enhance the overall fusion effect. The architecture of EBiFPN is shown in Figure 3.  
RT-DETR employs the nearest neighbor interpolation method for up-sampling, a simple method that can degrade image quality, making the up-sampled image appear unrealistic or blurred. Additionally, this method does not account for the semantic information in the image. To address these limitations, we introduce the DySample up-sampling operator. The structure of DySample is shown in Figure 4. The input feature map of size \(C\times H\times W\) is first processed by a sampling point generator to generate a sample set. DySample then utilizes a grid sampling function to resample \(X\) to \(X^{{}^{\prime}}\) through the sampling set. The sampling point generator, a key component of DySample, generates offsets \(O\) through a combination of linear layers, dynamic scope factors, and pixel shuffle sub-pixel convolution. These offsets are added to the original grid positions \(G\) to obtain the final sample set \(S\). The dynamic scope factors enhance offset flexibility and reduce overlapping issues. The process is defined as follows:  
\[O=0.5\textit{sigmoid}(\textit{linear}_{1}(X))\cdot\textit{linear}_{2}(X). \tag{1}\]  
DySample achieves high-quality up-sampling by combining dynamic point sampling with scope factor adjustment and group up-sampling strategies, effectively restoring low-resolution feature maps to high resolution and preserving spatial detail. This enables the  
Figure 3: The architecture of EBiFPN. model to more accurately localize small targets. Additionally, the upsampling process samples points directly in the feature map instead of using a convolutional kernel. By avoiding time-consuming dynamic convolutions and eliminating additional subnetworks for dynamic kernels, DySample significantly reduces the computational burden, thereby improving the model's running speed. The adaptive fusion is shown in Figure 5. Assume the input feature map size is (bs, C, H, W). First, a convolution operation is applied to the input feature map, reducing the number of channels from C to 3, corresponding to the three different inputs that will be weighted. After concatenation and Softmax operations, a spatial adaptive weight map of size (bs, 3, H, W) is obtained. The spatially adaptable weights are subsequently employed to integrate the three input feature maps. For each spatial position (\(h\), \(w\)) and batch index \(b\), the output is calculated as follows:  
\[\text{Output}_{b,c,h,w}=\sum_{i=1}^{3}\text{Weight}_{b,j,h,w}\cdot\text{ Input}_{b,i,c,h,w}. \tag{2}\]  
The sum is taken across the three channels to produce the final output at each spatial location.