ginobilinie / medSynthesisV1

This is a copy of package for medical image synthesis work with LRes-ResUnet and GAN (wgan-gp) in pytorch framework
MIT License
180 stars 45 forks source link

Updating how to run the pytorch code instruction #22

Open idhamari opened 4 years ago

idhamari commented 4 years ago

Hi again,

Some stuff is confusing:

  1. single vs multi-modality meaning: assuming input MRI and output is CBCT why this is a single modality?
  2. batch generating: What do you mean by " Put all these h5 files into two folders (training, validation), and remember the path to these h5 files". A assuming input 3 pair of [mri,cbct] images e.g.

            [ [mri1.nii cbct1.nii],[mri2.nii cbct2.nii],[mri3.nii cbct3.nii] ]

    extract23DPatch4SingleModalImg generates six .h5 files e.g. 2 for each image e.g.

          img1.h5, img1r.h5, img2.h5, img2r.h5, img3.h5, and img3r.h5

    img1.h5 contains batches of [mri1.nii cbct1.nii], it seems the other file img1r.h5 contains the exact data. My questions:

    • What is the difference between the two files img.h5 and imgr.h5? why their size is different?
    • Shall I put 3 files in the training and the other 3 (ending with "r") in the validation? or copy all 6 files into two different folders e.g. training and validation?
    • Why the different sizes of h5 files e.g. img1.h5 and img2.h5 even though all input images are the same size?

Suggestion: since usually one works with either 2D or 3D, it would be nice to separate the code into two different folders/repositories one for 2d and another for 3D.

idhamari commented 4 years ago

@ginobilinie I meant this one :smiling_imp:

What is the difference between the two files img.h5 and imgr.h5? why their size is different?

You already answered this. As I understood the second one is a flipped version of the first one. This is a kind of augmentation. I still don't understand why the size is different.

Shall I put 3 files in the training and the other 3 (ending with "r") in the validation? or copy all 6 files into two different folders e.g. training and validation?

Why the different sizes of h5 files e.g. img1.h5 and img2.h5 even though all input images are the same size?

Your answer is appreciated.