Self-Attention-Based Deep Feature Fusion for Remote Sensing Scene Classification

November 4, 2022 ยท View on GitHub

Use vgg16 and SAFF for small sample classification from the paper.

Introduction

  • Extract dataset features using pretrained vgg16

  • SAFF converts features into 1D tensor

Environmental preparation

conda create -n zh python=3.9
conda activate zh
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt

Run

If your dataset is at path /hy-tmp/data Suppose you want to train on the UC dataset.

  • Feature extraction
python run.py 
--data_path /hy-tmp/data 
--extract
--dataset UC
  • Train & verify
python run.py 
--data_path /hy-tmp/data
--train
--dataset UC
--ratio 0.8

Experimental results

datasettrain_ratioacc
NWPU0.166.49
NWPU0.273.13
UC0.892.5
SAR0.889.8