Views
No views yet

| Name | Resolution | Intensities | Spacing | Weights |
|---|---|---|---|---|
| MambaMIM | 96 x 96 x 96 | [-175, - 250] | 1.5 x 1.5 x 1.5 mm | Google Drive (87MB) |
conda create -n mambamim python=3.9
conda activate mambamim
pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
pip install packaging timm==0.5.4
pip install transformers==4.34.1 typed-argument-parser
pip install numpy==1.21.2 opencv-python==4.5.5.64 opencv-python-headless==4.5.5.64
pip install 'monai[all]'
pip install monai==1.2.0
pip install causal_conv1d-1.2.0.post2+cu118torch1.13cxx11abiTRUE-cp38-cp38-linux_x86_64.whl
pip install mamba_ssm-1.2.0.post1+cu118torch1.13cxx11abiFALSE-cp38-cp38-linux_x86_64.whl└── MambaMIM
├── data
├── Dataset060_TotalSegmentator
└── imagesTr
├── xxx_0000.nii.gz
├── ...
├── Dataset006_FLARE2022
└── imagesTr
├── xxx_0000.nii.gz
├── ...
└── Other_dataset
└── imagesTr
├── xxx_0000.nii.gz
├── ...dataset.json will be generated in ./data1{
2 "training": [
3 {
4 "image": "./Dataset060_TotalSegmentator/imagesTr/xxx_0000.nii.gz"
5 },
6 {
7 "image": "./Dataset006_FLARE2022/imagesTr/xxx_0000.nii.gz"
8 },
9 ]
10}
11
1# An example of training on 4 GPUs with DDP
2torchrun --nproc_per_node=4 --nnodes=1 --node_rank=0 --master_addr=localhost --master_port=12351 main.py --exp_name=debug --data_path=./data --model=mambamim --bs=16 --exp_dir=debug_mambamim_ddp_41# An example of training on the single GPU
2python main.py --exp_name=debug --data_path=./data --model=mambamim --bs=4 --exp_dir=debug_mambamim1# An example of Fine-tuning on BTCV (num_classes=14)
2from models.network.hymamba import build_hybird
3
4model = build_hybird(in_channel=1, n_classes=14, img_size=96).cuda()
5
6model_dict = torch.load("mambamim_mask75.pth")
7
8if model.load_state_dict(model_dict, strict=False):
9 print("MambaMIM use pretrained weights successfully !")@article{tang2024mambamim,
title={MambaMIM: Pre-training Mamba with State Space Token-interpolation},
author={Tang, Fenghe and Nian, Bingkun and Li, Yingtai and Yang, Jie and Wei, Liu and Zhou, S Kevin},
journal={arXiv preprint arXiv:2408.08070},
year={2024}
}