Official implementation of Anatomically-Guided Segmentation of Cerebral Microbleeds in T1-weighted and T2*-weighted MRI.
- (Jun. 2024) Our paper has been accepted to MICCAI 2024!
If you find this code useful in your research, please consider citing:
@inproceedings{kwon2024AnatGuided,
author={Kwon, Junmo and Seo, Sang Won and Park, Hyunjin},
title={Anatomically-Guided Segmentation of Cerebral Microbleeds in T1-weighted and T2*-weighted MRI},
booktitle={27th International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI)},
pages={24--33},
doi={10.1007/978-3-031-72069-7_3},
year={2024},
}
- Install Python 3.8 and PyTorch 1.11.0. We recommend to use pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
- Install nnUNet-v1
- Install SimpleITK
git clone https://github.com/junmokwon/AnatGuidedCMBSeg
- Install ANTs and FreeSurfer including SynthStrip for MRI preprocessing.
- Ensure that T1 and T2* MRI scans have the same orientation, resolution, and fields of view.
- Ensure there are no oblique or orientation issues in T1-weighted MRI data.
- Run Freesurfer
recon-all
- Ensure that T1 and T2* MRI scans have the same orientation, resolution, and fields of view.
- Ensure there are no oblique or orientation issues in T2*-weighted MRI data.
- Run SynthStrip skull stripping
mri_synthstrip
- Run N4ITK
N4BiasFieldCorrection
- Perform rigid-body registration from T1 space to T2* space.
- Download JHU-DTI Atlas
- Prepare white-matter atlases including internal capsule and external capsule.
- Perform rigid-body registration
antsRegistrationSyN.sh -t r
from MNI152 space to MNI305 (Talairach) space. - Transform IC and EC labels to Talairach space.
- Generate lobar parcellation to obtain
aparc.lobes.mgz
andwmparc.lobes.mgz
- Merge cerebral lobes from
aparc.lobes.mgz
andwmparc.lobes.mgz
into lobar region. - Transform internal capsule and external capsule labels from MNI305 (Talairach) space to subject’s native T1 space using Talairach transform
transforms/talairach.xfm
- Merge deep white matter regions from
aparc.lobes.mgz
,wmparc.lobes.mgz
, and JHU-DTI atlas into deep supratentorial region. - Merge brainstem and cerebellum from
aparc.lobes.mgz
into infratentorial region.
- Preprocess T1 and T2* MRI scans.
- Generate target labels: lobar, deep supratentorial, infratentorial, and CMB labels.
- Choose a task ID e.g.,
Task301_InHouse
andTask302_VALDO2021
- Run
nnUNet_plan_and_preprocess -t 301
where 301 is Task ID. - Train a 3D full resolution nn-UNet with
nnUNetTrainerV2_Loss_DiceTopK10
trainer.
- Run
nnUNet_predict
to predict hard-thresholded segmentation masks for proxy and CMB labels. - For each connected component in CMB prediction masks, do the following:
- Generate peripheral mask by performing logical XOR between dilated mask and predicted mask.
- Calculate brain parenchyma ratio in peripheral mask using proxy prediction masks.
- Discard the connected component if the ratio does not exceed 0.5