I want to use 3D-UNet to do semantic segmentation to MRI data. I read the whole brain MRI data as a 3D array, the shape of it is (193,229,193). And I use scipy.ndimage.zoom() resize its mask to (256, 256, 128). Aftering resize, you can see the result: Code:
resize_img = itpl.zoom(img, (resize[0] / img.shape[0], resize[1] / img.shape[1], resize[2] / img.shape[2]), mode='nearest')
The mask becomes to be not binary, 1 and 0.
What's the reason and how should I do to preprocessing the data in 3D-UNet.