Skip to content

The official code for the paper "S2Mamba: A Spatial-spectral State Space Model for Hyperspectral Image Classification" The code will be available soon.

Notifications You must be signed in to change notification settings

PURE-melo/S2Mamba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S2Mamba

The official code for the paper "S2Mamba: A Spatial-spectral State Space Model for Hyperspectral Image Classification"

Get Started

Installation

pip install -i requirement.txt

Data Preparation

Download HSI datasets and put them into the ./data directory. For example:

  './data/IndianPine.mat'
  './data/Pavia.mat'
  './data/Houston.mat'
  './data/WHU-Hi-LongKou/WHU_Hi_LongKou.mat'

Data download link: https://pan.baidu.com/s/18wTlU9ERczOfUo8WVoHVnA?pwd=aak6 Password: aak6

Training and Testing

CUDA_VISIBLE_DEVICES=0 python demo_mamba.py --dataset='Indian' --epoches=400 --patches=7 --sess s2mamba --dropout 0.4 --lr 5e-4

CUDA_VISIBLE_DEVICES=0 python demo_mamba.py --dataset='Pavia' --epoches=400 --patches=11 --sess s2mamba --dropout 0.1 --lr 5e-4

CUDA_VISIBLE_DEVICES=0 python demo_mamba.py --dataset='Houston' --epoches=100 --patches=9 --sess s2mamba --dropout 0.1 --lr 1e-4

CUDA_VISIBLE_DEVICES=0 python demo_mamba.py --dataset='WHU_Hi_LongKou' --epoches=400 --patches=9 --sess s2mamba --dropout 0.4 --lr 5e-4

Acknowledgment

Our detection code is built upon SpectralFormer and Vmamba. We are very grateful to all the contributors to these codebases.

Citation

If you appreciate our work and find this repository helpful, please consider giving a citation:

@ARTICLE{s2mamba,
  author={Wang, Guanchun and Zhang, Xiangrong and Peng, Zelin and Zhang, Tianyang and Jiao, Licheng},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={S2Mamba: A Spatial-spectral State Space Model for Hyperspectral Image Classification}, 
  year={2025},
  pages={1-1},
  doi={10.1109/TGRS.2025.3530993}}

About

The official code for the paper "S2Mamba: A Spatial-spectral State Space Model for Hyperspectral Image Classification" The code will be available soon.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages