MIC-DKFZ / nnUNet

Apache License 2.0
5.71k stars 1.73k forks source link

modality #1624

Closed KHB14 closed 1 year ago

KHB14 commented 1 year ago

The brats file I have has only one modality, t1ce. In this case, can't we teach nnunet?

saikat-roy commented 1 year ago

Hey @KHB14, sorry for the late reply. While I cannot really comment on if the modality has enough information to train nnunet, you can definitely train it and see the results. You can infact adopt the BraTS2021 data_conversion script by making the following changes:

for c in case_ids:
        # shutil.copy(join(brats_data_dir, c, c + "_t1.nii.gz"), join(imagestr, c + '_0000.nii.gz')) # Comment out
        shutil.copy(join(brats_data_dir, c, c + "_t1ce.nii.gz"), join(imagestr, c + '_0000.nii.gz')) # change to 0000
        # shutil.copy(join(brats_data_dir, c, c + "_t2.nii.gz"), join(imagestr, c + '_0002.nii.gz')) # Comment out
        # shutil.copy(join(brats_data_dir, c, c + "_flair.nii.gz"), join(imagestr, c + '_0003.nii.gz')) # Comment out

Also in the call to generate_dataset_json just use channel_names={0: 'T1ce'}.

This should allow you to train on your data.

saikat-roy commented 1 year ago

Please reopen the issue if you need further help with this.