README.md

November 19, 2025 ยท View on GitHub

XFMamba: Cross-Fusion Mamba for Multi-View Medical Image Classification

Introduction

This repository contains the code for our paper:
XFMamba: Cross-Fusion Mamba for Multi-View Medical Image Classification
[Paper on arXiv] โ€” Accepted at MICCAI 2025.

XFMamba Architecture


Environment

  1. Create a new environment:

    conda create -n xfmamba python=3.10
    conda activate xfmamba
    
  2. Install dependencies:

    pip install torch==2.2 torchvision torchaudio triton pytest chardet yacs termcolor fvcore seaborn packaging ninja einops numpy==1.24.4 timm==0.4.12
    
  3. Install Mamba:

    pip install https://github.com/state-spaces/mamba/releases/download/v2.2.4/mamba_ssm-2.2.4+cu12torch2.2cxx11abiTRUE-cp310-cp310-linux_x86_64.whl
    

Datasets

We use the following three publicly available medical imaging datasets:

The dataset CSV:


Training and Inference

  1. Download the pre-trained VMamba weights and place them in the pretrained/vmamba directory:

  2. Train the model:

    python 1_train_model.py \
        --root_dir '.' \
        --dataset 'mura' \
        --model_name 'dualfusionmambav13' \
        --num_tasks 1 \
        --num_classes 2 \
        --confusion_matrix_folder '.' \
        --savemodel_path '.' \
        --train_num 1
    
  3. Run inference:

    python 2_inference_mura.py \
        --model_name 'dualfusionmambav13' \
        --model_path ''
    

Results

XFMamba achieves a strong balance between performance and efficiency, offering a lightweight and high-performing solution for multi-view medical image classification.

FLOPs and AUROC results are based on the CBIS-DDSM dataset.

FLOPs

MURA (2 Classes)

ArchitectureBackboneAUROCWeight Link
XFMambaVMamba-T89.8%XFMamba-T
XFMambaVMamba-S91.0%XFMamba-S
XFMambaVMamba-B90.4%XFMamba-B

CheXpert (13 Classes)

ArchitectureBackboneAUROCWeight Link
XFMambaVMamba-T91.7%XFMamba-T
XFMambaVMamba-S91.8%XFMamba-S
XFMambaVMamba-B91.9%XFMamba-B

CBIS-DDSM (2 Classes)

ArchitectureBackboneAUROCWeight Link
XFMambaVMamba-T66.4%XFMamba-T
XFMambaVMamba-S75.2%XFMamba-S
XFMambaVMamba-B76.1%XFMamba-B

Citation

If you find this repository helpful for your research, please consider citing our work:

@inproceedings{zheng2025xfmamba,
  title={Xfmamba: Cross-fusion mamba for multi-view medical image classification},
  author={Zheng, Xiaoyu and Chen, Xu and Gong, Shaogang and Griffin, Xavier and Slabaugh, Greg},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={672--682},
  year={2025},
  organization={Springer}
}