Skip to content

Commit 4379e90

Browse files
committed
Add comments
Add padding to filter to ensure same size after anti-aliasing Use replicate padding insteadof zero padding to avoid artifacts for non-zero boundary Reuse GaussianSmooth 4073 Enhance DynUNet doc-strings (Project-MONAI#4102) * Fix doc strings error Signed-off-by: Yiheng Wang <vennw@nvidia.com> * remove duplicate places Signed-off-by: Yiheng Wang <vennw@nvidia.com> 4105 drops pt16 support (Project-MONAI#4106) * update sys req Signed-off-by: Wenqi Li <wenqil@nvidia.com> * temp test Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update code for torch>=1.7 Signed-off-by: Wenqi Li <wenqil@nvidia.com> * temp tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * autofix Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes import Signed-off-by: Wenqi Li <wenqil@nvidia.com> * clear cache Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * remove temp cmd Signed-off-by: Wenqi Li <wenqil@nvidia.com> Make `pixelshuffle` scriptable (Project-MONAI#4109) * Update the existing functionality to comply with the `torchscript.jit.script` function. Signed-off-by: Ramon Emiliani <ramon@afxmedical.com> meta tensor (Project-MONAI#4077) * meta tensor Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> 4084 Add kwargs for `Tensor.to()` in engines (Project-MONAI#4112) * [DLMED] add kwargs for to() API Signed-off-by: Nic Ma <nma@nvidia.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> * [DLMED] fix typo Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> fixes pytorch version tests (Project-MONAI#4127) Signed-off-by: Wenqi Li <wenqil@nvidia.com> update meta tensor api (Project-MONAI#4131) * update meta tensor api Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> runtests.sh isort (Project-MONAI#4134) Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> update citation (Project-MONAI#4133) Signed-off-by: Wenqi Li <wenqil@nvidia.com> `ToMetaTensor` and `FromMetaTensor` transforms (Project-MONAI#4115) to and from meta no skip if before pytorch 1.7 (Project-MONAI#4139) * no skip if before pytorch 1.7 Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * fix Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * fix Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> [DLMED] fix file name in meta (Project-MONAI#4145) Signed-off-by: Nic Ma <nma@nvidia.com> 4116 Add support for advanced args of AMP (Project-MONAI#4132) * [DLMED] fix typo in bundle scripts Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add support for AMP args Signed-off-by: Nic Ma <nma@nvidia.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> * [DLMED] fix flake8 Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> New wsireader (Project-MONAI#4147) `MetaTensor`: collate; decollate; dataset; dataloader; out=; indexing and iterating across batches (Project-MONAI#4137) `MetaTensor`: collate; decollate; dataset; dataloader; out=; indexing and iterating across batches (Project-MONAI#4137)
1 parent fc400bd commit 4379e90

62 files changed

Lines changed: 2101 additions & 321 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cron.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: [self-hosted, linux, x64, common]
1616
strategy:
1717
matrix:
18-
pytorch-version: [1.6.0, 1.7.1, 1.8.1, 1.9.1, latest]
18+
pytorch-version: [1.7.1, 1.8.1, 1.9.1, 1.10.2, latest]
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: Install the dependencies
@@ -24,15 +24,15 @@ jobs:
2424
python -m pip install --upgrade pip wheel
2525
python -m pip uninstall -y torch torchvision
2626
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
27-
python -m pip install torch torchvision
28-
elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then
29-
python -m pip install torch==1.6.0 torchvision==0.7.0
27+
python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
3028
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
31-
python -m pip install torch==1.7.1 torchvision==0.8.2
29+
python -m pip install torch==1.7.1 torchvision==0.8.2 --extra-index-url https://download.pytorch.org/whl/cu113
3230
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then
33-
python -m pip install torch==1.8.1 torchvision==0.9.1
31+
python -m pip install torch==1.8.1 torchvision==0.9.1 --extra-index-url https://download.pytorch.org/whl/cu113
3432
elif [ ${{ matrix.pytorch-version }} == "1.9.1" ]; then
35-
python -m pip install torch==1.9.1 torchvision==0.10.1
33+
python -m pip install torch==1.9.1 torchvision==0.10.1 --extra-index-url https://download.pytorch.org/whl/cu113
34+
elif [ ${{ matrix.pytorch-version }} == "1.10.2" ]; then
35+
python -m pip install torch==1.10.2 torchvision==0.11.3 --extra-index-url https://download.pytorch.org/whl/cu113
3636
fi
3737
python -m pip install -r requirements-dev.txt
3838
python -m pip list

.github/workflows/pythonapp-gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
pytorch: "-h"
5151
base: "nvcr.io/nvidia/pytorch:22.03-py3"
5252
- environment: PT110+CUDA102
53-
pytorch: "torch==1.10.1 torchvision==0.11.2"
53+
pytorch: "torch==1.10.2 torchvision==0.11.3"
5454
base: "nvcr.io/nvidia/cuda:10.2-devel-ubuntu18.04"
5555
- environment: PT111+CUDA102
5656
pytorch: "torch==1.11.0 torchvision==0.12.0"

.github/workflows/pythonapp-min.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
strategy:
120120
fail-fast: false
121121
matrix:
122-
pytorch-version: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, latest]
122+
pytorch-version: [1.7.1, 1.8.1, 1.9.1, 1.10.2, latest]
123123
timeout-minutes: 40
124124
steps:
125125
- uses: actions/checkout@v2
@@ -148,16 +148,14 @@ jobs:
148148
# min. requirements
149149
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
150150
python -m pip install torch
151-
elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then
152-
python -m pip install torch==1.6.0
153151
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
154152
python -m pip install torch==1.7.1
155153
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then
156154
python -m pip install torch==1.8.1
157155
elif [ ${{ matrix.pytorch-version }} == "1.9.1" ]; then
158156
python -m pip install torch==1.9.1
159-
elif [ ${{ matrix.pytorch-version }} == "1.10.1" ]; then
160-
python -m pip install torch==1.10.1
157+
elif [ ${{ matrix.pytorch-version }} == "1.10.2" ]; then
158+
python -m pip install torch==1.10.2
161159
fi
162160
python -m pip install -r requirements-min.txt
163161
python -m pip list

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
# install the latest pytorch for testing
138138
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
139139
# fresh torch installation according to pyproject.toml
140-
python -m pip install torch>=1.6 torchvision
140+
python -m pip install torch>=1.7 torchvision
141141
- name: Check packages
142142
run: |
143143
pip uninstall monai

