MIC-DKFZ / nnUNet

Apache License 2.0
5.71k stars 1.73k forks source link

using brats dataset but only interests in some labels and modalities #1853

Closed kaneyxx closed 9 months ago

kaneyxx commented 10 months ago

Hello,

I'm trying this amazing work! Thanks for your contributions. I want to train a model on MSD 001 brain tumor dataset, but I only interests in contrast-enhanced tumor and T1c modality. How to modify the preprocess or plan configures for that?

Thanks!

saikat-roy commented 9 months ago

This needs to be done when you are preparing the dataset for nnUNet. Just name the CE and T1c modality nifty files as 0000 and 0001 in the training files. See the example below:

imagesTr
│   ├── BRATS_001_0000.nii.gz
│   ├── BRATS_001_0001.nii.gz
│   ├── BRATS_002_0000.nii.gz
│   ├── BRATS_002_0001.nii.gz

Then make a corresponding change in the dataset.json by specifying:

{ 
 "channel_names": {  # formerly modalities
   "0": "CE", 
   "1": "T1c"
 }, 

That should solve your problem and nnUNet's preprocessing can handle the rest.