NKI-AI / direct

Deep learning framework for MRI reconstruction
https://docs.aiforoncology.nl/direct
Apache License 2.0
228 stars 40 forks source link

Documentation of expected data format #198

Closed estenhl closed 2 years ago

estenhl commented 2 years ago

Is your feature request related to a problem? Please describe. I tried training a model on the Calgary-Campinas dataset based on the tutorial in the documentation (https://docs.aiforoncology.nl/direct/calgary_campinas.html). I have downloaded the data and set up the environment, but am unable to run the training due to No training data available: Terminating training... Presumably because I don't have the data in the correct format

Describe the solution you'd like A description in the documentation of the format (e.g. folder structure, file descriptions) expected by the direct script

georgeyiasemis commented 2 years ago

Hi @estenhl, there is not a specific structure, you simply need to use the absolute path to the training data folder (.../.../.../.../<directory_containing_training_data>/).

The same goes for the validation data (.../.../.../.../<directory_containing_val_data>/).

georgeyiasemis commented 2 years ago

@estenhl Can you maybe provide the command you tried to run and a screenshot of where is your data located?

estenhl commented 2 years ago

Sure, thanks!

Command:

direct train /home/esten/data/conp-dataset/projects/calgary-campinas/CC359/Raw-data/Single-channel/Train /home/esten/data/conp-dataset/projects/calgary-campinas/CC359/Raw-data/Single-channel/Val /home/esten/tmp --name test --cfg projects/calgary_campinas/configs/base_rim.yaml  --num-gpus 1 --num-workers 8

Training data folder:


ls /home/esten/data/conp-dataset/projects/calgary-campinas/CC359/Raw-data/Single-channel/Train
e13991s3_P01536.7.npy  e14091s3_P67584.7.npy   e14292s3_P85504.7.npy
e13992s4_P08704.7.npy  e14110s3_P59904.7.npy   e14369s5_P40960.7.npy
e14078s3_P02048.7.npy  e14120s11_P66048.7.npy  e14423s3_P29696.7.npy
e14079s3_P09216.7.npy  e14140s3_P52224.7.npy   e14427s3_P76288.7.npy
e14080s3_P18944.7.npy  e14141s3_P58880.7.npy   e14437s5_P49152.7.npy
e14081s3_P25600.7.npy  e14191s3_P58368.7.npy   e14477s5_P34816.7.npy
e14089s3_P53248.7.npy  e14280s3_P44032.7.npy   e14498s5_P60928.7.npy
georgeyiasemis commented 2 years ago

Sure, thanks!

Command:

direct train /home/esten/data/conp-dataset/projects/calgary-campinas/CC359/Raw-data/Single-channel/Train /home/esten/data/conp-dataset/projects/calgary-campinas/CC359/Raw-data/Single-channel/Val /home/esten/tmp --name test --cfg projects/calgary_campinas/configs/base_rim.yaml  --num-gpus 1 --num-workers 8

Training data folder:


ls /home/esten/data/conp-dataset/projects/calgary-campinas/CC359/Raw-data/Single-channel/Train
e13991s3_P01536.7.npy  e14091s3_P67584.7.npy   e14292s3_P85504.7.npy
e13992s4_P08704.7.npy  e14110s3_P59904.7.npy   e14369s5_P40960.7.npy
e14078s3_P02048.7.npy  e14120s11_P66048.7.npy  e14423s3_P29696.7.npy
e14079s3_P09216.7.npy  e14140s3_P52224.7.npy   e14427s3_P76288.7.npy
e14080s3_P18944.7.npy  e14141s3_P58880.7.npy   e14437s5_P49152.7.npy
e14081s3_P25600.7.npy  e14191s3_P58368.7.npy   e14477s5_P34816.7.npy
e14089s3_P53248.7.npy  e14280s3_P44032.7.npy   e14498s5_P60928.7.npy

Hi @estenhl. The Calgary Campinas dataset can be found here: https://portal.conp.ca/dataset?id=projects/calgary-campinas.

After you download it, you will find the training/validation data in Raw-data/Multi-channel/<12OR32>-channel/.... The correct file format should be .h5.