Skip to content

Demo code of "LESSFormer: Local-Enhanced Spectral-Spatial Transformer for Hyperspectral Image Classification"

Notifications You must be signed in to change notification settings

immortal13/LESSFormer-hyperspectral-image-classification

Repository files navigation

LESSFormer-hyperspectral-image-classification

Demo code of "LESSFormer: Local-Enhanced Spectral-Spatial Transformer for Hyperspectral Image Classification"

Step 1: prepare dataset

Xiong’an (1580 × 3750 pixels): http://www.hrs-cas.com/a/share/shujuchanpin/2019/0501/1049.html

Clipped Xiong’an (800 × 1000 pixels, Xiong’an[300:1100, 1500:2500, :]): 百度网盘,提取码 1313 or Google Drive

I have also organized the processing codes "HSI_dataset_processing.py" so that you can obtain your own experiment areas. 🫡🫡

Pavia University: https://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes

Houston University (withouot cloud): https://github.com/danfenghong/IEEE_TGRS_SpectralFormer

Step 2: compiling cuda files

cd lib
. install.sh ## please wait for about 5 minutes

you can also refer to ESCNet for the compiling process.

Step3: train and test

cd ..
CUDA_VISIBLE_DEVICES=7 python main.py

Step4: record classification result

image

Citation

If you find this work interesting in your research, please kindly cite:

@article{zou2022lessformer,
  title={LESSFormer: Local-enhanced spectral-spatial transformer for hyperspectral image classification},
  author={Zou, Jiaqi and He, Wei and Zhang, Hongyan},
  journal={IEEE Transactions on Geoscience and Remote Sensing},
  volume={60},
  pages={1--16},
  year={2022},
  publisher={IEEE}
}

Thank you very much! (^▽^)

This code is constructed based on vit-pytorch, ESCNet, and CEGCN, thanks~💕.

If you have any questions, please feel free to contact me (Jiaqi Zou, immortal@whu.edu.cn).

About

Demo code of "LESSFormer: Local-Enhanced Spectral-Spatial Transformer for Hyperspectral Image Classification"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published