Skip to content

Commit a2652fb

Browse files
1090-enhance-tutorials (#1100)
Signed-off-by: binliu <binliu@nvidia.com> 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 <binliu@nvidia.com> Signed-off-by: Bin Liu (SW-GPU) <binliu@nvidia.com> Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Signed-off-by: mingxin-zheng <18563433+mingxin-zheng@users.noreply.github.com> Signed-off-by: Mingxin Zheng <mingxinz@nvidia.com> Co-authored-by: mingxin-zheng <mingxin-zheng@users.noreply.github.com> Co-authored-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Co-authored-by: Mingxin Zheng <mingxinz@nvidia.com>
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
]

0 commit comments

Comments
 (0)