Closed mcbrs1a closed 5 years ago
This problem is due to you having only one image and the option —valid-split (-vs) defaulting to 0.2. This options splits the training dataset into a default of 80% training data and 20% validation data. Synthtorch cannot do that in this case because you only have one image.
If you are just testing to make sure that you can get the package to work, then also set the valid source and target directory to the same values as your training. You can try to set -vs to 0 but I believe it will error.
If you have some real use case for only training on one dataset with no validation data, then please open a feature request but please explain the use case further.
I closed this prematurely because I misread the error (although what I stated about using one image is still true). Sorry about that.
I pushed a fix. If you reinstall synthtorch
, it should work now. Let me know if it doesn't.
By the way, you only need to specify the image dimension (-id
) when using a VAE. In your current setup, i.e., a U-Net, you don't need to specify this.
Thanks Jacob, im opted to not use the patch size and shrinking the images, but have reinstalled your new patch.
One quick question you mention:
I assume this means, each subject is registered, correct? Do different subjects need to be registered to a common space also?
An important note is that, since the synthesis method used is a supervised method. So it is required that all of the subject scans be co-registered (e.g., FLAIR and T2 are registered to T1). Additionally, all of the images must be of the same size (e.g., if the T1-w images are of dimension h x w x d, then the T2-w and FLAIR are also of dimensions h x w x d). https://github.com/jcreinhold/synthtorch/blob/master/tutorials/5min_tutorial.md#example-testing-directory-setup ᐧ
On Tue, 20 Aug 2019 at 00:10, Jacob Reinhold notifications@github.com wrote:
I closed this prematurely because I misread the error (although what I stated about using one image is still true). Sorry about that.
I pushed a fix. If you reinstall synthtorch, it should work now. Let me know if it doesn't.
By the way, you only need to specify the image dimension (-id) when using a VAE. In your current setup, i.e., a U-Net, you don't need to specify this.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jcreinhold/synthtorch/issues/18?email_source=notifications&email_token=AH46HN3QG2DRJWRWIISOBUDQFMR5HA5CNFSM4IM5G63KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4URZIQ#issuecomment-522788002, or mute the thread https://github.com/notifications/unsubscribe-auth/AH46HNZKSDXRVTO7EEHV6Z3QFMR5HANCNFSM4IM5G63A .
Subjects don't need to be registered to a common space, source and target images just need to be co-registered as stated in the quote.
🐛 Bug
when using a patch size -ps 50 50 50 with -dm 3 and a 3D image file (.nii) I receive the error:
The error occurs when running on a CPU and a GPU, so it has nothing to do with configuration of the GPU
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For training to commence for a 3D image using a patch size that is also 3D
Environment
Additional context
error log attached
error_output_synthtorch.txt