Skip to content

ygzhu/RFA-Net

Repository files navigation

This is the PyTorch implementation of our paper:

RFA-Net: Reconstructed Feature Alignment Network for Domain Adaptation Object Detection in Remote Sensing Imagery

IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 2022

Yangguang Zhu; Xian Sun; Wenhui Diao; Hao Li; Kun Fu

What we are doing and going to do

  • Add the strong data augmentation for the training process

Installation

Prerequisites

Please refer to the environment.txt

Build

cd lib
python setup.py develop build 

Please refer to SWDA (Different from the SWDA, we have update the code to adapt PyTorch==1.0.0. The PyTorch version of SWDA is 0.4.0. You can also use the higher version of PyTorch, but some scripts may be revised. )

Data Data Preparation

Please refer to SWDA

NWPU VHR-10 Dataset

Download the dataset from Link

DIOR Dataset

Download the dataset from Link Extract the same ten classes as NWPU VHR-10 Dataset to generate DIOR*

HRRSD

Download the dataset from Link Extract the same ten classes as NWPU VHR-10 Dataset to generate DIOR*

Training

Conduct Pseudo-Label Generation

  • Please refer to Link

  • Generate the pseudo labels for DIOR* and HRRSD*

  • Formulate the DIOR_ten_class_pseudo_label and hrrsd_pseudo_label.

  • Don`t forget to register these datasets in the code.

Train the Model

Demo

  • Train the RFA-Net with vgg16 under NWPU VHR-10 Dataset (source) and DIOR* (target)
python trainval_net_RFA_Net.py --use_tfb --datase nwpu_vhr --dataset_t DIOR_ten_class_pseudo_label --net vgg16 --cuda --save_dir YOUR_PATH_TO_SAVE_THE_MODEL
  • Train the RFA-Net with res101 under NWPU VHR-10 Dataset (source) and HRRSD* (target)
python trainval_net_RFA_Net.py --use_tfb --datasenwpu_vhr --dataset_t DIOR_ten_class --net res101 --cuda --save_dir YOUR_PATH_TO_SAVE_THE_MODEL

Test the Model

  • Test the RFA-Net with res101 under NWPU VHR-10 Dataset (source) and HRRSD* (target)
python test_net_RFA_Net.py --dataset DIOR_ten_class --net res101 --cuda --load_name YOUR_CHECKPOINT_PATH

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published