Thanks to visit codestin.com
Credit goes to github.com

Skip to content

weix-liu/AFSP

Repository files navigation

Multi-level Domain Perturbation for Source-free Object Detection in Remote Sensing Images

A Pytorch Implementation of Multi-level Domain Perturbation for Source-free Object Detection in Remote Sensing Images.

Introduction

Please follow DA_Detection respository to setup the environment. In this project, we use Pytorch 0.4.0.

Datasets

Datasets Preparation

Datasets Format

All codes are written to fit for the format of PASCAL_VOC.
If you want to use this code on your own dataset, please arrange the dataset in the format of PASCAL, make dataset class in lib/datasets/, and add it to lib/datasets/factory.py, lib/datasets/config_dataset.py. Then, add the dataset option to lib/model/utils/parser_func.py.

Models

Pre-trained Models

In our experiments, we used two pre-trained models on ImageNet, i.e., VGG16 and ResNet101. Please download these two models from:

Download them and write the path in __C.VGG_PATH and __C.RESNET_PATH at lib/model/utils/config.py.

Train

Source domain train:

CUDA_VISIBLE_DEVICES=$GPU_ID \
python  trainval_SF_source.py   --cuda --lr 0.001  --net res101  --dataset gta_car --dataset_t  ucas_car   --save_dir training/SF

and SFOD train:

CUDA_VISIBLE_DEVICES=$GPU_ID \
python trainval_SF_mt_afsp.py --cuda --lr 0.001  --net res101  --dataset gta_car --dataset_t  ucas_car   --save_dir training/SF --load_name training/SF/res101/gta_car/SF_source_False_target_ucas_car_gamma_5_1_3_9999.pth

Test

Source model test:

CUDA_VISIBLE_DEVICES=$GPU_ID \
test_SF_source.py  --dataset ucas_car --net res101 --cuda --load_name training/SF/res101/gta_car/SF_source_False_target_ucas_car_gamma_5_1_3_9999.pth

and SFOD model test:

CUDA_VISIBLE_DEVICES=$GPU_ID \
python test_SF_mt_afsp.py --dataset ucas_car --net res101 --cuda --load_name training/SF/res101/gta_car/SF_mt_afsp_target_ucas_car_1_7_1019.pth

Citation


Liu W, Liu J, Su X, Nie H, Luo B. Multi-level Domain Perturbation for Source-free Object Detection in Remote Sensing Images. Geo-spatial Information Science, 2024.

The arXiv preprint version:
@article{liu2024source,
title={Source-free Domain Adaptive Object Detection in Remote Sensing Images},
author={Liu, Weixing and Liu, Jun and Su, Xin and Nie, Han and Luo, Bin},
journal={arXiv preprint arXiv:2401.17916},
year={2024}
}

About

Multi-level Domain Perturbation for Source-free Object Detection in Remote Sensing Images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published