Giter Club home page Giter Club logo

swin-msp's Introduction

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

Paste .mat file and .pth file in hsi_data/ and output/swin_msp_pt/ respectively. you can download from the following links:

Dataset mat file weights file
PaviaU PaviaU.mat
PaviaU_gt.mat
download

Fine-tune

For PaviUniversity Dataset:

Specify the weight file path in the --pretrained parameter, such as output/swin_msp_pt/PaviaU/ckpt_epoch_499.pth:

python swin_msp_ft.py --cfg configs/finetune/swin_msp_ft_pu.yaml --pretrained output/swin_msp_pt/PaviaU/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

swin-msp's People

Contributors

tearre avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  avatar

swin-msp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.