XuzheZ / PTNet

Pyramid Transformer Net (PTNet) for high resolution infant MRI synthesis
Other
10 stars 3 forks source link

how to organize dataset? #3

Closed jiyoonshincml closed 2 years ago

jiyoonshincml commented 2 years ago

hi, i'm trying to train the model using BRATS and iSeg.

can you give a brief explanation how to organize the dataset?

i tried Dataset/BRATS/ train_A/ .._t1.nii.gz (files) train_B/ .._t2.nii.gz (files)

where each nii.gz files are sizes of 240x240x155

but got the error RuntimeError: Given normalized_shape=[49], expected input with shape [*, 49], but got input of size[1, 9240, 11760]

thanks!

XuzheZ commented 2 years ago

Hi @jiyoonshincml ,

Thank you for your question. The corresponding scan in train_A and train_B shall have the same file name.

You get this error because this repo only contains 2D version, which requires the input should be a 2D slice. And you have to use offline reslicing to convert the volumetric scan to 2D slices. And this repo has been deprecated. The latest version of the 3D version of PTNet is available on https://github.com/XuzheZ/PTNet3D. The data loader issue has been changed to online sampling for both 2D/3D. So using that version will be much reliving in terms of workflow.

Best, Xuzhe