SMAFormer: Synergistic Multi-Attention Transformer for Medical Image Segmentation

This repository contains the weights and official implementation for SMAFormer, presented at BIBM 2024.

[Paper] [Code] [Video Introduction]

πŸ›Ž Citation

If you find our work helpful for your research, please cite:

@inproceedings{zheng2024smaformer,
  title={Smaformer: Synergistic multi-attention transformer for medical image segmentation},
  author={Zheng, Fuchen and Chen, Xuhang and Liu, Weihuang and Li, Haolun and Lei, Yingtie and He, Jiahui and Pun, Chi-Man and Zhou, Shoujun},
  booktitle={2024 IEEE International Conference on Bioinformatics and Biomedicine (BIBM)},
  pages={4048--4053},
  year={2024},
  organization={IEEE}
}

@article{zheng2025hbformer,
  title={HBFormer: A Hybrid-Bridge Transformer for Microtumor and Miniature Organ Segmentation},
  author={Zheng, Fuchen and Chen, Xinyi and Li, Weixuan and Li, Quanjun and Zhou, Junhua and Guo, Xiaojiao and Chen, Xuhang and Pun, Chi-Man and Zhou, Shoujun},
  journal={arXiv preprint arXiv:2512.03597},
  year={2025}
}

πŸ“‹ Overview

SMAFormer V2.3 is a medical image segmentation architecture based on the Swin Transformer. Compared to the initial version (ViT-Base, 138M parameters), V2.3 uses a Swin Transformer backbone to achieve superior performance (89% Dice on Synapse) with only 41.4M parameters. It features an innovative mirror Encoder-Decoder design, which allows the decoder to load pre-trained weights via reverse mapping, reaching a total pre-training coverage of 94.84%.

🌳 Version Evolution

                           SMAFormer
                               β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚                                       β”‚
    [Branch: ViT-Base]                    [Branch: Swin-Tiny]
           β”‚                                       β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”                        β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
    β”‚  SMAFormer  β”‚                        β”‚ SMAFormerV2 β”‚
    β”‚  (ViT-Base) β”‚                        β”‚ (Swin-Tiny) β”‚
    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜                        β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
           β”‚                                       β”‚
    v1.1 Dice: 74%                         v2.1 Dice: 78%
           β”‚                                       β”‚
    v1.2 Dice: 80%                         v2.2 Dice: 80%
           β–Ό                                       β”‚
                                           v2.3 β˜… Mirror Architecture
                                           └─ Dice: 89%

πŸ“ˆ Performance (Synapse Dataset)

Model Backbone 3D Dice HD95 Status
HBFormer Swin-Tiny 87.82% 6.92 Benchmark
SMAFormerV2 v2.3 Swin-Tiny 89.41% 6.64 Latest

πŸš€ Quick Start

Dependencies

torch>=1.10.0
timm>=0.6.0
numpy>=1.21.0
scipy>=1.7.0
h5py>=3.1.0

Training

python train_synapse.py --max_epochs 300 --batch_size 40 --model SMAFormerV2 --config configs/config_setting_synapse.py

Evaluation

python test_synapse.py --model_path checkpoints/best.pth

🧧 Acknowledgement

This work was supported in part by the National Key R&D Project of China, the Natural Science Foundation of Guangdong Province, the Shenzhen Technology Innovation Commission, the Shenzhen Development and Reform Commission, and the Science and Technology Development Fund, Macau SAR.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for lzeeorno666/SMAFormer-Medical-Image-Segmentation

Finetuned
(648)
this model

Papers for lzeeorno666/SMAFormer-Medical-Image-Segmentation