arnab39 / FewShot_GAN-Unet3D

Tensorflow implementation of our paper: Few-shot 3D Multi-modal Medical Image Segmentation using Generative Adversarial Learning
MIT License
377 stars 82 forks source link

ValueError: could not broadcast input array from shape (144,192,256,1) into shape (144,192,256) #15

Closed songwaimai closed 4 years ago

songwaimai commented 4 years ago

Hi, I have covert .img to .nii, but when i run python main.py(bad gan), the error is File "E:\/slycode\FewShot_GAN-Unet3D-master\preprocess\preprocess.py", line 305, in init patch_shape,number_images_training) File "E:\/slycode\FewShot_GAN-Unet3D-master\preprocess\preprocess.py", line 162, in preprocess_dynamic_lab T1_vols[(case_idx-c-1), :, :, :] = read_vol(case_idx, 'T1', dir) ValueError: could not broadcast input array from shape (144,192,256,1) into shape (144,192,256) should i change the (144,192,256) in the preprocess.py to (144,192,256,1)???

songwaimai commented 4 years ago

the problem has been resolved.

TaoZhong11 commented 4 years ago

the problem has been resolved.

Hi, how do you fix it?

hkthirano commented 4 years ago

@songwaimai Hi, how do you fix it?