Skip to content

623 fixes downloading issue #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 3d_registration/paired_lung_ct.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"outputs": [],
"source": [
"!python -c \"import monai\" || pip install -q \"monai-weekly[gdown, nibabel, tqdm]\"\n",
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel, tqdm]\"\n",
"!python -c \"import matplotlib\" || pip install -q matplotlib\n",
"%matplotlib inline"
]
Expand Down Expand Up @@ -892,7 +892,7 @@
}
],
"source": [
"resource = \"https://drive.google.com/uc?id=1SUS8qknkxyF_lRLmjNqMz_DvH3Nygj68\"\n",
"resource = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/pair_lung_ct.pth\"\n",
"dst = f\"{root_dir}/pretrained_weight.pth\"\n",
"download_url(resource, dst)\n",
"model.load_state_dict(torch.load(dst))"
Expand Down Expand Up @@ -1267,7 +1267,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1281,7 +1281,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.12"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions deepgrow/ignite/inference_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"outputs": [],
"source": [
"!python -c \"import monai\" || pip install -q \"monai-weekly[gdown, nibabel, tqdm]\""
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel, tqdm]\""
]
},
{
Expand All @@ -15,13 +15,13 @@
"metadata": {},
"outputs": [],
"source": [
"import gdown\n",
"import os\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import torch\n",
"from torch import jit\n",
"\n",
"import monai\n",
"from monai.apps.deepgrow.transforms import (\n",
" AddGuidanceFromPointsd,\n",
" AddGuidanceSignald,\n",
Expand Down Expand Up @@ -105,16 +105,16 @@
"source": [
"# Download data and model\n",
"\n",
"resource = \"https://drive.google.com/uc?id=1cIlDXWx4pEFpldoIXMEe-5JeaOxzB05Z\"\n",
"resource = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/_image.nii.gz\"\n",
"dst = \"_image.nii.gz\"\n",
"\n",
"if not os.path.exists(dst):\n",
" gdown.download(resource, dst, quiet=False)\n",
" monai.apps.download_url(resource, dst)\n",
"\n",
"resource = \"https://drive.google.com/uc?id=1BcU4Z-wdkw7xjydDNd28iVBUVDJYKqCO\"\n",
"resource = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/deepgrow_3d.ts\"\n",
"dst = \"deepgrow_3d.ts\"\n",
"if not os.path.exists(dst):\n",
" gdown.download(resource, dst, quiet=False)"
" monai.apps.download_url(resource, dst)"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions modules/interpretability/class_lung_lesion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
")\n",
"\n",
"data_path = os.path.join(root_dir, \"patch\")\n",
"!cd {root_dir} && [ -f \"lung_lesion_patches.tar.gz\" ] || gdown --id 1Jte6L7B_5q9XMgOCAq1Ldn29F1aaIxjW \\\n",
" && mkdir -p {data_path} && tar -xvf \"lung_lesion_patches.tar.gz\" -C {data_path} > /dev/null"
"url = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/lung_lesion_patches.tar.gz\"\n",
"monai.apps.download_and_extract(url, output_dir=data_path)"
]
},
{
Expand Down Expand Up @@ -748,7 +748,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -762,7 +762,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.8.12"
}
},
"nbformat": 4,
Expand Down