Official repository for "ME-UNet: Enhancing Mamba for Myocardial Pathology Segmentation in Multi-Center Multi-Sequence CMR Images".
- News:
2024/11/27
: ME-UNet released.
Requirements: CUDA ≥ 11.6
- Create a virtual environment:
conda create -n meunet python=3.10 -y
andconda activate meunet
- Install Pytorch 2.0.1:
pip install torch==2.0.1 torchvision==0.15.2
- Install Mamba:
pip install causal-conv1d==1.1.1
andpip install mamba-ssm
- Download code:
git clone https://github.com/AFuJianPeople/ME-UNet
cd ME-UNet/me-unet
- run
pip install -e .
Download MyoPS++2024 dataset, then put them into the ME-Unet/data/nnUNet_raw
folder.
ME-UNet is built on the popular nnU-Net framework. If you want to train ME-UNet on your own dataset, please follow this guideline to prepare the dataset.
Please organize the dataset as follows:
data/
├── nnUNet_raw/
│ ├── Dataset001_Myops/
│ │ ├── imagesTr
│ │ │ ├── Myops_0001_0000.nii.gz
│ │ │ ├── Myops_0002_0000.nii.gz
│ │ │ ├── ...
│ │ ├── labelsTr
│ │ │ ├── Myops_0001.nii.gz
│ │ │ ├── Myops_0002.nii.gz
│ │ │ ├── ...
│ │ ├── dataset.json
│ ├── ...
Based on nnUNet, preprocess the data and generate the corresponding configuration files (the generated results can be found in the ME-Unet/data/nnUNet_preprocessed
folder).
nnUNetv2_plan_and_preprocess -d DATASET_ID --verify_dataset_integrity
- Train 2D
ME-Unet
model
nnUNetv2_train DATASET_ID 2d all -tr nnUNetTrainerMEUNet
- Train 3D
ME-Unet
model
nnUNetv2_train DATASET_ID 3d_fullres all -tr nnUNetTrainerMEUNet
- Inference 2D
ME-Unet
model
nnUNetv2_predict -i INPUT_FOLDER -o OUTPUT_FOLDER -d DATASET_ID -c 2d -tr nnUNetTrainerMEUNet --disable_tta
- Inference 3D
ME-Unet
model
nnUNetv2_predict -i INPUT_FOLDER -o OUTPUT_FOLDER -d DATASET_ID -c 3d_fullres -tr nnUNetTrainerMEUNet --disable_tta
If you find our work helpful, please consider citing the papers
We acknowledge all the authors of the employed public datasets, allowing the community to use these valuable resources for research purposes. We also thank the authors of nnU-Net, Mamba and U-Mamba for making their valuable code publicly available.