Skip to content

merge master#419

Merged
Nic-Ma merged 123 commits intoNic-Ma:enhance-ensure-tuplefrom
Project-MONAI:dev
Jun 2, 2022
Merged

merge master#419
Nic-Ma merged 123 commits intoNic-Ma:enhance-ensure-tuplefrom
Project-MONAI:dev

Conversation

@Nic-Ma
Copy link
Copy Markdown
Owner

@Nic-Ma Nic-Ma commented Jun 2, 2022

Fixes # .

Description

A few sentences describing the changes proposed in this pull request.

Status

Ready/Work in progress/Hold

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

ericspod and others added 30 commits April 4, 2022 19:38
* Adding discussion on format to bundle specification

Signed-off-by: Eric Kerfoot <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates:
- [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](asottile/pyupgrade@v2.31.0...v2.31.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [DLMED] change PatchIter to be a transform

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

* [DLMED] add dict transform

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [DLMED] add unit tests

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

* [DLMED] store coords in dict

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

* [DLMED] update according to comments

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

* [DLMED] restore the doc-string

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

* [DLMED] store more info

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

* [DLMED] update according to comments

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix a logical error in level verification

Signed-off-by: Behrooz <[email protected]>
* Refactor `if` expression

* update clang format

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

* [MONAI] python code formatting

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

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: monai-bot <[email protected]>
* SplitDim

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

* fix

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

* fixes

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

* fix update meta

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

* update docs

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

Co-authored-by: Wenqi Li <[email protected]>
* update mmar tests

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixes pylint error

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* extend mlp

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

* 0 mlp_dim

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

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>
* added 2D (normalized) surface dice metric

Signed-off-by: Silvia Seidlitz <[email protected]>

* exclude from min tests

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

* more detailled docstring

Signed-off-by: Silvia Seidlitz <[email protected]>
* Fix doc strings error

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

* remove duplicate places

Signed-off-by: Yiheng Wang <[email protected]>
* 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]>
* Update the existing functionality to comply with the `torchscript.jit.script` function.

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

