MontaEllis / Pytorch-Medical-Segmentation

This repository is an unoffical PyTorch implementation of Medical segmentation in 2D and 3D.
MIT License
864 stars 196 forks source link

hi, question about the image size of .nrrd format. #17

Closed Jihunlee326 closed 3 years ago

Jihunlee326 commented 3 years ago

Thanks for your github.

I'm testing with .nrrd format. however, there is an issue where the resulting image is enlarged. (ex: input size:256x256x256 --> result : 128x128x128) Also, the image is enlarged to 32-bit or greater precision. What part of main.py should I edit?

MontaEllis commented 3 years ago

The size of the result will strictly correspond to the input, so please check your input and output carefully.

Jihunlee326 commented 3 years ago

My input shape is 256x256x256. and I set hparam.py like this:

crop_or_pad_size = 256,256,256
patch_size = 128,128,128

fold_arch = '*.nrrd'

save_arch = '.nii.gz'

source_train_dir = '../datasets/source_dataset'
label_train_dir = '../datasets/label_dataset'
source_test_dir = '../datasets/source_dataset_test'
label_test_dir = '../datasets/label_dataset_test'

Is there something I'm missing out on? Please advise.

MontaEllis commented 3 years ago

The setting is correct, the results of the network would be 128128128 and the results after splicing would be 256256256.