Skip to content

Commit a2652fb

Browse files
1090-enhance-tutorials (#1100)
Signed-off-by: binliu <[email protected]> Fixes #1090 . ### Description Fix some basic problems occured during test. ### Checks - [x] Reconstruction tutorial: - [x] some typo and grammar problems in the readme file. - [x] `fastmri_ssim.py` absents in `varnet_demo` folder. - [x] the checkpoint device directly map to 'cpu' in [unet_demo/inference.ipynb](https://github.com/binliunls/tutorials/blob/1014-mlflow-handler-tutorial/reconstruction/MRI_reconstruction/unet_demo/inference.ipynb). - [x] Detection tutorial: - [x] some typo, link and grammar problems in the readme file. - [x] CAI tutorial: - [x] add explanation for opencv codec error in the `video_seg` tutorial. - [x] use `EnsureChannelFirst` instead of `AsChannelFirst` in `endoscopic inbody classification tutorial`. - [x] accuracy in endoscopic inbody classfication tutorial should be a number instead of tensor. - [x] Pathology tutorial: - [x] some useless cell output in nuclick tutorial. - [x] Add license to above tutorials - [x] Check license in other tutorials Signed-off-by: binliu <[email protected]> Signed-off-by: Bin Liu (SW-GPU) <[email protected]> Signed-off-by: Mingxin Zheng <[email protected]> Signed-off-by: mingxin-zheng <[email protected]> Signed-off-by: Mingxin Zheng <[email protected]> Co-authored-by: mingxin-zheng <[email protected]> Co-authored-by: Mingxin Zheng <[email protected]> Co-authored-by: Mingxin Zheng <[email protected]>
1 parent 57a9508 commit a2652fb

File tree

77 files changed

+1292
-2033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1292
-2033
lines changed

2d_classification/mednist_tutorial.ipynb

Lines changed: 2 additions & 674 deletions
Large diffs are not rendered by default.

2d_registration/registration_mednist.ipynb

Lines changed: 4 additions & 12 deletions
Large diffs are not rendered by default.

3d_registration/paired_lung_ct.ipynb

Lines changed: 157 additions & 242 deletions
Large diffs are not rendered by default.

3d_segmentation/brats_segmentation_3d.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7+
"Copyright (c) MONAI Consortium \n",
8+
"Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
9+
"you may not use this file except in compliance with the License. \n",
10+
"You may obtain a copy of the License at \n",
11+
"&nbsp;&nbsp;&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0 \n",
12+
"Unless required by applicable law or agreed to in writing, software \n",
13+
"distributed under the License is distributed on an \"AS IS\" BASIS, \n",
14+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n",
15+
"See the License for the specific language governing permissions and \n",
16+
"limitations under the License.\n",
17+
"\n",
718
"# Brain tumor 3D segmentation with MONAI\n",
819
"\n",
920
"This tutorial shows how to construct a training workflow of multi-labels segmentation task.\n",
@@ -107,17 +118,6 @@
107118
}
108119
],
109120
"source": [
110-
"# Copyright 2020 MONAI Consortium\n",
111-
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
112-
"# you may not use this file except in compliance with the License.\n",
113-
"# You may obtain a copy of the License at\n",
114-
"# http://www.apache.org/licenses/LICENSE-2.0\n",
115-
"# Unless required by applicable law or agreed to in writing, software\n",
116-
"# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
117-
"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
118-
"# See the License for the specific language governing permissions and\n",
119-
"# limitations under the License.\n",
120-
"\n",
121121
"import os\n",
122122
"import shutil\n",
123123
"import tempfile\n",

3d_segmentation/challenge_baseline/run_net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 MONAI Consortium
1+
# Copyright (c) MONAI Consortium
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

3d_segmentation/ignite/unet_evaluation_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 MONAI Consortium
1+
# Copyright (c) MONAI Consortium
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

3d_segmentation/ignite/unet_evaluation_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 MONAI Consortium
1+
# Copyright (c) MONAI Consortium
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

3d_segmentation/ignite/unet_training_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 MONAI Consortium
1+
# Copyright (c) MONAI Consortium
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

3d_segmentation/ignite/unet_training_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 MONAI Consortium
1+
# Copyright (c) MONAI Consortium
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

3d_segmentation/spleen_segmentation_3d.ipynb

Lines changed: 63 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7+
"Copyright (c) MONAI Consortium \n",
8+
"Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
9+
"you may not use this file except in compliance with the License. \n",
10+
"You may obtain a copy of the License at \n",
11+
"&nbsp;&nbsp;&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0 \n",
12+
"Unless required by applicable law or agreed to in writing, software \n",
13+
"distributed under the License is distributed on an \"AS IS\" BASIS, \n",
14+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n",
15+
"See the License for the specific language governing permissions and \n",
16+
"limitations under the License.\n",
17+
"\n",
718
"# Spleen 3D segmentation with MONAI\n",
819
"\n",
920
"This tutorial shows how to integrate MONAI into an existing PyTorch medical DL program.\n",
@@ -21,7 +32,7 @@
2132
"\n",
2233
"The Spleen dataset can be downloaded from http://medicaldecathlon.com/.\n",
2334
"\n",
24-
"![spleen](http://medicaldecathlon.com/img/spleen0.png)\n",
35+
"![spleen](../figures/spleen0.png)\n",
2536
"\n",
2637
"Target: Spleen \n",
2738
"Modality: CT \n",
@@ -50,13 +61,62 @@
5061
"%matplotlib inline"
5162
]
5263
},
64+
{
65+
"cell_type": "markdown",
66+
"metadata": {},
67+
"source": [
68+
"## Setup imports"
69+
]
70+
},
5371
{
5472
"cell_type": "code",
5573
"execution_count": 2,
5674
"metadata": {
5775
"tags": []
5876
},
59-
"outputs": [],
77+
"outputs": [
78+
{
79+
"name": "stderr",
80+
"output_type": "stream",
81+
"text": [
82+
"/opt/conda/lib/python3.8/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
83+
" from .autonotebook import tqdm as notebook_tqdm\n"
84+
]
85+
},
86+
{
87+
"name": "stdout",
88+
"output_type": "stream",
89+
"text": [
90+
"MONAI version: 1.1.0+2.g97918e46\n",
91+
"Numpy version: 1.22.2\n",
92+
"Pytorch version: 1.13.0a0+d0d6b1f\n",
93+
"MONAI flags: HAS_EXT = True, USE_COMPILED = False, USE_META_DICT = False\n",
94+
"MONAI rev id: 97918e46e0d2700c050e678d72e3edb35afbd737\n",
95+
"MONAI __file__: /opt/monai/monai/__init__.py\n",
96+
"\n",
97+
"Optional dependencies:\n",
98+
"Pytorch Ignite version: 0.4.10\n",
99+
"Nibabel version: 4.0.2\n",
100+
"scikit-image version: 0.19.3\n",
101+
"Pillow version: 9.0.1\n",
102+
"Tensorboard version: 2.10.1\n",
103+
"gdown version: 4.6.0\n",
104+
"TorchVision version: 0.14.0a0\n",
105+
"tqdm version: 4.64.1\n",
106+
"lmdb version: 1.3.0\n",
107+
"psutil version: 5.9.2\n",
108+
"pandas version: 1.4.4\n",
109+
"einops version: 0.6.0\n",
110+
"transformers version: 4.21.3\n",
111+
"mlflow version: 2.0.1\n",
112+
"pynrrd version: 1.0.0\n",
113+
"\n",
114+
"For details about installing the optional dependencies, please visit:\n",
115+
" https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n",
116+
"\n"
117+
]
118+
}
119+
],
60120
"source": [
61121
"from monai.utils import first, set_determinism\n",
62122
"from monai.transforms import (\n",
@@ -87,69 +147,7 @@
87147
"import tempfile\n",
88148
"import shutil\n",
89149
"import os\n",
90-
"import glob"
91-
]
92-
},
93-
{
94-
"cell_type": "markdown",
95-
"metadata": {},
96-
"source": [
97-
"## Setup imports"
98-
]
99-
},
100-
{
101-
"cell_type": "code",
102-
"execution_count": 3,
103-
"metadata": {
104-
"tags": []
105-
},
106-
"outputs": [
107-
{
108-
"name": "stdout",
109-
"output_type": "stream",
110-
"text": [
111-
"MONAI version: 0.9.1\n",
112-
"Numpy version: 1.22.4\n",
113-
"Pytorch version: 1.13.0a0+340c412\n",
114-
"MONAI flags: HAS_EXT = True, USE_COMPILED = False, USE_META_DICT = False\n",
115-
"MONAI rev id: 356d2d2f41b473f588899d705bbc682308cee52c\n",
116-
"MONAI __file__: /opt/monai/monai/__init__.py\n",
117-
"\n",
118-
"Optional dependencies:\n",
119-
"Pytorch Ignite version: 0.4.9\n",
120-
"Nibabel version: 4.0.1\n",
121-
"scikit-image version: 0.19.3\n",
122-
"Pillow version: 9.0.1\n",
123-
"Tensorboard version: 2.9.1\n",
124-
"gdown version: 4.5.1\n",
125-
"TorchVision version: 0.13.0a0\n",
126-
"tqdm version: 4.64.0\n",
127-
"lmdb version: 1.3.0\n",
128-
"psutil version: 5.9.1\n",
129-
"pandas version: 1.3.5\n",
130-
"einops version: 0.4.1\n",
131-
"transformers version: 4.20.1\n",
132-
"mlflow version: 1.27.0\n",
133-
"pynrrd version: 0.4.3\n",
134-
"\n",
135-
"For details about installing the optional dependencies, please visit:\n",
136-
" https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n",
137-
"\n"
138-
]
139-
}
140-
],
141-
"source": [
142-
"# Copyright 2020 MONAI Consortium\n",
143-
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
144-
"# you may not use this file except in compliance with the License.\n",
145-
"# You may obtain a copy of the License at\n",
146-
"# http://www.apache.org/licenses/LICENSE-2.0\n",
147-
"# Unless required by applicable law or agreed to in writing, software\n",
148-
"# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
149-
"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
150-
"# See the License for the specific language governing permissions and\n",
151-
"# limitations under the License.\n",
152-
"\n",
150+
"import glob\n",
153151
"\n",
154152
"print_config()"
155153
]

3d_segmentation/spleen_segmentation_3d_lightning.ipynb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7+
"Copyright (c) MONAI Consortium \n",
8+
"Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
9+
"you may not use this file except in compliance with the License. \n",
10+
"You may obtain a copy of the License at \n",
11+
"&nbsp;&nbsp;&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0 \n",
12+
"Unless required by applicable law or agreed to in writing, software \n",
13+
"distributed under the License is distributed on an \"AS IS\" BASIS, \n",
14+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n",
15+
"See the License for the specific language governing permissions and \n",
16+
"limitations under the License. \n",
17+
"\n",
718
"# Spleen 3D segmentation with MONAI"
819
]
920
},
@@ -105,17 +116,6 @@
105116
}
106117
],
107118
"source": [
108-
"# Copyright 2020 MONAI Consortium\n",
109-
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
110-
"# you may not use this file except in compliance with the License.\n",
111-
"# You may obtain a copy of the License at\n",
112-
"# http://www.apache.org/licenses/LICENSE-2.0\n",
113-
"# Unless required by applicable law or agreed to in writing, software\n",
114-
"# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
115-
"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
116-
"# See the License for the specific language governing permissions and\n",
117-
"# limitations under the License.\n",
118-
"\n",
119119
"import pytorch_lightning\n",
120120
"from monai.utils import set_determinism\n",
121121
"from monai.transforms import (\n",
@@ -683,7 +683,7 @@
683683
],
684684
"metadata": {
685685
"kernelspec": {
686-
"display_name": "Python 3.8.10 64-bit",
686+
"display_name": "Python 3 (ipykernel)",
687687
"language": "python",
688688
"name": "python3"
689689
},
@@ -697,7 +697,7 @@
697697
"name": "python",
698698
"nbconvert_exporter": "python",
699699
"pygments_lexer": "ipython3",
700-
"version": "3.8.10"
700+
"version": "3.8.13"
701701
},
702702
"vscode": {
703703
"interpreter": {

3d_segmentation/spleen_segmentation_3d_visualization_basic.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
1111
"you may not use this file except in compliance with the License. \n",
1212
"You may obtain a copy of the License at \n",
13-
" http://www.apache.org/licenses/LICENSE-2.0 \n",
13+
"&nbsp;&nbsp;&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0 \n",
1414
"Unless required by applicable law or agreed to in writing, software \n",
1515
"distributed under the License is distributed on an \"AS IS\" BASIS, \n",
1616
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n",
1717
"See the License for the specific language governing permissions and \n",
18-
"limitations under the License. \n",
18+
"limitations under the License.\n",
1919
"\n",
2020
"# Spleen 3D segmentation with MONAI\n",
2121
"\n",

3d_segmentation/swin_unetr_brats21_segmentation_3d.ipynb

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,30 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# 3D Brain Tumor Segmentation with Swin UNETR (BraTS 21 Challenge)\n",
7+
"Copyright (c) MONAI Consortium \n",
8+
"Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
9+
"you may not use this file except in compliance with the License. \n",
10+
"You may obtain a copy of the License at \n",
11+
"&nbsp;&nbsp;&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0 \n",
12+
"Unless required by applicable law or agreed to in writing, software \n",
13+
"distributed under the License is distributed on an \"AS IS\" BASIS, \n",
14+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n",
15+
"See the License for the specific language governing permissions and \n",
16+
"limitations under the License. \n",
17+
"\n",
18+
"# 3D Brain Tumor Segmentation with Swin UNETR (BraTS 21 Challenge)\n",
819
"\n",
920
"\n",
1021
"This tutorial uses the [Swin UNETR](https://arxiv.org/pdf/2201.01266.pdf/) [1,2] model for the task of brain tumor segmentation using the [BraTS 21](http://braintumorsegmentation.org/) challenge dataset [3,4,5,6]. Swin UNETR ranked among top-performing models in BraTS 21 validation phase. The architecture of Swin UNETR is demonstrated as below\n",
11-
"![image](https://lh3.googleusercontent.com/pw/AM-JKLXBhxHcB6fGG6OoWnx1-_uwhfg9J-5HamVpDbmUTc395EbkiIwA7p2y1piZz5-uz1J9dcOhHwrhT_mpPJzDqfvSEM_qFIieE0_FC_5i5YQLm23QJjkSyIydjQ4gSX3TdpibUgDXxaWJkfOHKMW7rJD-=w1388-h523-no?authuser=2)\n",
22+
"\n",
23+
"![swin_brats](../figures/swin_brats21.png)\n",
1224
"\n",
1325
"The following features are included in this tutorial:\n",
1426
"1. Transforms for dictionary format data.\n",
1527
"1. Define a new transform according to MONAI transform API.\n",
1628
"1. Load Nifti image with metadata, load a list of images and stack them.\n",
1729
"1. Randomly rotate across each axes for data augmentation.\n",
18-
"1. Randomly adjust intensity for data augmentation.\n",
30+
"1. Randomly adjust the intensity for data augmentation.\n",
1931
"1. Cache IO and transforms to accelerate training and validation.\n",
2032
"1. Swin UNETR model, Dice loss function, Mean Dice metric for brain tumor segmentation task.\n",
2133
"\n",
@@ -33,15 +45,15 @@
3345
"\n",
3446
"https://www.synapse.org/#!Synapse:syn27046444/wiki/616992\n",
3547
"\n",
36-
"The json file containing training and validation sets (internal split) needs to be downloaded from this [link](https://drive.google.com/file/d/1i-BXYe-wZ8R9Vp3GXoajGyqaJ65Jybg1/view?usp=sharing) and placed in the same folder as the dataset. As discussed in the following, this tutorial uses fold 1 for training a Swin UNETR model on BraTS 21 challenge.\n",
48+
"The JSON file containing training and validation sets (internal split) needs to be downloaded from this [link](https://drive.google.com/file/d/1i-BXYe-wZ8R9Vp3GXoajGyqaJ65Jybg1/view?usp=sharing) and placed in the same folder as the dataset. As discussed in the following, this tutorial uses fold 1 for training a Swin UNETR model on the BraTS 21 challenge.\n",
3749
"\n",
3850
"### Tumor Characteristics\n",
3951
"\n",
40-
"The sub-regions considered for evaluation in BraTS 21 challenge are the \"enhancing tumor\" (ET), the \"tumor core\" (TC), and the \"whole tumor\" (WT). The ET is described by areas that show hyper-intensity in T1Gd when compared to T1, but also when compared to “healthy” white matter in T1Gd. The TC describes the bulk of the tumor, which is what is typically resected. The TC entails the ET, as well as the necrotic (NCR) parts of the tumor. The appearance of NCR is typically hypo-intense in T1-Gd when compared to T1. The WT describes the complete extent of the disease, as it entails the TC and the peritumoral edematous/invaded tissue (ED), which is typically depicted by hyper-intense signal in FLAIR [[BraTS 21]](http://braintumorsegmentation.org/).\n",
52+
"The sub-regions considered for evaluation in the BraTS 21 challenge are the \"enhancing tumor\" (ET), the \"tumor core\" (TC), and the \"whole tumor\" (WT). The ET is described by areas that show hyper-intensity in T1Gd when compared to T1, but also when compared to “healthy” white matter in T1Gd. The TC describes the bulk of the tumor, which is what is typically resected. The TC entails the ET, as well as the necrotic (NCR) parts of the tumor. The appearance of NCR is typically hypo-intense in T1-Gd when compared to T1. The WT describes the complete extent of the disease, as it entails the TC and the peritumoral edematous/invaded tissue (ED), which is typically depicted by the hyper-intense signal in FLAIR [[BraTS 21]](http://braintumorsegmentation.org/).\n",
4153
"\n",
4254
"The provided segmentation labels have values of 1 for NCR, 2 for ED, 4 for ET, and 0 for everything else.\n",
4355
"\n",
44-
"![image](https://lh3.googleusercontent.com/pw/AM-JKLWJu7l7W3UKfGiWRFkqC-F9FY26f_GH-81N2cp0sMhnDN5k0s709dTFGxkJv-QQN6poOSvaCJ9chP7_M9QrrjpyMvoZozs6eWCMCeBG97jpilq8jvZdqqevVs6jp-FpFKdHZxzXGXfnZdbvmgh8kN9O=w830-h399-no?authuser=2)\n",
56+
"![image](../figures/fig_brats21.png)\n",
4557
"\n",
4658
"Figure from [Baid et al.](https://arxiv.org/pdf/2107.02314v1.pdf) [3]\n",
4759
"\n",
@@ -74,22 +86,26 @@
7486
"cell_type": "markdown",
7587
"metadata": {},
7688
"source": [
77-
"# Swin UNETR Model\n",
89+
"## Swin UNETR Model\n",
7890
"\n",
79-
"The inputs to [Swin UNETR](https://arxiv.org/pdf/2201.01266.pdf/) are 3D multi-modal MRI images with 4 channels. The patch partition block creates non-overlapping patches of the input data and projects them into embedding tokens with resolution of 128x128x128. The projected tokens are then encoded by using a 3D [Swin Transformer](https://openaccess.thecvf.com/content/ICCV2021/papers/Liu_Swin_Transformer_Hierarchical_Vision_Transformer_Using_Shifted_Windows_ICCV_2021_paper.pdf/) in which the self-attention is computed within local windows. The interaction between different windows are obtained by using 3D window shifting as illustrated below. \n",
91+
"The inputs to [Swin UNETR](https://arxiv.org/pdf/2201.01266.pdf) are 3D multi-modal MRI images with 4 channels.\n",
92+
"The patch partition block creates non-overlapping patches of the input data and projects them into embedding tokens with a resolution of 128x128x128.\n",
93+
"The projected tokens are then encoded by using a 3D [Swin Transformer](https://openaccess.thecvf.com/content/ICCV2021/papers/Liu_Swin_Transformer_Hierarchical_Vision_Transformer_Using_Shifted_Windows_ICCV_2021_paper.pdf) in which the self-attention is computed within local windows.\n",
94+
"The interaction between different windows is obtained by using 3D window shifting as illustrated below. \n",
8095
"\n",
81-
"![image](https://lh3.googleusercontent.com/pw/AM-JKLULHyJ1YW_QWRgR2bViIOdnz9ppOpBWFpGhoxe-tmbXug0IdvV2WUUYH__EJt4iGwgD_aKm6GO4QbJZqkITr6_WXNuYRiugp-3Ir162J6XdCHv8xV2w2xIHQ7ZVWyx9ALqLG0LfmdcUQce5m8pWVfIS=w908-h379-no?authuser=2)\n",
96+
"![image](../figures/shift_patch.png)\n",
8297
"\n",
83-
"The transformer-based encoder is connected to a CNN-decoder via skip connection at multiple resolutions. The segmentation output consists of 3 output channels corresponding to ET,WT and TC sub-regions and is computed by using a 1x1x1 convolutional layer followed by Sigmoid activation function.\n"
98+
"The transformer-based encoder is connected to a CNN-decoder via skip connection at multiple resolutions.\n",
99+
"The segmentation output consists of 3 output channels corresponding to ET, WT, and TC sub-regions and is computed by using a 1x1x1 convolutional layer followed by Sigmoid activation function.\n"
84100
]
85101
},
86102
{
87103
"cell_type": "markdown",
88104
"metadata": {},
89105
"source": [
90-
" # Download dataset and json file\n",
106+
" ## Download dataset and json file\n",
91107
"\n",
92-
"- Register and download the official BraTS 21 dataset from the link below and place then into \"TrainingData\" in the dataset folder:\n",
108+
"- Register and download the official BraTS 21 dataset from the link below and place them into \"TrainingData\" in the dataset folder:\n",
93109
"\n",
94110
" https://www.synapse.org/#!Synapse:syn27046444/wiki/616992\n",
95111
" \n",
@@ -119,6 +135,14 @@
119135
"%matplotlib inline"
120136
]
121137
},
138+
{
139+
"attachments": {},
140+
"cell_type": "markdown",
141+
"metadata": {},
142+
"source": [
143+
"## Setup imports"
144+
]
145+
},
122146
{
123147
"cell_type": "code",
124148
"execution_count": 2,

0 commit comments

Comments
 (0)