From 1f1feb10877a424b67d598c087992393dacfe377 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Thu, 24 Mar 2022 11:13:11 +0000 Subject: [PATCH 1/4] update dataset Signed-off-by: Wenqi Li --- modules/interpretability/class_lung_lesion.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/interpretability/class_lung_lesion.ipynb b/modules/interpretability/class_lung_lesion.ipynb index b940d970a4..10b279a288 100644 --- a/modules/interpretability/class_lung_lesion.ipynb +++ b/modules/interpretability/class_lung_lesion.ipynb @@ -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)" ] }, { @@ -748,7 +748,7 @@ "provenance": [] }, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -762,7 +762,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.8.12" } }, "nbformat": 4, From 76b7708b6573d94f1204833f2432168d535dba34 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Thu, 24 Mar 2022 11:18:04 +0000 Subject: [PATCH 2/4] update dataset Signed-off-by: Wenqi Li --- 3d_registration/paired_lung_ct.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3d_registration/paired_lung_ct.ipynb b/3d_registration/paired_lung_ct.ipynb index 6653440974..a8e88a7f24 100644 --- a/3d_registration/paired_lung_ct.ipynb +++ b/3d_registration/paired_lung_ct.ipynb @@ -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))" @@ -1267,7 +1267,7 @@ "provenance": [] }, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1281,7 +1281,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.8.12" } }, "nbformat": 4, From 7b462051f51fd48b3472d594b2022e066cf50a5e Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Thu, 24 Mar 2022 11:23:32 +0000 Subject: [PATCH 3/4] update downloads Signed-off-by: Wenqi Li --- deepgrow/ignite/inference_3d.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deepgrow/ignite/inference_3d.ipynb b/deepgrow/ignite/inference_3d.ipynb index b77d93309d..0cf2db6199 100644 --- a/deepgrow/ignite/inference_3d.ipynb +++ b/deepgrow/ignite/inference_3d.ipynb @@ -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]\"" ] }, { @@ -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", @@ -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)" ] }, { From c663eaef6eed87a4135b4e5fdcbddd6603718a22 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Thu, 24 Mar 2022 11:25:58 +0000 Subject: [PATCH 4/4] remove dep Signed-off-by: Wenqi Li --- 3d_registration/paired_lung_ct.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3d_registration/paired_lung_ct.ipynb b/3d_registration/paired_lung_ct.ipynb index a8e88a7f24..f6175c94fc 100644 --- a/3d_registration/paired_lung_ct.ipynb +++ b/3d_registration/paired_lung_ct.ipynb @@ -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" ]