Signed-off-by: Richard Brown <[email protected]>
* [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]>
* update meta tensor api

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

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
* 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 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]>
… and iterating across batches (#4137)

`MetaTensor`: collate; decollate; dataset; dataloader; out=; indexing and iterating across batches (#4137)
* [DLMED] update Workflow.py

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

* [DLMED] update all the engines

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [DLMED] fix flake8

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

* [DLMED] fix flake8

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Implement WSIReader with OpenSlide backend .

Signed-off-by: Behrooz <[email protected]>

* Add unittest for openslide

Signed-off-by: Behrooz <[email protected]>

* Add docs

Signed-off-by: Behrooz <[email protected]>

* formatting

Signed-off-by: Behrooz <[email protected]>

* Update imports and few fixes

Signed-off-by: Behrooz <[email protected]>

* Fix x,y in docstrings

Signed-off-by: Behrooz <[email protected]>

* Address comments

Signed-off-by: Behrooz <[email protected]>

* Remove x and y

Signed-off-by: Behrooz <[email protected]>
* Implement PatchWSIDataset

Signed-off-by: Behrooz <[email protected]>

* Add unittests

Signed-off-by: Behrooz <[email protected]>

* Add docs

Signed-off-by: Behrooz <[email protected]>

* Reorder imports

Signed-off-by: Behrooz <[email protected]>

* formatting:

Signed-off-by: Behrooz <[email protected]>

* Address comments

Signed-off-by: Behrooz <[email protected]>

* Update to be compatible with Dataset

Signed-off-by: Behrooz <[email protected]>

* Update reader to accept str, class, object

Signed-off-by: Behrooz <[email protected]>

* Add test cases for various reader and level arguments

Signed-off-by: Behrooz <[email protected]>

* Update comment about OpenSlide cache

Signed-off-by: Behrooz <[email protected]>

* Rename reader_name to backend

Signed-off-by: Behrooz <[email protected]>

* Add new test cases

Signed-off-by: Behrooz <[email protected]>

* Add unittests for openslide

Signed-off-by: Behrooz <[email protected]>

* Add new test cases

Signed-off-by: Behrooz <[email protected]>

* sorts

Signed-off-by: Behrooz <[email protected]>

* Add docstring for kwargs

Signed-off-by: Behrooz <[email protected]>
* draft download

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

* update bundle download

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

* add url and load

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rename args and remove a few places

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix flake8 issue

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

* enhance with reviews

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

* add instantiate for load

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

* fix black error

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

* add unittest

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

* add load to docs

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

* add skip

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

* add schemaerror

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

* fix partial places

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

* download zip bundle

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

* [DLMED] restore Exception for test

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

* update ts features

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

* add config_files test case

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

* enhance docstring example for args_file

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Nic Ma <[email protected]>
* workaround

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

* [DLMED] fix tifffile issue

Signed-off-by: Nic Ma <[email protected]>
Can-Zhao and others added 29 commits May 26, 2022 20:12
* fix the cases of multiple labels

Signed-off-by: Can Zhao <[email protected]>

* add examples

Signed-off-by: Can Zhao <[email protected]>

* docstring

Signed-off-by: Can Zhao <[email protected]>

* docstring and remove inverse

Signed-off-by: Can Zhao <[email protected]>

* docstring

Signed-off-by: Can Zhao <[email protected]>

* docstring

Signed-off-by: Can Zhao <[email protected]>
* Adding tests

Signed-off-by: Eric Kerfoot <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

Signed-off-by: Eric Kerfoot <[email protected]>

* Fix

Signed-off-by: Eric Kerfoot <[email protected]>

* Trying to read output from failed process

Signed-off-by: Eric Kerfoot <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updates

Signed-off-by: Eric Kerfoot <[email protected]>

* Marking bundle_init as excluded

Signed-off-by: Eric Kerfoot <[email protected]>

* Marking bundle_init as excluded

Signed-off-by: Eric Kerfoot <[email protected]>

* Forgot a file

Signed-off-by: Eric Kerfoot <[email protected]>

* Marking bundle_utils as excluded

Signed-off-by: Eric Kerfoot <[email protected]>

* Marking bundle_init as excluded

Signed-off-by: Eric Kerfoot <[email protected]>

* Update

Signed-off-by: Eric Kerfoot <[email protected]>

* Updates

Signed-off-by: Eric Kerfoot <[email protected]>

* Updates

Signed-off-by: Eric Kerfoot <[email protected]>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* deprecate SegmentationSaver, TorchVisionFullyConvModel

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

* fixes mintests

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

* remove typing

Signed-off-by: Wenqi Li <[email protected]>
improve dtype conversion
…ms (#4362)

[DLMED] improve doc and tests

Signed-off-by: Nic Ma <[email protected]>
skip resizing if spatial shape matches

Signed-off-by: Wenqi Li <[email protected]>
* add box coder

Signed-off-by: Can Zhao <[email protected]>

* doc

Signed-off-by: Can Zhao <[email protected]>

* add security check

Signed-off-by: Can Zhao <[email protected]>

* docstring

Signed-off-by: Can Zhao <[email protected]>

* docstring

Signed-off-by: Can Zhao <[email protected]>

* Update test_box_coder.py

* docstring

Signed-off-by: Can Zhao <[email protected]>

docstring

Signed-off-by: Can Zhao <[email protected]>

docstring

Signed-off-by: Can Zhao <[email protected]>

Update test_box_coder.py

Signed-off-by: Can Zhao <[email protected]>

* docstring

Signed-off-by: Can Zhao <[email protected]>

docstring

Signed-off-by: Can Zhao <[email protected]>

docstring

Signed-off-by: Can Zhao <[email protected]>

Update test_box_coder.py

Signed-off-by: Can Zhao <[email protected]>

docstring

Signed-off-by: Can Zhao <[email protected]>

Update test_box_coder.py

Signed-off-by: Can Zhao <[email protected]>

* update docstring

Signed-off-by: Can Zhao <[email protected]>
workaround for 4375

Signed-off-by: Wenqi Li <[email protected]>
* [DLMED] add to doc

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

* [DLMED] add min tests

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

* update docs

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

Co-authored-by: Wenqi Li <[email protected]>
* add box -- mask converter

Signed-off-by: Can Zhao <[email protected]>

* add box mask transform

Signed-off-by: Can Zhao <[email protected]>

* add examples

Signed-off-by: Can Zhao <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add examples

Signed-off-by: Can Zhao <[email protected]>

* add import

Signed-off-by: Can Zhao <[email protected]>

* add import

Signed-off-by: Can Zhao <[email protected]>

* add docstring

Signed-off-by: Can Zhao <[email protected]>

* update test

Signed-off-by: Can Zhao <[email protected]>

* update import

Signed-off-by: Can Zhao <[email protected]>

* update test

Signed-off-by: Can Zhao <[email protected]>

* change func name

Signed-off-by: Can Zhao <[email protected]>

* change func name

Signed-off-by: Can Zhao <[email protected]>

* change func name

Signed-off-by: Can Zhao <[email protected]>

* change func name

Signed-off-by: Can Zhao <[email protected]>

* [MONAI] code formatting

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

* corrent a corner case in NMS

Signed-off-by: Can Zhao <[email protected]>

* update docstring, simplify convert_box_to_mask, add test cases

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: monai-bot <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
review readme

Signed-off-by: Wenqi Li <[email protected]>
* [DLMED] support globals in eval(lambda)

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

* [DLMED] add more tests

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

* [DLMED] update test

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

* [DLMED] update test

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

* [DLMED] fix pickle issue

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

* [DLMED] fix pickle issue

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

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [DLMED] update according to comments

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

* [DLMED] add more test

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Implement GridPatch and RandGridPatch

Signed-off-by: Behrooz <[email protected]>
* Implement foreground mask

Signed-off-by: Behrooz <[email protected]>
* Try 1

Signed-off-by: vnath <[email protected]>

* dataset prep addition

Signed-off-by: vnath <[email protected]>

* Refactoring of transforms as there were loose hanging functions

Signed-off-by: vnath <[email protected]>

* Minor changes to transforms

Signed-off-by: vnath <[email protected]>

* Added test cases for all transforms

Signed-off-by: vnath <[email protected]>

* Removed dataset prep, it will be a part of tutorial, added opencv to dev requirements

Signed-off-by: vnath <[email protected]>

* Added Init for NuClick

Signed-off-by: vnath <[email protected]>

* Code formatting changes

Signed-off-by: vnath <[email protected]>

* Linting & Formatting

Signed-off-by: vnath <[email protected]>

* Fixed Flake 8 & opencv addition to requirement & env files

Signed-off-by: vnath <[email protected]>

* Fixed Flake 8 & opencv addition to requirement & env files

Signed-off-by: vnath <[email protected]>

* Fixed Flake 8 & opencv addition to requirement & env files

Signed-off-by: vnath <[email protected]>

* Fixed Flake 8 & opencv addition to requirement & env files

Signed-off-by: vnath <[email protected]>

* Minor in line docs need to be updated

Signed-off-by: vnath <[email protected]>

* Minor in line docs need to be updated

Signed-off-by: vnath <[email protected]>

* Adding Two Transforms & Test Cases

Signed-off-by: vnath <[email protected]>

* Formatted the PR

Signed-off-by: vnath <[email protected]>

* opencv changes

Signed-off-by: vnath <[email protected]>

* opencv changes

Signed-off-by: vnath <[email protected]>

* More optional import based changes

Signed-off-by: vnath <[email protected]>

* Removed opencv-python-headles as that does not workout

Signed-off-by: vnath <[email protected]>

* adding sk image back to requirement.txt till we figure out an alternative

Signed-off-by: vnath <[email protected]>

* Replaced MapTransform instead of Transform for SplitLabeld

Signed-off-by: vnath <[email protected]>

* Added skimage and cv2 requirements.txt as tests fail otherwise

Signed-off-by: vnath <[email protected]>

* Added MapTransform Inheritance to AddClickSignalsd

Signed-off-by: vnath <[email protected]>

* Spatial Pad Incorporated to ExtractPatchd

Signed-off-by: vnath <[email protected]>

* Remvoed comments and added doc-strings

Signed-off-by: vnath <[email protected]>

* codeformat

Signed-off-by: vnath <[email protected]>

* Adding NuClick Test to Min tests and removing opencv & scikit from requirements.txt

Signed-off-by: vnath <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed cv2 dependency after modification of FlattenLabeld Transform to use skimage functionality instead

Signed-off-by: vnath <[email protected]>

* Minor addition to doc string

Signed-off-by: vnath <[email protected]>

* update based on comments

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

* adds unit test case

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

* remove unused import

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

* fixes unit test

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

* Adding changes as docs and init arguments, 2 additional test cases

Signed-off-by: vnath <[email protected]>

* Minor changes

Signed-off-by: vnath <[email protected]>

* kwargs added to ExtractPatchd

Signed-off-by: vnath <[email protected]>

* Added a unit test for kwargs of SpatialPad in ExtractPatchd and a doc-string

Signed-off-by: vnath <[email protected]>

Co-authored-by: vnath <[email protected]>
Co-authored-by: Nic Ma <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <[email protected]>
Co-authored-by: Behrooz Hashemian <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
* Update wsi metadata names

Signed-off-by: Behrooz <[email protected]>

* Implement prob map handler

Signed-off-by: Behrooz <[email protected]>
* enhance download

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

* [MONAI] code formatting

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

* fixes #4432

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

Co-authored-by: monai-bot <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
@Nic-Ma Nic-Ma merged commit 5a16ec6 into Nic-Ma:enhance-ensure-tuple Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.