JACYI / EFM-Net-Pytorch

Apache License 2.0
16 stars 0 forks source link

EFM-Net: An Essential Feature Mining Network for Target Fine-Grained Classification in Optical Remote Sensing Images

By Yonghao Yi (Student Member, IEEE) , Yanan You (Member, IEEE) , Chao Li, and Wenli Zhou.

Special thanks to Haopeng Zhang for providing the dataset source file for FGSCR-42.

Introduction

This code provides an reference version for the implementation of the IEEE-TGRS paper “EFM-Net: An Essential Feature Mining Network for Target Fine-Grained Classification in Optical Remote Sensing Images”. The projects are still under construction.

How to run

Prepare the datasets

If you want to use the training and testing sets divided in this paper, please click on the following link to download.

Download the public benchmark datasets and unzip them in your own path.

Move the directory with train and test sub-directories to the ./datasets/ directory and rename it with database name, such as

mv FGSC23 /path/to/EFM-Net-Pytorch/datasets/FGSC-23

Make sure your datasets are correctly split into the training set and test set. The training set should be placed in the directory named “train” while test set named “test”.

The source files download links of those public datasets can be found in https://github.com/JACYI/Dataset-for-Remote-Sensing.

Download the pre-trained model

The feature extraction model is based on ConvNeXt-Base. Please download the pre-trained parameters file:

"convnext_base_22k": "https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_224.pth",

and move the pre-trained model to ./pretrained directory.

Build the running environment

  1. Create the virtual environment:
conda create -n efmnet python=3.8
source activate efmnet
  1. requirements

For Training

  1. Run on a single GPU
python main.py --exp_name test --attentions 16 --epochs 100 --dataset FGSC-23 --output_dir logs/test --novel_loss 0.5
  1. Run on multiple GPUs (2 GPUs for example)
python -m torch.distributed.launch --master_port 12345 \
 --nproc_per_node=2 main.py \
 --exp_name test --attentions 16 \
 --epochs 120 --dataset FGSC-23 \
 --output_dir logs/test --novel_loss 0.5

Citation

More details need to be added.

@ARTICLE{10097708,
  author={Yi, Yonghao and You, Yanan and Li, Chao and Zhou, Wenli},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={EFM-Net: An Essential Feature Mining Network for Target Fine-Grained Classification in Optical Remote Sensing Images}, 
  year={2023},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TGRS.2023.3265669}
}

Corresponding author information

Yanan You, Beijing, China,

Phone: (+86) 15201148169

Email: youyanan@bupt.edu.cn

To do

  1. Support more feature extraction models;
  2. Provide more interfaces for modifying parameters.