Pretrained nnU-Net model for automated cerebral microbleed segmentation in T2*/SWI MRI.
This project uses Conda for dependency management.
git clone https://github.com/iBrain-Lab/MedNet-CMB.git MedNet-CMB
cd MedNet-CMB
conda env create -f environment.yml
conda activate MedNet-CMB
pip install -e .Download the weights from Google Drive and unzip them so MedNet-CMB_weights/nnUNet_results/ exists.
The directory should contain:
MedNet-CMB_weights/
└── nnUNet_results/
└── Dataset012_ASPREE_VALDO_CSIRO_stratified_1x1x1_relabeled_v2/
└── nnUNetTrainer__nnUNetPlans__3d_fullres/
├── fold_0/checkpoint_final.pth
├── fold_1/checkpoint_final.pth
├── fold_2/checkpoint_final.pth
├── fold_3/checkpoint_final.pth
└── fold_4/checkpoint_final.pth
1. Prepare your input images:
- Place your NIfTI images named
*_0000.nii.gzinto a single input folder.
2. Open the script and edit the path variables to match your setup:
WEIGHTS_DIR: full path to the folder containingMedNet-CMB_weightsINPUT_DIR: folder containing the input imagesOUTPUT_DIR: folder where predictions will be saved
3. Run the script!
bash run_MedNet-CMB_nnunet.sh| Cohort | Cluster Dice | Precision | Sensitivity | False Positives / scan |
|---|---|---|---|---|
| Internal (n=264) | 0.82 | 0.88 | 0.77 | 0.58 |
| AIBL | 0.89 | 0.87 | 0.94 | - |
| ASPREE | 0.58 | 0.68 | 0.55 | - |
| VALDO | 0.70 | 0.76 | 0.69 | - |
| External DOU (n=20) | 0.76 | 0.83 | 0.79 | 0.95 |