Skip to content

Commit 023542f

Browse files
authored
Merge pull request #30 from BrainLesion/29-two-minor-changes-in-auroratutorialipynb
- fix wrong work dir and filenames
2 parents d9be5c0 + 7ad9ef6 commit 023542f

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

-109 KB
Binary file not shown.

AURORA/tutorial.ipynb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"\n",
2020
"Now that you are visualizing the notebook in Colab, run the next cell to install the packages we will use. There are few things you should follow in order to properly set the notebook up:\n",
2121
"1. Warning: This notebook was not authored by Google. Click on 'Run anyway'.\n",
22-
"1. When the installation commands are done, there might be \"Restart runtime\" button at the end of the output. Please, click it."
22+
"1. When the installation commands are done, there might be a \"Restart runtime\" button at the end of the output. Please, click it."
2323
]
2424
},
2525
{
@@ -75,7 +75,10 @@
7575
"import sys\n",
7676
"\n",
7777
"COLAB_BASE_PATH = \"/content/tutorials/AURORA/\"\n",
78-
"sys.path.insert(0, COLAB_BASE_PATH)"
78+
"sys.path.insert(0, COLAB_BASE_PATH)\n",
79+
"\n",
80+
"# cd into AURORA folder\n",
81+
"%cd tutorials/AURORA"
7982
]
8083
},
8184
{
@@ -335,10 +338,10 @@
335338
"\n",
336339
"# Use all four input modalities,we also create other outputs and a custom log file\n",
337340
"_ = inferer.infer(\n",
338-
" t1=\"data/t1n.nii.gz\",\n",
341+
" t1=\"data/t1.nii.gz\",\n",
339342
" t1c=\"data/t1c.nii.gz\",\n",
340-
" t2=\"data/t2w.nii.gz\",\n",
341-
" fla=\"data/t2f.nii.gz\",\n",
343+
" t2=\"data/t2.nii.gz\",\n",
344+
" fla=\"data/flair.nii.gz\",\n",
342345
" segmentation_file=\"output/multi-modal_segmentation.nii.gz\",\n",
343346
" # The unbinarized network outputs for the whole tumor channel (edema + enhancing tumor core + necrosis) channel\n",
344347
" whole_tumor_unbinarized_floats_file=\"output/whole_tumor_unbinarized_floats.nii.gz\",\n",
@@ -409,7 +412,7 @@
409412
"inferer = AuroraGPUInferer(config=config)\n",
410413
"\n",
411414
"# we load the nifty data to a numpy array\n",
412-
"t1_np = nib.load(\"data/t1n.nii.gz\").get_fdata()\n",
415+
"t1_np = nib.load(\"data/t1.nii.gz\").get_fdata()\n",
413416
"\n",
414417
"# we can now use the inferer to perform the inference and obtain again a numpy array containing the segmentation\n",
415418
"results = inferer.infer(t1=t1_np)\n",

0 commit comments

Comments
 (0)