A Robust Feature Downsampling Module for Remote Sensing Visual Tasks [TGRS 2023]

December 25, 2025 · View on GitHub

This is the official Pytorch/Pytorch implementation of the paper:

A Robust Feature Downsampling Module for Remote Sensing Visual Tasks
Wei Lu; Si-Bao Chen; Jin Tang; Chris H. Q. Ding; Bin Luo
IEEE Transactions on Geoscience and Remote Sensing (TGRS), 2023


We propose a new and universal downsampling module named robust feature downsampling (RFD).


Abstract Remote-sensing (RS) images present unique challenges for computer vision (CV) due to lower resolution, smaller objects, and fewer features. Mainstream backbone networks show promising results for traditional visual tasks. However, they use convolution to reduce feature map dimensionality, which can result in information loss for small objects in RS images and decreased performance. To address this problem, we propose a new and universal downsampling module named robust feature downsampling (RFD). RFD fuses multiple feature maps extracted by different downsampling techniques, creating a more robust feature map with a complementary set of features Leveraging this, we overcome the limitations of conventional convolutional downsampling, resulting in a more accurate and robust analysis of RS images. We develop two versions of the RFD module, shallow RFD (SRFD) and deep RFD (DRFD), tailored to adapt to different stages of feature capture and improve feature robustness. We replace the downsampling layers (DSL) of existing mainstream backbones with the RFD module and conduct comparative experiments on several public RS image datasets. The results show significant improvements compared to baseline approaches in RS image classification, object detection, and semantic segmentation. Specifically, our RFD module achieved an average performance gain of 1.5% on the NWPU-RESISC45 classification dataset without utilizing any additional pretraining data, resulting in state-of-the-art performance on this dataset. Moreover, in detection and segmentation tasks on dataset for object detection in aerial images (DOTA) and instance segmentation in aerial images dataset (iSAID), our RFD module outperforms the baseline approaches by 2%–7% when utilizing pretraining data from NWPU-RESISC45. These results highlight the value of the RFD module in enhancing the performance of RS visual tasks.

Application

If you want to replace the downsampling module in your network with the RFD, you can do the following:

replace:
self.conv_down = nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=2, padding=1)
to 
self.SRFD = RFD.SRFD(in_channels, out_channels) # original size to 4x downsampling layer
or
self.DRFD = RFD.DRFD(in_channels, out_channels) # Deep feature downsampling

Image Classification

1. Dependency Setup

Create a new conda virtual environment

conda create -n RFD python=3.7 -y
conda activate RFD
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch

Clone this repo and install the required packages:

git clone https://github.com/lwCVer/RFD
cd RFD/
pip install -r requirements.txt

2. Dataset Preparation

You can download our already sliced NWPU-RESISC45 dataset, or download the NWPU-RESISC45 classification dataset from the official document and structure the data as follows:

/path/to/NWPU-RESISC45/
  train/
    class1/
      img1.jpeg
    class2/
      img2.jpeg
  val/
    class1/
      img3.jpeg
    class2/
      img4.jpeg

3. Training

Swin V2 Tiny training on RESISC45 (dataset path need to be changed in train.py):

python train.py 

To train other models, train.py need to be changed.

4. Pre-trained Models on NWPU-RESISC45 (initial / +RFD)

name (initial / +RFD)type#params (M)FLOPs (G)Throughput (fps)Top-1 accmodel
GFNet-H TinyFFT14.60 / 15.682.05 / 2.432693 / 212892.27 / 94.76initial / +RFD
GFNet-H SmallFFT31.43 / 33.054.59 / 5.342405 / 246693.40 / 95.11initial / +RFD
GFNet-H BaseFFT53.01 / 55.438.53 / 9.282098 / 188694.17 / 95.46initial / +RFD
AS-MLP TinyMLP27.55 / 29.964.39 / 5.141505 / 157195.37 / 96.05initial / +RFD
AS-MLP SmallMLP48.86 / 51.278.57 / 9.321073 / 101995.27 / 96.00initial / +RFD
AS-MLP BaseMLP86.77 / 91.0515.2 / 16.44861 / 83095.63 / 95.94initial / +RFD
Swin TinyTransformer27.55 / 29.974.36 / 5.112469 / 231393.52 / 96.10initial / +RFD
Swin SmallTransformer48.87 / 51.288.52 / 9.271995 / 176293.37 / 96.16initial / +RFD
Swin BaseTransformer86.79 / 91.0615.14 / 16.371975 / 173493.19 / 96.24initial / +RFD
CSWin TinyTransformer21.83 / 22.054.08 / 4.351303 / 112793.05 / 96.11initial / +RFD
CSWin SmallTransformer34.15 / 34.376.40 / 6.67682 / 57993.56 / 96.11initial / +RFD
CSWin BaseTransformer76.65 / 77.1214.36 / 14.87481 / 40694.49 / 96.29initial / +RFD
Swin V2 TinyTransformer27.61 / 30.033.33 / 4.082009 / 198794.65 / 96.46initial / +RFD
Swin V2 SmallTransformer48.99 / 51.416.47 / 7.221273 / 82795.22 / 96.84initial / +RFD
Swin V2 BaseTransformer86.94 / 91.2211.48 / 12.711104 / 68295.63 / 96.61initial / +RFD
Mixformer TinyHybrid5.10 / 5.250.39 / 0.441287 / 119294.87 / 95.30initial / +RFD
Mixformer SmallHybrid9.89 / 10.170.88 / 0.951018 / 97595.41 / 96.03initial / +RFD
Mixformer BaseHybrid34.80 / 35.853.44 / 3.56830 / 72295.76 / 96.37initial / +RFD
ConvNeXt TinyCNN28.85 / 30.274.47 / 5.223109 / 256693.70 / 95.48initial / +RFD
ConvNeXt SmallCNN49.49 / 51.908.70 / 9.452734 / 247893.90 / 95.48initial / +RFD
ConvNeXt BaseCNN87.61 / 91.8915.38 / 16.612726 / 252095.02 / 96.13initial / +RFD

Star History

Star History Chart

Acknowledgement

This repository is built using the timm, ConvNeXt, mmdetection and mmsegmentation repositories.

If you have any questions about this work, you can contact me.

Email: luwei_ahu@qq.com; WeChat: luwei_ahu.

Your star is the power that keeps us updating github.

Citation

If you find this repository helpful, please consider citing:

@article{lu2023robust,
  title={A Robust Feature Downsampling Module for Remote Sensing Visual Tasks},
  author={Lu, Wei and Chen, Si-Bao and Tang, Jin and Ding, Chris HQ and Luo, Bin},
  journal={IEEE Transactions on Geoscience and Remote Sensing},
  volume={61},
  pages={1--12},
  year={2023},
  publisher={IEEE}
}