Skip to content

Commit ef59c37

Browse files
authored
623 fixes downloading issue (#629)
* update dataset Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update dataset Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update downloads Signed-off-by: Wenqi Li <wenqil@nvidia.com> * remove dep Signed-off-by: Wenqi Li <wenqil@nvidia.com>
1 parent 102f34e commit ef59c37

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

3d_registration/paired_lung_ct.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"outputs": [],
4343
"source": [
44-
"!python -c \"import monai\" || pip install -q \"monai-weekly[gdown, nibabel, tqdm]\"\n",
44+
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel, tqdm]\"\n",
4545
"!python -c \"import matplotlib\" || pip install -q matplotlib\n",
4646
"%matplotlib inline"
4747
]
@@ -892,7 +892,7 @@
892892
}
893893
],
894894
"source": [
895-
"resource = \"https://drive.google.com/uc?id=1SUS8qknkxyF_lRLmjNqMz_DvH3Nygj68\"\n",
895+
"resource = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/pair_lung_ct.pth\"\n",
896896
"dst = f\"{root_dir}/pretrained_weight.pth\"\n",
897897
"download_url(resource, dst)\n",
898898
"model.load_state_dict(torch.load(dst))"
@@ -1267,7 +1267,7 @@
12671267
"provenance": []
12681268
},
12691269
"kernelspec": {
1270-
"display_name": "Python 3",
1270+
"display_name": "Python 3 (ipykernel)",
12711271
"language": "python",
12721272
"name": "python3"
12731273
},
@@ -1281,7 +1281,7 @@
12811281
"name": "python",
12821282
"nbconvert_exporter": "python",
12831283
"pygments_lexer": "ipython3",
1284-
"version": "3.8.10"
1284+
"version": "3.8.12"
12851285
}
12861286
},
12871287
"nbformat": 4,

deepgrow/ignite/inference_3d.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"!python -c \"import monai\" || pip install -q \"monai-weekly[gdown, nibabel, tqdm]\""
9+
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel, tqdm]\""
1010
]
1111
},
1212
{
@@ -15,13 +15,13 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"import gdown\n",
1918
"import os\n",
2019
"import matplotlib.pyplot as plt\n",
2120
"import numpy as np\n",
2221
"import torch\n",
2322
"from torch import jit\n",
2423
"\n",
24+
"import monai\n",
2525
"from monai.apps.deepgrow.transforms import (\n",
2626
" AddGuidanceFromPointsd,\n",
2727
" AddGuidanceSignald,\n",
@@ -105,16 +105,16 @@
105105
"source": [
106106
"# Download data and model\n",
107107
"\n",
108-
"resource = \"https://drive.google.com/uc?id=1cIlDXWx4pEFpldoIXMEe-5JeaOxzB05Z\"\n",
108+
"resource = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/_image.nii.gz\"\n",
109109
"dst = \"_image.nii.gz\"\n",
110110
"\n",
111111
"if not os.path.exists(dst):\n",
112-
" gdown.download(resource, dst, quiet=False)\n",
112+
" monai.apps.download_url(resource, dst)\n",
113113
"\n",
114-
"resource = \"https://drive.google.com/uc?id=1BcU4Z-wdkw7xjydDNd28iVBUVDJYKqCO\"\n",
114+
"resource = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/deepgrow_3d.ts\"\n",
115115
"dst = \"deepgrow_3d.ts\"\n",
116116
"if not os.path.exists(dst):\n",
117-
" gdown.download(resource, dst, quiet=False)"
117+
" monai.apps.download_url(resource, dst)"
118118
]
119119
},
120120
{

modules/interpretability/class_lung_lesion.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
")\n",
123123
"\n",
124124
"data_path = os.path.join(root_dir, \"patch\")\n",
125-
"!cd {root_dir} && [ -f \"lung_lesion_patches.tar.gz\" ] || gdown --id 1Jte6L7B_5q9XMgOCAq1Ldn29F1aaIxjW \\\n",
126-
" && mkdir -p {data_path} && tar -xvf \"lung_lesion_patches.tar.gz\" -C {data_path} > /dev/null"
125+
"url = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/lung_lesion_patches.tar.gz\"\n",
126+
"monai.apps.download_and_extract(url, output_dir=data_path)"
127127
]
128128
},
129129
{
@@ -748,7 +748,7 @@
748748
"provenance": []
749749
},
750750
"kernelspec": {
751-
"display_name": "Python 3",
751+
"display_name": "Python 3 (ipykernel)",
752752
"language": "python",
753753
"name": "python3"
754754
},
@@ -762,7 +762,7 @@
762762
"name": "python",
763763
"nbconvert_exporter": "python",
764764
"pygments_lexer": "ipython3",
765-
"version": "3.8.5"
765+
"version": "3.8.12"
766766
}
767767
},
768768
"nbformat": 4,

0 commit comments

Comments
 (0)