Skip to content

Commit fb2b06f

Browse files
authored
Change the model name in the Spleen seg example dataset to model.ts. (#222)
This is to avoid confusion as the .pt and .ts are used by some model sources to distinguish PyTorch and TorchScript model files, e.g. Clara MMAR. Signed-off-by: mmelqin <mingmelvinq@nvidia.com>
1 parent 0f42c9b commit fb2b06f

File tree

4 files changed

+45
-45
lines changed

4 files changed

+45
-45
lines changed

docs/source/getting_started/tutorials/03_segmentation_app.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ cd monai-deploy-app-sdk
5050
# Install monai-deploy-app-sdk package
5151
pip install monai-deploy-app-sdk
5252

53-
# Download/Extract ai_spleen_seg_data.zip from https://drive.google.com/file/d/1uTQsm8omwimBcp_kRXlduWBP2M6cspr1/view?usp=sharing
53+
# Download/Extract ai_spleen_seg_data zip file from https://drive.google.com/file/d/1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n/view?usp=sharing
5454

5555
# Download ai_spleen_seg_data.zip
5656
pip install gdown
57-
gdown https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1
57+
gdown https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n
5858

5959
# After downloading ai_spleen_seg_data.zip from the web browser or using gdown,
60-
unzip -o ai_spleen_seg_data.zip
60+
unzip -o ai_spleen_seg_data_updated_1203.zip
6161

6262
# Install necessary packages from the app
6363
pip install monai pydicom SimpleITK Pillow nibabel
6464

6565
# Local execution of the app
66-
python examples/apps/ai_spleen_seg_app/app.py -i dcm/ -o output -m model.pt
66+
python examples/apps/ai_spleen_seg_app/app.py -i dcm/ -o output -m model.ts
6767

6868
# Package app (creating MAP docker image) using `-l DEBUG` option to see progress.
6969
# This assumes that nvidia docker is installed in the local machine.
7070
# Please see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker to install nvidia-docker2.
71-
monai-deploy package examples/apps/ai_spleen_seg_app --tag seg_app:latest --model model.pt -l DEBUG
71+
monai-deploy package examples/apps/ai_spleen_seg_app --tag seg_app:latest --model model.ts -l DEBUG
7272

7373
# Run the app with docker image and input file locally
7474
monai-deploy run seg_app:latest dcm/ output

notebooks/tutorials/03_segmentation_app.ipynb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@
137137
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/gbae/miniconda3/envs/mednist/lib/python3.6/site-packages (from requests[socks]>=2.12.0->gdown) (1.26.6)\n",
138138
"Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /home/gbae/miniconda3/envs/mednist/lib/python3.6/site-packages (from requests[socks]>=2.12.0->gdown) (1.7.1)\n",
139139
"Downloading...\n",
140-
"From: https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1\n",
141-
"To: /home/gbae/repo/monai-deploy-app-sdk/notebooks/tutorials/ai_spleen_seg_data.zip\n",
140+
"From: https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n\n",
141+
"To: /home/gbae/repo/monai-deploy-app-sdk/notebooks/tutorials/ai_spleen_seg_data_update_1203.zip\n",
142142
"104MB [00:10, 10.3MB/s] \n",
143-
"Archive: ai_spleen_seg_data.zip\n",
143+
"Archive: ai_spleen_seg_data_updated_1203.zip\n",
144144
" creating: dcm/\n",
145145
" inflating: dcm/IMG0001.dcm \n",
146146
" inflating: dcm/IMG0002.dcm \n",
@@ -657,17 +657,17 @@
657657
" inflating: dcm/IMG0513.dcm \n",
658658
" inflating: dcm/IMG0514.dcm \n",
659659
" inflating: dcm/IMG0515.dcm \n",
660-
" inflating: model.pt \n"
660+
" inflating: model.ts \n"
661661
]
662662
}
663663
],
664664
"source": [
665-
"# Download ai_spleen_seg_data.zip\n",
665+
"# Download ai_spleen_seg_data test data zip file\n",
666666
"!pip install gdown \n",
667-
"!gdown https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1\n",
667+
"!gdown https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n\n",
668668
"\n",
669-
"# After downloading ai_spleen_seg_data.zip from the web browser or using gdown,\n",
670-
"!unzip -o \"ai_spleen_seg_data.zip\""
669+
"# After downloading ai_spleen_seg_data zip file from the web browser or using gdown,\n",
670+
"!unzip -o \"ai_spleen_seg_data_updated_1203.zip\""
671671
]
672672
},
673673
{
@@ -873,7 +873,7 @@
873873
"source": [
874874
"## Executing app locally\n",
875875
"\n",
876-
"We can execute the app in the Jupyter notebook. Note that the DICOM files of the CT Abdomen series must be present in the `dcm` and the Torch Script model at `model.pt`. Please use the actual path in your environment.\n"
876+
"We can execute the app in the Jupyter notebook. Note that the DICOM files of the CT Abdomen series must be present in the `dcm` and the Torch Script model at `model.ts`. Please use the actual path in your environment.\n"
877877
]
878878
},
879879
{
@@ -988,7 +988,7 @@
988988
"source": [
989989
"app = AISpleenSegApp()\n",
990990
"\n",
991-
"app.run(input=\"dcm\", output=\"output\", model=\"model.pt\")"
991+
"app.run(input=\"dcm\", output=\"output\", model=\"model.ts\")"
992992
]
993993
},
994994
{
@@ -1221,7 +1221,7 @@
12211221
" # -o <output folder>, for the output folder, default $PWD/output\n",
12221222
" # -m <model file>, for model file path\n",
12231223
" # e.g.\n",
1224-
" # python3 app.py -i input -m model.pt\n",
1224+
" # python3 app.py -i input -m model.ts\n",
12251225
" #\n",
12261226
" AISpleenSegApp(do_run=True)"
12271227
]
@@ -1370,7 +1370,7 @@
13701370
}
13711371
],
13721372
"source": [
1373-
"!python my_app -i dcm -o output -m model.pt"
1373+
"!python my_app -i dcm -o output -m model.ts"
13741374
]
13751375
},
13761376
{
@@ -1465,7 +1465,7 @@
14651465
"source": [
14661466
"import os\n",
14671467
"os.environ['MKL_THREADING_LAYER'] = 'GNU'\n",
1468-
"!monai-deploy exec my_app -i dcm -o output -m model.pt"
1468+
"!monai-deploy exec my_app -i dcm -o output -m model.ts"
14691469
]
14701470
},
14711471
{
@@ -1514,7 +1514,7 @@
15141514
}
15151515
],
15161516
"source": [
1517-
"!monai-deploy package -b nvcr.io/nvidia/pytorch:21.11-py3 my_app --tag my_app:latest -m model.pt"
1517+
"!monai-deploy package -b nvcr.io/nvidia/pytorch:21.11-py3 my_app --tag my_app:latest -m model.ts"
15181518
]
15191519
},
15201520
{
@@ -1698,7 +1698,7 @@
16981698
"name": "python",
16991699
"nbconvert_exporter": "python",
17001700
"pygments_lexer": "ipython3",
1701-
"version": "3.6.13"
1701+
"version": "3.7.5"
17021702
}
17031703
},
17041704
"nbformat": 4,

notebooks/tutorials/04_mis_tutorial.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
" \"models\": [\r\n",
114114
" {\r\n",
115115
" \"name\": \"model-54dd6cdaac290a0e800c0fa627cd60410bb2cea173ac8bb2f4816cc54ea88c90\",\r\n",
116-
" \"path\": \"/opt/monai/models/model/model.pt\"\r\n",
116+
" \"path\": \"/opt/monai/models/model/model.ts\"\r\n",
117117
" }\r\n",
118118
" ],\r\n",
119119
" \"resources\": {\r\n",
@@ -270,7 +270,7 @@
270270
"| `map.gpu` | Number of GPUs requested by application which can be obtained either from `pkg.json` OR from when we created app.py (check @resource decorator) |\n",
271271
"| `map.inputPath` | Input volume path within MAP container, can be derived by appending the `input.path` with the `working-directory` in `app.json` |\n",
272272
"| `map.outputPath` | Output volume path within MAP container, can be derived by appending the `output.path` with the `working-directory` in `app.json` |\n",
273-
"| `map.modelPath` | Model volume path within MAP container, can be derived using a `path` of an entry under `models` in `pkg.json`, and taking the sub-path where the `/model` folder resides (ex: `path: \"/opt/monai/models/model/model.pt\"` -> `\"/opt/monai/models\"`) |"
273+
"| `map.modelPath` | Model volume path within MAP container, can be derived using a `path` of an entry under `models` in `pkg.json`, and taking the sub-path where the `/model` folder resides (ex: `path: \"/opt/monai/models/model/model.ts\"` -> `\"/opt/monai/models\"`) |"
274274
]
275275
},
276276
{
@@ -452,10 +452,10 @@
452452
"Requirement already satisfied: soupsieve>1.2 in /home/gupta/miniconda3/envs/monairsna/lib/python3.6/site-packages (from beautifulsoup4->gdown) (2.3.1)\n",
453453
"Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /home/gupta/miniconda3/envs/monairsna/lib/python3.6/site-packages (from requests[socks]->gdown) (1.7.1)\n",
454454
"Downloading...\n",
455-
"From: https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1\n",
456-
"To: /data/Vikash/Tools/RSNA/monai-deploy-app-sdk/notebooks/tutorials/ai_spleen_seg_data.zip\n",
455+
"From: https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n\n",
456+
"To: /data/Vikash/Tools/RSNA/monai-deploy-app-sdk/notebooks/tutorials/ai_spleen_seg_data_updated_1203.zip\n",
457457
"100%|████████████████████████████████████████| 104M/104M [00:20<00:00, 4.97MB/s]\n",
458-
"Archive: ai_spleen_seg_data.zip\n",
458+
"Archive: ai_spleen_seg_data_updated_1203.zip\n",
459459
" inflating: dcm/IMG0001.dcm \n",
460460
" inflating: dcm/IMG0002.dcm \n",
461461
" inflating: dcm/IMG0003.dcm \n",
@@ -983,16 +983,16 @@
983983
" inflating: dcm/IMG0513.dcm \n",
984984
" inflating: dcm/IMG0514.dcm \n",
985985
" inflating: dcm/IMG0515.dcm \n",
986-
" inflating: model.pt \n",
986+
" inflating: model.ts \n",
987987
"input.zip\n"
988988
]
989989
}
990990
],
991991
"source": [
992-
"# Download ai_spleen_seg_data.zip if not done so already\n",
992+
"# Download ai_spleen_seg_data if not done so already\n",
993993
"!pip install gdown \n",
994-
"!gdown https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1\n",
995-
"!unzip -o \"ai_spleen_seg_data.zip\"\n",
994+
"!gdown https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n\n",
995+
"!unzip -o \"ai_spleen_seg_data_updated_1203.zip\"\n",
996996
"\n",
997997
"!cd dcm; zip -rq ../input.zip *\n",
998998
"!ls input.zip"

notebooks/tutorials/05_full_tutorial.ipynb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@
128128
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/gbae/miniconda3/envs/mednist/lib/python3.6/site-packages (from requests[socks]>=2.12.0->gdown) (1.26.6)\n",
129129
"Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /home/gbae/miniconda3/envs/mednist/lib/python3.6/site-packages (from requests[socks]>=2.12.0->gdown) (1.7.1)\n",
130130
"Downloading...\n",
131-
"From: https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1\n",
132-
"To: /home/gbae/repo/monai-deploy-app-sdk/notebooks/tutorials/ai_spleen_seg_data.zip\n",
131+
"From: https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n\n",
132+
"To: /home/gbae/repo/monai-deploy-app-sdk/notebooks/tutorials/ai_spleen_seg_data_updated_1203.zip\n",
133133
"104MB [00:10, 10.3MB/s] \n",
134-
"Archive: ai_spleen_seg_data.zip\n",
134+
"Archive: ai_spleen_seg_data_update_1203.zip\n",
135135
" creating: dcm/\n",
136136
" inflating: dcm/IMG0001.dcm \n",
137137
" inflating: dcm/IMG0002.dcm \n",
@@ -648,17 +648,17 @@
648648
" inflating: dcm/IMG0513.dcm \n",
649649
" inflating: dcm/IMG0514.dcm \n",
650650
" inflating: dcm/IMG0515.dcm \n",
651-
" inflating: model.pt \n"
651+
" inflating: model.ts \n"
652652
]
653653
}
654654
],
655655
"source": [
656-
"# Download ai_spleen_seg_data.zip\n",
656+
"# Download ai_spleen_seg_data test data zip file\n",
657657
"!pip install gdown \n",
658-
"!gdown https://drive.google.com/uc?id=1uTQsm8omwimBcp_kRXlduWBP2M6cspr1\n",
658+
"!gdown https://drive.google.com/uc?id=1GC_N8YQk_mOWN02oOzAU_2YDmNRWk--n\n",
659659
"\n",
660-
"# After downloading ai_spleen_seg_data.zip from the web browser or using gdown,\n",
661-
"!unzip -o \"ai_spleen_seg_data.zip\""
660+
"# After downloading ai_spleen_seg_data zip file from the web browser or using gdown,\n",
661+
"!unzip -o \"ai_spleen_seg_data_updated_1203.zip\""
662662
]
663663
},
664664
{
@@ -864,7 +864,7 @@
864864
"source": [
865865
"## Executing app locally\n",
866866
"\n",
867-
"We can execute the app in the Jupyter notebook. Note that the DICOM files of the CT Abdomen series must be present in the `dcm` and the Torch Script model at `model.pt`. Please use the actual path in your environment.\n"
867+
"We can execute the app in the Jupyter notebook. Note that the DICOM files of the CT Abdomen series must be present in the `dcm` and the Torch Script model at `model.ts`. Please use the actual path in your environment.\n"
868868
]
869869
},
870870
{
@@ -935,7 +935,7 @@
935935
"source": [
936936
"app = AISpleenSegApp()\n",
937937
"\n",
938-
"app.run(input=\"dcm\", output=\"output\", model=\"model.pt\")"
938+
"app.run(input=\"dcm\", output=\"output\", model=\"model.ts\")"
939939
]
940940
},
941941
{
@@ -1168,7 +1168,7 @@
11681168
" # -o <output folder>, for the output folder, default $PWD/output\n",
11691169
" # -m <model file>, for model file path\n",
11701170
" # e.g.\n",
1171-
" # python3 app.py -i input -m model.pt\n",
1171+
" # python3 app.py -i input -m model.ts\n",
11721172
" #\n",
11731173
" AISpleenSegApp(do_run=True)"
11741174
]
@@ -1276,7 +1276,7 @@
12761276
}
12771277
],
12781278
"source": [
1279-
"!python my_app -i dcm -o output -m model.pt"
1279+
"!python my_app -i dcm -o output -m model.ts"
12801280
]
12811281
},
12821282
{
@@ -1328,7 +1328,7 @@
13281328
}
13291329
],
13301330
"source": [
1331-
"!monai-deploy exec my_app -i dcm -o output -m model.pt"
1331+
"!monai-deploy exec my_app -i dcm -o output -m model.ts"
13321332
]
13331333
},
13341334
{
@@ -1377,7 +1377,7 @@
13771377
}
13781378
],
13791379
"source": [
1380-
"!monai-deploy package my_app --tag my_app:latest -m model.pt"
1380+
"!monai-deploy package my_app --tag my_app:latest -m model.ts"
13811381
]
13821382
},
13831383
{
@@ -1634,7 +1634,7 @@
16341634
" \"models\": [\n",
16351635
" {\n",
16361636
" \"name\": \"model-54dd6cdaac290a0e800c0fa627cd60410bb2cea173ac8bb2f4816cc54ea88c90\",\n",
1637-
" \"path\": \"/opt/monai/models/model/model.pt\"\n",
1637+
" \"path\": \"/opt/monai/models/model/model.ts\"\n",
16381638
" }\n",
16391639
" ],\n",
16401640
" \"resources\": {\n",
@@ -1791,7 +1791,7 @@
17911791
"| `map.gpu` | Number of GPUs requested by application which can be obtained either from `pkg.json` OR from when we created app.py (check @resource decorator) |\n",
17921792
"| `map.inputPath` | Input volume path within MAP container, can be derived by appending the `input.path` with the `working-directory` in `app.json` |\n",
17931793
"| `map.outputPath` | Output volume path within MAP container, can be derived by appending the `output.path` with the `working-directory` in `app.json` |\n",
1794-
"| `map.modelPath` | Model volume path within MAP container, can be derived using a `path` of an entry under `models` in `pkg.json`, and taking the sub-path where the `/model` folder resides (ex: `path: \"/opt/monai/models/model/model.pt\"` -> `\"/opt/monai/models\"`) |"
1794+
"| `map.modelPath` | Model volume path within MAP container, can be derived using a `path` of an entry under `models` in `pkg.json`, and taking the sub-path where the `/model` folder resides (ex: `path: \"/opt/monai/models/model/model.ts\"` -> `\"/opt/monai/models\"`) |"
17951795
]
17961796
},
17971797
{

0 commit comments

Comments
 (0)