Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
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 <[email protected]>

* remove duplicate places

Signed-off-by: Yiheng Wang <[email protected]>

4105 drops pt16 support (Project-MONAI#4106)

* update sys req

Signed-off-by: Wenqi Li <[email protected]>

* temp test

Signed-off-by: Wenqi Li <[email protected]>

* update code for torch>=1.7

Signed-off-by: Wenqi Li <[email protected]>

* temp tests

Signed-off-by: Wenqi Li <[email protected]>

* fixes tests

Signed-off-by: Wenqi Li <[email protected]>

* autofix

Signed-off-by: Wenqi Li <[email protected]>

* fixes import

Signed-off-by: Wenqi Li <[email protected]>

* clear cache

Signed-off-by: Wenqi Li <[email protected]>

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>

* remove temp cmd

Signed-off-by: Wenqi Li <[email protected]>

Make `pixelshuffle` scriptable (Project-MONAI#4109)

* Update the existing functionality to comply with the `torchscript.jit.script` function.

Signed-off-by: Ramon Emiliani <[email protected]>

meta tensor (Project-MONAI#4077)

* meta tensor

Signed-off-by: Richard Brown <[email protected]>

4084 Add kwargs for `Tensor.to()` in engines (Project-MONAI#4112)

* [DLMED] add kwargs for to() API

Signed-off-by: Nic Ma <[email protected]>

* [MONAI] python code formatting

Signed-off-by: monai-bot <[email protected]>

* [DLMED] fix typo

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] fix flake8

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <[email protected]>

Co-authored-by: monai-bot <[email protected]>

fixes pytorch version tests (Project-MONAI#4127)

Signed-off-by: Wenqi Li <[email protected]>

update meta tensor api (Project-MONAI#4131)

* update meta tensor api

Signed-off-by: Wenqi Li <[email protected]>

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>

runtests.sh isort (Project-MONAI#4134)

Signed-off-by: Richard Brown <[email protected]>

update citation (Project-MONAI#4133)

Signed-off-by: Wenqi Li <[email protected]>

`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 <[email protected]>

* fix

Signed-off-by: Richard Brown <[email protected]>

* fix

Signed-off-by: Richard Brown <[email protected]>

[DLMED] fix file name in meta (Project-MONAI#4145)

Signed-off-by: Nic Ma <[email protected]>

4116 Add support for advanced args of AMP (Project-MONAI#4132)

* [DLMED] fix typo in bundle scripts

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] add support for AMP args

Signed-off-by: Nic Ma <[email protected]>

* [MONAI] python code formatting

Signed-off-by: monai-bot <[email protected]>

* [DLMED] fix flake8

Signed-off-by: Nic Ma <[email protected]>

Co-authored-by: monai-bot <[email protected]>

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)
  • Loading branch information
Can-Zhao committed May 10, 2022
1 parent fc400bd commit 4379e90
Show file tree
Hide file tree
Showing 62 changed files with 2,101 additions and 321 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: [self-hosted, linux, x64, common]
strategy:
matrix:
pytorch-version: [1.6.0, 1.7.1, 1.8.1, 1.9.1, latest]
pytorch-version: [1.7.1, 1.8.1, 1.9.1, 1.10.2, latest]
steps:
- uses: actions/checkout@v2
- name: Install the dependencies
Expand All @@ -24,15 +24,15 @@ jobs:
python -m pip install --upgrade pip wheel
python -m pip uninstall -y torch torchvision
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
python -m pip install torch torchvision
elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then
python -m pip install torch==1.6.0 torchvision==0.7.0
python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
python -m pip install torch==1.7.1 torchvision==0.8.2
python -m pip install torch==1.7.1 torchvision==0.8.2 --extra-index-url https://download.pytorch.org/whl/cu113
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then
python -m pip install torch==1.8.1 torchvision==0.9.1
python -m pip install torch==1.8.1 torchvision==0.9.1 --extra-index-url https://download.pytorch.org/whl/cu113
elif [ ${{ matrix.pytorch-version }} == "1.9.1" ]; then
python -m pip install torch==1.9.1 torchvision==0.10.1
python -m pip install torch==1.9.1 torchvision==0.10.1 --extra-index-url https://download.pytorch.org/whl/cu113
elif [ ${{ matrix.pytorch-version }} == "1.10.2" ]; then
python -m pip install torch==1.10.2 torchvision==0.11.3 --extra-index-url https://download.pytorch.org/whl/cu113
fi
python -m pip install -r requirements-dev.txt
python -m pip list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
pytorch: "-h"
base: "nvcr.io/nvidia/pytorch:22.03-py3"
- environment: PT110+CUDA102
pytorch: "torch==1.10.1 torchvision==0.11.2"
pytorch: "torch==1.10.2 torchvision==0.11.3"
base: "nvcr.io/nvidia/cuda:10.2-devel-ubuntu18.04"
- environment: PT111+CUDA102
pytorch: "torch==1.11.0 torchvision==0.12.0"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pythonapp-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pytorch-version: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, latest]
pytorch-version: [1.7.1, 1.8.1, 1.9.1, 1.10.2, latest]
timeout-minutes: 40
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -148,16 +148,14 @@ jobs:
# min. requirements
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
python -m pip install torch
elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then
python -m pip install torch==1.6.0
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
python -m pip install torch==1.7.1
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then
python -m pip install torch==1.8.1
elif [ ${{ matrix.pytorch-version }} == "1.9.1" ]; then
python -m pip install torch==1.9.1
elif [ ${{ matrix.pytorch-version }} == "1.10.1" ]; then
python -m pip install torch==1.10.1
elif [ ${{ matrix.pytorch-version }} == "1.10.2" ]; then
python -m pip install torch==1.10.2
fi
python -m pip install -r requirements-min.txt
python -m pip list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
# install the latest pytorch for testing
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
# fresh torch installation according to pyproject.toml
python -m pip install torch>=1.6 torchvision
python -m pip install torch>=1.7 torchvision
- name: Check packages
run: |
pip uninstall monai
Expand Down
12 changes: 8 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ title: "MONAI: Medical Open Network for AI"
abstract: "AI Toolkit for Healthcare Imaging"
authors:
- name: "MONAI Consortium"
date-released: 2020-03-28
version: "0.6.0"
doi: "10.5281/zenodo.4323058"
date-released: 2022-02-16
version: "0.8.1"
identifiers:
- description: "This DOI represents all versions of MONAI, and will always resolve to the latest one."
type: doi
value: "10.5281/zenodo.4323058"
license: "Apache-2.0"
repository-code: "https://github.com/Project-MONAI/MONAI"
cff-version: "1.1.0"
url: "https://monai.io"
cff-version: "1.2.0"
message: "If you use this software, please cite it using these metadata."
...
24 changes: 24 additions & 0 deletions docs/source/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,24 @@ PILReader
.. autoclass:: PILReader
:members:

Whole slide image reader
------------------------

BaseWSIReader
~~~~~~~~~~~~~
.. autoclass:: BaseWSIReader
:members:

WSIReader
~~~~~~~~~
.. autoclass:: WSIReader
:members:

CuCIMWSIReader
~~~~~~~~~~~~~~
.. autoclass:: CuCIMWSIReader
:members:

Image writer
------------

Expand Down Expand Up @@ -271,3 +284,14 @@ ThreadDataLoader
TestTimeAugmentation
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: monai.data.TestTimeAugmentation


Meta Object
-----------
.. automodule:: monai.data.meta_obj
:members:

MetaTensor
----------
.. autoclass:: monai.data.MetaTensor
:members:
15 changes: 15 additions & 0 deletions docs/source/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,21 @@ Utility (Dict)
:members:
:special-members: __call__

MetaTensor
^^^^^^^^^^

`ToMetaTensord`
"""""""""""""""
.. autoclass:: ToMetaTensord
:members:
:special-members: __call__

`FromMetaTensord`
"""""""""""""""""
.. autoclass:: FromMetaTensord
:members:
:special-members: __call__

Transform Adaptors
------------------
.. automodule:: monai.transforms.adaptors
Expand Down
4 changes: 2 additions & 2 deletions monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def ckpt_export(
.. code-block:: bash
python -m monai.bundle export network --filepath <export path> --ckpt_file <checkpoint path> ...
python -m monai.bundle ckpt_export network --filepath <export path> --ckpt_file <checkpoint path> ...
Args:
net_id: ID name of the network component in the config, it must be `torch.nn.Module`.
Expand All @@ -390,7 +390,7 @@ def ckpt_export(
key_in_ckpt=key_in_ckpt,
**override,
)
_log_input_summary(tag="export", args=_args)
_log_input_summary(tag="ckpt_export", args=_args)
filepath_, ckpt_file_, config_file_, net_id_, meta_file_, key_in_ckpt_ = _pop_args(
_args, "filepath", "ckpt_file", "config_file", net_id="", meta_file=None, key_in_ckpt=""
)
Expand Down
5 changes: 4 additions & 1 deletion monai/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from .folder_layout import FolderLayout
from .grid_dataset import GridPatchDataset, PatchDataset, PatchIter, PatchIterd
from .image_dataset import ImageDataset
from .image_reader import ImageReader, ITKReader, NibabelReader, NumpyReader, PILReader, WSIReader
from .image_reader import ImageReader, ITKReader, NibabelReader, NumpyReader, PILReader
from .image_writer import (
SUPPORTED_WRITERS,
ImageWriter,
Expand All @@ -46,6 +46,8 @@
resolve_writer,
)
from .iterable_dataset import CSVIterableDataset, IterableDataset, ShuffleBuffer
from .meta_obj import MetaObj, get_track_meta, get_track_transforms, set_track_meta, set_track_transforms
from .meta_tensor import MetaTensor
from .nifti_saver import NiftiSaver
from .nifti_writer import write_nifti
from .png_saver import PNGSaver
Expand Down Expand Up @@ -85,3 +87,4 @@
worker_init_fn,
zoom_affine,
)
from .wsi_reader import BaseWSIReader, CuCIMWSIReader, WSIReader
Loading

0 comments on commit 4379e90

Please sign in to comment.