Home

Awesome

MambaHSI: Spatial-Spectral Mamba for Hyperspectral Image Classification

<div align="center">

Yapeng Li, Yong Luo, Lefei Zhang, Zengmao Wang*, Bo Du*

</div> <div align="center"> <a href='https://ieeexplore.ieee.org/abstract/document/10604894'><img src='https://img.shields.io/badge/TGRS-Paper-blue'></a> </div>

šŸ“ Introduction

<div align="center"> <img src="./images/Motivation.png" alt="Motivation" width="55%"> </div>

šŸš€ Getting Started

Installation

conda create -n MambaHSI_env python=3.9
conda activate MambaHSI_env
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
pip install packaging==24.0
pip install triton==2.2.0
pip install mamba-ssm==1.2.0
pip install spectral
pip install scikit-learn==1.4.1.post1
pip install calflops

Data Preparation

The dataset can download Google Drive and BaiduNetdisk.

data
ā””ā”€ā”€ UP/
    ā”œā”€ā”€ PaviaU.mat 
    ā””ā”€ā”€ PaviaU_gt.mat
    ...
ā””ā”€ā”€ Houston/
    ā”œā”€ā”€ Houston.mat 
    ā””ā”€ā”€ Houston_GT.mat
    ...
ā””ā”€ā”€ HanChuan/
    ā”œā”€ā”€ WHU_Hi_HanChuan.mat 
    ā””ā”€ā”€ WHU_Hi_HanChuan_gt.mat
    ...
ā””ā”€ā”€ HongHu/  
    ā”œā”€ā”€ WHU_Hi_HongHu.npy
    ā””ā”€ā”€ WHU_Hi_HongHu_gt.npy

Training:

python train_MambaHSI.py --dataset_index 0
python train_MambaHSI.py --dataset_index 1
python train_MambaHSI.py --dataset_index 2
python train_MambaHSI.py --dataset_index 3

šŸŽ–ļø Main Results

<details open> <summary><font size="4"> Pavia University Results </font></summary> <img src="./images/PaviaU_results.png" alt="PaviaU" width="100%"> </details> <details open> <summary><font size="4"> Houston Results </font></summary> <img src="./images/Houston_results.png" alt="Houston" width="100%"> </details> <details open> <summary><font size="4"> HanChuan Results </font></summary> <img src="./images/HanChuan_results.png" alt="HanChuan" width="100%"> </details> <details open> <summary><font size="4"> HongHu Results </font></summary> <img src="./images/HongHu_results.png" alt="HongHu" width="100%"> </details>

Citation

If you find this project helpful for your research, please kindly consider citing our paper and give this repo ā­ļø:

@ARTICLE{MambaHSI_TGRS24,
  author={Li, Yapeng and Luo, Yong and Zhang, Lefei and Wang, Zengmao and Du, Bo},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={MambaHSI: Spatial-Spectral Mamba for Hyperspectral Image Classification}, 
  year={2024},
  volume={},
  number={},
  pages={1-16},
  keywords={Hyperspectral Image Classification;Mamba;State Space Models;Transformer},
  doi={10.1109/TGRS.2024.3430985}}

Acknowledgement

Part of our MambaHSI framework is referred to CVSSN and SSFCN. We thank all the contributors for open-sourcing.