The codes for the work "MAXFormer: Enhanced Transformer for Medical Image Segmentation with Multi-Attention and Multi-Scale Features Fusion". A U-shaped hierarchical Transformer. Our paper has been accepted by Knowledge-Based Systems. We updated the Reproducibility. I hope this will help you to reproduce the results. We have provided the source code as well as our model weights file, which we hope will help you to replicate and improve.
Task | Dataset | Model Weights | Prediction result file |
---|---|---|---|
Multi-organ segmentation | Synapse | MAXFormer | Synapse test dataset prediction(ours) |
Cardiac segmentation | ACDC | MAXFormer | ACDC test dataset prediction(ours) |
To better replicate our experiment, please prepare an environment with python=3.8, and then run the following command to install the dependencies.
pip install -r requirements.txt
When you want to train, you first need to fill in the train.py file with the necessary information, i.e. root_path
and test_path
. Other information, such as batch_size
and base_lr
, can be modified according to your needs. Note: If you want to use our provided model for initialization, set pre_trained params to True and place the downloaded model synapse_8366.pth
in the output_dir
directory.
Train
python train.py
Test
Similarly, you need to first set up some necessary parameters, i.e., test set path volume_path
and output_dir path output_dir
for the model.
python test.py
This project has benefited from the following resources, and I would like to express my gratitude:
Coming soon!