CITATION.cff

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ title: "MONAI: Medical Open Network for AI"
66
abstract: "AI Toolkit for Healthcare Imaging"
77
authors:
88
- name: "MONAI Consortium"
9-
date-released: 2020-03-28
10-
version: "0.6.0"
11-
doi: "10.5281/zenodo.4323058"
9+
date-released: 2022-02-16
10+
version: "0.8.1"
11+
identifiers:
12+
- description: "This DOI represents all versions of MONAI, and will always resolve to the latest one."
13+
type: doi
14+
value: "10.5281/zenodo.4323058"
1215
license: "Apache-2.0"
1316
repository-code: "https://github.com/Project-MONAI/MONAI"
14-
cff-version: "1.1.0"
17+
url: "https://monai.io"
18+
cff-version: "1.2.0"
1519
message: "If you use this software, please cite it using these metadata."
1620
...

docs/source/data.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,24 @@ PILReader
152152
.. autoclass:: PILReader
153153
:members:
154154

155+
Whole slide image reader
156+
------------------------
157+
158+
BaseWSIReader
159+
~~~~~~~~~~~~~
160+
.. autoclass:: BaseWSIReader
161+
:members:
162+
155163
WSIReader
156164
~~~~~~~~~
157165
.. autoclass:: WSIReader
158166
:members:
159167

168+
CuCIMWSIReader
169+
~~~~~~~~~~~~~~
170+
.. autoclass:: CuCIMWSIReader
171+
:members:
172+
160173
Image writer
161174
------------
162175

@@ -271,3 +284,14 @@ ThreadDataLoader
271284
TestTimeAugmentation
272285
~~~~~~~~~~~~~~~~~~~~
273286
.. autoclass:: monai.data.TestTimeAugmentation
287+
288+
289+
Meta Object
290+
-----------
291+
.. automodule:: monai.data.meta_obj
292+
:members:
293+
294+
MetaTensor
295+
----------
296+
.. autoclass:: monai.data.MetaTensor
297+
:members:

docs/source/transforms.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,6 +1842,21 @@ Utility (Dict)
18421842
:members:
18431843
:special-members: __call__
18441844

1845+
MetaTensor
1846+
^^^^^^^^^^
1847+
1848+
`ToMetaTensord`
1849+
"""""""""""""""
1850+
.. autoclass:: ToMetaTensord
1851+
:members:
1852+
:special-members: __call__
1853+
1854+
`FromMetaTensord`
1855+
"""""""""""""""""
1856+
.. autoclass:: FromMetaTensord
1857+
:members:
1858+
:special-members: __call__
1859+
18451860
Transform Adaptors
18461861
------------------
18471862
.. automodule:: monai.transforms.adaptors

monai/bundle/scripts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def ckpt_export(
363363
364364
.. code-block:: bash
365365
366-
python -m monai.bundle export network --filepath <export path> --ckpt_file <checkpoint path> ...
366+
python -m monai.bundle ckpt_export network --filepath <export path> --ckpt_file <checkpoint path> ...
367367
368368
Args:
369369
net_id: ID name of the network component in the config, it must be `torch.nn.Module`.
@@ -390,7 +390,7 @@ def ckpt_export(
390390
key_in_ckpt=key_in_ckpt,
391391
**override,
392392
)
393-
_log_input_summary(tag="export", args=_args)
393+
_log_input_summary(tag="ckpt_export", args=_args)
394394
filepath_, ckpt_file_, config_file_, net_id_, meta_file_, key_in_ckpt_ = _pop_args(
395395
_args, "filepath", "ckpt_file", "config_file", net_id="", meta_file=None, key_in_ckpt=""
396396
)

monai/data/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .folder_layout import FolderLayout
3535
from .grid_dataset import GridPatchDataset, PatchDataset, PatchIter, PatchIterd
3636
from .image_dataset import ImageDataset
37-
from .image_reader import ImageReader, ITKReader, NibabelReader, NumpyReader, PILReader, WSIReader
37+
from .image_reader import ImageReader, ITKReader, NibabelReader, NumpyReader, PILReader
3838
from .image_writer import (
3939
SUPPORTED_WRITERS,
4040
ImageWriter,
@@ -46,6 +46,8 @@
4646
resolve_writer,
4747
)
4848
from .iterable_dataset import CSVIterableDataset, IterableDataset, ShuffleBuffer
49+
from .meta_obj import MetaObj, get_track_meta, get_track_transforms, set_track_meta, set_track_transforms
50+
from .meta_tensor import MetaTensor
4951
from .nifti_saver import NiftiSaver
5052
from .nifti_writer import write_nifti
5153
from .png_saver import PNGSaver
@@ -85,3 +87,4 @@
8587
worker_init_fn,
8688
zoom_affine,
8789
)
90+
from .wsi_reader import BaseWSIReader, CuCIMWSIReader, WSIReader

0 commit comments

Comments
 (0)