nnUNet
nnUNet copied to clipboard
Cropping images to the ROI - losing spatial information ?
I am training nnunet for intracranial aneurysm segmentation. Sometimes aneurysms are predicted outside of the brain (on the images of the head, neck/torso ) and this reduces performance. I think of using the TotalSegmentator to crop the images to the brain only. My question is, if I remove the skull ( boundaries that indicate where the brain starts), would it reduce information about the localization and therefore reduce the performance of nnunet ? Or should I keep the brain and the skull ?
Thanks for your support !
Generally you'd want to show your model the same data distribution as you trained on. So you should preprocess your inference data the same way as you do for the training.
Personally I'd recommend you to use HD-BET (https://github.com/MIC-DKFZ/HD-BET) to extract the brain of your patients first (for all your data, including test-data)! HD-BET should be very reliable in detecting the brain, as it is a very easy task.
With the brain masks, you can then extract the brain, and train your model on the foreground region only, removing confounders and making the task easier. There are more benefits as well, as your sampling will be more focused on the brain region, improving convergence speed.
Sidenote: If you want to build a deployable pipeline, you then would need to preprocess all your data like you did before, so this pipeline needs to be reliable or you may get failure-cases (which should be manageable with some engineering effort).
Thank you for your input.
Do you think HD BET is better than TotalSegmentator ? I think TS is also a nnunet collaboration.
The remaining question is whether it's preferred to crop the brain and the skull ( to help nnunet localize inside the brain, especially near the boundaries) or just the brain ( to keep only the region of interest and help nnunet focus on the vessels only). Hope my question is clear.
I would recommend you to use HD-BET if you have an MRI dataset and Totalsegmentator when you have CT images. HD-Bet is likely better (with the right modalities) as it was designed on a wide range of data from clinical settings, but you can check the details on it's repo.
I would likely crop to the brain region only as this is the only region where aneurysms can be present.