The SAM trained on 2D natural images used by nnsam has limited improvement for 3D medical images. Therefore, using Med SAM, which is pre-trained on medical image datasets, is better suited to the task of segmenting medical images.
checkpoint for Med SAM 3D: SAM-Med3D-Turbo
conda create -n nnsam python=3.9
conda activate nnsam
pip install git+https://github.com/ChaoningZhang/MobileSAM.git
pip install timm
pip install git+https://github.com/SuperJunier666/nnMed-SAM.git
It is important to input "set MODEL_NAME=nnsam" before using it.
set MODEL_NAME=nnsam
nnUNetv2_plan_and_preprocess -d DATASET_ID --verify_dataset_integrity
nnUNetv2_train DATASET_NAME_OR_ID UNET_CONFIGURATION FOLD [additional options, see -h]
nnUNetv2_train DATASET_NAME_OR_ID UNET_CONFIGURATION FOLD --val --npz
nnUNetv2_train DATASET_NAME_OR_ID 2d FOLD
nnUNetv2_train DATASET_NAME_OR_ID 3d_fullres FOLD
nnUNetv2_predict -i INPUT_FOLDER -o OUTPUT_FOLDER -d DATASET_NAME_OR_ID -c CONFIGURATION --save_probabilities
Read these:
Additional information: