Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 2.16 KB

File metadata and controls

75 lines (48 loc) · 2.16 KB

SwinMSP: A Shifted Windows Masked Spectral Pretraining Model for Hyperspectral Image Classification

[Paper]


The repository contains the implementation of the paper "SwinMSP: A Shifted Windows Masked Spectral Pretraining Model for Hyperspectral Image Classification"

SwinMSP.png

Installation


pip install -r requirements.txt

You may install torch and torchvision manually.

torch==1.12.0
torchvision==0.13.0

Usage


Fine-tune

For PaviUniversity Dataset:
python swin_msp_ft.py --cfg configs/finetune/swin_msp_ft_pu.yaml --pretrained output/swin_msp_pt/ckpt_epoch_499.pth --runs 10

The results will be saved in the cls_result directory. The class map will be saved in the cls_map directory. The running log will be saved in the log directory. The weights will be saved in the output directory.

Pre-train

For PaviUniversity Dataset:
python swin_msp_pt.py --cfg configs/pretrain/swin_mae_pt_pu.yaml --tag swin_msp_pt_pu

Citation


@ARTICLE{10606196,
  author={Tian, Rui and Liu, Danqing and Bai, Yu and Jin, Yu and Wan, Guanliang and Guo, Yanhui},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={Swin-MSP: A Shifted Windows Masked Spectral Pretraining Model for Hyperspectral Image Classification}, 
  year={2024},
  volume={62},
  number={},
  pages={1-14},
  keywords={Hyperspectral imaging;Task analysis;Feature extraction;Image classification;Computer architecture;Computational modeling;Long short term memory;Hyperspectral image (HSI) classification;pretraining model;Swin-MAE;transformer},
  doi={10.1109/TGRS.2024.3431517}}

Acknowledgement


DeepHyperX, Swin-Transformer, Swin-MAE, SpectralFormer, MAEST, morphFormer