MCPcopy Index your code
hub / github.com/PSRben/FusionMamba

github.com/PSRben/FusionMamba @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
66 symbols 175 edges 8 files 4 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FusionMamba

  • Code for the paper: "FusionMamba: Efficient Remote Sensing Image Fusion with State Space Model", TGRS, 2024.

  • First application of the state space model (SSM) in the hyper-spectral pansharpening and hyper-spectral image super-resolution (HISR) tasks.

  • State-of-the-art (SOTA) performance in pansharpening, hyper-spectral pansharpening, and HISR tasks.

Paper

Method

FusionMamba Block

FusionMamba

We expand the single-input Mamba block to accommodate dual inputs, creating the FusionMamba block, which can serve as a plug-and-play solution for information integration.

Experimental Results

Pansharpening

HPansharpening

Get Started

Dataset

  • Datasets for pansharpening: PanCollection. We recommend downloading datasets in the h5py format. The testing toolbox can be found here.

  • Datasets for hyper-spectral pansharpening: HyperPanCollection. We recommend downloading datasets in the h5py format.

  • Dataset for HISR: the CAVE dataset. You can find this dataset on the Internet.

  • Results for FusionMamba and a serious of methods on PanCollection: https://pan.baidu.com/s/1ARGLyvGKn57-eCl041Gk3g, key: 6271.

Installation

  1. Clone the repository:
git clone https://github.com/PSRben/FusionMamba.git
  1. Install the Mamba implementation by following the instructions in the Mamba-block directory.

  2. Install other packages:

pip install einops h5py opencv-python torchinfo scipy numpy

Usage

  • This repository is only for the pansharpening task.

  • The model weights trained on the WV3 dataset for 400 epochs can be found in the weights directory.

# train
python train.py --train_data_path ./path_to_data/train_WV3.h5 --val_data_path ./path_to_data/valid_WV3.h5
# test
python test.py --file_path ./path_to_data/name.h5 --save_dir ./path_to_dir --weight ./weights/epochs.pth

Citation

@ARTICLE{10750233,
  author={Peng, Siran and Zhu, Xiangyu and Deng, Haoyu and Deng, Liang-Jian and Lei, Zhen},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={FusionMamba: Efficient Remote Sensing Image Fusion With State Space Model}, 
  year={2024},
  volume={62},
  number={},
  pages={1-16},
  doi={10.1109/TGRS.2024.3496073}}

Contact

We are glad to hear from you. If you have any questions, please feel free to contact siran_peng@163.com.

Core symbols most depended-on inside this repo

create_window
called by 3
utils/tools.py
step
called by 3
Mamba-block/mamba_simple.py
_ssim
called by 2
utils/tools.py
save_checkpoint
called by 1
train.py
prepare_training_data
called by 1
train.py
train
called by 1
train.py
gaussian
called by 1
utils/tools.py
get_edge
called by 1
utils/load_train_data.py

Shape

Method 35
Function 16
Class 15

Languages

Python100%

Modules by API surface

model/u2net.py21 symbols
utils/tools.py11 symbols
Mamba-block/mamba_simple.py10 symbols
model/fusion_mamba.py9 symbols
utils/load_test_data.py6 symbols
utils/load_train_data.py5 symbols
train.py3 symbols
test.py1 symbols

For agents

$ claude mcp add FusionMamba \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact