ivadomed / utilities

Repository containing utility scripts for handling various aspects in a DL model training pipeline
MIT License
8 stars 0 forks source link

`convert_bids_to_nnUNetV2.py` - add support of data types other than `anat` #44

Closed rohanbanerjee closed 6 months ago

rohanbanerjee commented 7 months ago

Fixes #43

This PR solves two things,

  1. data_type can be given as a flag
  2. It removes the hard-coded anat data-type in the files and should possibly work with all types of BIDS data-types.

The PR can be tested for a fMRI data with the following steps:

  1. Clone this utilities repository
  2. cd utilities/data_conversion
  3. Run the following command:
python convert_bids_to_nnUNetV2.py --path-data /home/GRAMES.POLYMTL.CA/robana/duke/temp/rohan/fmri_sc_seg/datasets/data_all --path-out /home/GRAMES.POLYMTL.CA/robana/duke/temp/rohan/fmri_sc_seg/nnUNet_raw --split 0.8 0.2 --seed 42 --contrast bold --label-suffix seg-manual --data-type func --dataset-name spinefmri --dataset-number 516 --copy True
valosekj commented 7 months ago

Thank you for opening the PR! 👍🏻 let me know once it is ready for review.

rohanbanerjee commented 7 months ago

Thanks @valosekj for looking into this, ready for review now!