下载安装umamba教程使用命令
1. 至少要求 Ubuntu 20.04,CUDA 11.8
conda create -n umamba python=3.10
conda activate umamba
pip3 install torch==2.0.1 torchvision==0.15.2
(或 pip install torch==2.6.0 torchvision==0.15.3)
2. 首先下载whl文件,然后pip install **.whl文件 (必须)
(1)从Releases · Dao-AILab/causal-conv1d · GitHub中选择对应的causal_conv1d
其中cu118表示cuda版本至少大于等于11.8;cxx11abiTrue和cxx11abiFALSE表示关于C++ ABI的标志,cxx11abiFALSE兼容性更好,一般选择它;cp310表示Python 3.10
(2)从Releases · state-spaces/mamba · GitHub中选择对应的mamba-ssm版本
(参考:mamba-ssm安装说明(Ubuntu)-CSDN博客)
3.
pip3 install nnunetv2 (如果复现的不是umamba 而是nnunetv1,则pip3 install nnunet,以上和以下内容均不是针对nnunetv1的,如果想看如何复现nnunetv1,可看我的其他博客)
4. 使用命令
nnUNetv2_plan_and_preprocess -d 3 --verify_dataset_integrity
nnUNetv2_train 3 3d_fullres 0 -tr nnUNetTrainerUMambaEnc
nnUNetv2_predict -i /home/chengi/student/lhh/umamba/U-Mamba/data/nnUNet_raw/Dataset003_Leopard/imagesTs -o /home/chengi/student/lhh/umamba/U-Mamba/data/nnUNet_raw/Dataset003_Leopard/inferTs -d 3 -c 3d_fullres -f 0 -tr nnUNetTrainerUMambaBot -chk /home/chengi/student/lhh/umamba/U-Mamba/data/nnUNet_results/Dataset003_Leopard/nnUNetTrainerUMambaBot__nnUNetPlans__3d_fullres/fold_0/checkpoint_best.pth
运行 evaluation.py 进行评估结果