Skip to content

BRATS tutorial - Test custom NIFTI images #1399

Answered by architraj29
sekh77 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Shekhar,

Following piece of code is used in Brats tutorial to specify the validation data:

val_ds = DecathlonDataset(
    root_dir=root_dir,
    task="Task01_BrainTumour",
    transform=val_transform,
    section="validation",
    download=False,
    num_workers=4,
)
val_loader = DataLoader(val_ds, batch_size=2, shuffle=False, num_workers=4)

Replace the above code with the following (this was you can specify the exact files in a folder that need to be evaluated):

Specify:

  • root data path
  • data loading type (Detailed analysis could be found here)
root_data_path = '<Base path for your Validation Datasets>'
val_images = sorted(glob.glob(os.path.join(root_data_path, 'imagesTs', '*.nii.gz'…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nic-Ma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1399 on December 29, 2020 13:53.