Skip to content

Instantly share code, notes, and snippets.

@omarsar
Created October 15, 2018 08:50
Show Gist options
  • Save omarsar/4435c59b879fa3f7f6c77a81f972c32b to your computer and use it in GitHub Desktop.
Save omarsar/4435c59b879fa3f7f6c77a81f972c32b to your computer and use it in GitHub Desktop.
ROOT_DIR_GMCHALLENGE = "/gdrive/My Drive/DAIR RESOURCES/PyTorch/medical_imaging/train/"
mri_input_filename = os.path.join(ROOT_DIR_GMCHALLENGE,
'site1-sc01-image.nii.gz')
mri_gt_filename = os.path.join(ROOT_DIR_GMCHALLENGE,
'site1-sc01-mask-r1.nii.gz')
pair = mt_datasets.SegmentationPair2D(mri_input_filename, mri_gt_filename)
slice_pair = pair.get_pair_slice(0)
input_slice = slice_pair["input"]
gt_slice = slice_pair["gt"]
img = input_slice
plt.imshow(img)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment