|
64 | 64 | "name": "stdout",
|
65 | 65 | "output_type": "stream",
|
66 | 66 | "text": [
|
67 |
| - "MONAI version: 1.2.0rc4\n", |
| 67 | + "MONAI version: 1.2.0rc4+2.g57c618cc\n", |
68 | 68 | "Numpy version: 1.22.2\n",
|
69 | 69 | "Pytorch version: 1.14.0a0+410ce96\n",
|
70 | 70 | "MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n",
|
71 |
| - "MONAI rev id: 1a55ba5423d04d2ef7ac19356ccabc4c7906f577\n", |
| 71 | + "MONAI rev id: 57c618cc0be2c081bae4caec13cf326c66874605\n", |
72 | 72 | "MONAI __file__: /workspace/monai/monai-in-dev/monai/__init__.py\n",
|
73 | 73 | "\n",
|
74 | 74 | "Optional dependencies:\n",
|
|
109 | 109 | "from monai.inferers import SimpleInferer\n",
|
110 | 110 | "from monai.networks import eval_mode\n",
|
111 | 111 | "from monai.networks.nets import densenet121\n",
|
112 |
| - "from monai.transforms import LoadImageD, EnsureChannelFirstD, ScaleIntensityD, ToTensorD, Compose\n", |
| 112 | + "from monai.transforms import LoadImageD, EnsureChannelFirstD, ScaleIntensityD, Compose\n", |
113 | 113 | "\n",
|
114 | 114 | "print_config()"
|
115 | 115 | ]
|
|
155 | 155 | "Medical images require specialized methods for I/O, preprocessing, and augmentation.\n",
|
156 | 156 | "They often follow specific formats, are handled with specific protocols, and the data arrays are often high-dimensional.\n",
|
157 | 157 | "\n",
|
158 |
| - "In this example, we will perform image loading, data format verification, intensity scaling, and conversion to Tensor with four `monai.transforms` listed below, and compose a pipeline ready to be used in next steps." |
| 158 | + "In this example, we will perform image loading, data format verification, and intensity scaling with three `monai.transforms` listed below, and compose a pipeline ready to be used in next steps." |
159 | 159 | ]
|
160 | 160 | },
|
161 | 161 | {
|
|
169 | 169 | " LoadImageD(keys=\"image\", image_only=True),\n",
|
170 | 170 | " EnsureChannelFirstD(keys=\"image\"),\n",
|
171 | 171 | " ScaleIntensityD(keys=\"image\"),\n",
|
172 |
| - " ToTensorD(keys=[\"image\", \"label\"]),\n", |
173 | 172 | " ]\n",
|
174 | 173 | ")"
|
175 | 174 | ]
|
|
202 | 201 | "name": "stdout",
|
203 | 202 | "output_type": "stream",
|
204 | 203 | "text": [
|
205 |
| - "2023-04-13 15:29:44,888 - INFO - Verified 'MedNIST.tar.gz', md5: 0bc7306e7427e00ad1c5526a6677552d.\n", |
206 |
| - "2023-04-13 15:29:44,889 - INFO - File exists: /workspace/data/MedNIST.tar.gz, skipped downloading.\n", |
207 |
| - "2023-04-13 15:29:44,889 - INFO - Non-empty folder exists in /workspace/data/MedNIST, skipped extracting.\n" |
| 204 | + "2023-04-14 11:54:20,086 - INFO - Verified 'MedNIST.tar.gz', md5: 0bc7306e7427e00ad1c5526a6677552d.\n", |
| 205 | + "2023-04-14 11:54:20,087 - INFO - File exists: /workspace/data/MedNIST.tar.gz, skipped downloading.\n", |
| 206 | + "2023-04-14 11:54:20,087 - INFO - Non-empty folder exists in /workspace/data/MedNIST, skipped extracting.\n" |
208 | 207 | ]
|
209 | 208 | },
|
210 | 209 | {
|
211 | 210 | "name": "stderr",
|
212 | 211 | "output_type": "stream",
|
213 | 212 | "text": [
|
214 |
| - "Loading dataset: 100%|██████████| 47164/47164 [00:23<00:00, 2009.60it/s]\n" |
| 213 | + "Loading dataset: 100%|██████████| 47164/47164 [00:18<00:00, 2579.81it/s]\n" |
215 | 214 | ]
|
216 | 215 | }
|
217 | 216 | ],
|
|
278 | 277 | },
|
279 | 278 | {
|
280 | 279 | "cell_type": "code",
|
281 |
| - "execution_count": 13, |
| 280 | + "execution_count": 8, |
282 | 281 | "metadata": {},
|
283 | 282 | "outputs": [
|
284 | 283 | {
|
|
0 commit comments