Skip to content

merge master #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 89 commits into from
Sep 8, 2021
Merged

merge master #214

merged 89 commits into from
Sep 8, 2021

Conversation

Nic-Ma
Copy link
Owner

@Nic-Ma Nic-Ma commented Sep 8, 2021

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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

wyli and others added 30 commits July 23, 2021 09:52
* [DLMED] enhance TTA

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

* [DLMED] fix typo

Signed-off-by: Nic Ma <[email protected]>
* [DLMED] enhance doc-string for spatial shape

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

* [DLMED] add ill test case

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

* [DLMED] update test error

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

* update docstring and add more test cases

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

* [DLMED] add link to doc-string

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

* [DLMED] enhance doc-string

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

Co-authored-by: Yiheng Wang <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
* [DLMED] enhance doc-string

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

* [DLMED] enhance the sanity check

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

* [DLMED] update according to comments

Signed-off-by: Nic Ma <[email protected]>
* [DLMED] add RandCoarseDropout

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

* [DLMED] fix typo

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

* [DLMED] add dict version transform

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

* [DLMED] updated according to comments

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

Co-authored-by: Wenqi Li <[email protected]>
* [DLMED] init the transform

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

* [DLMED] update doc-string

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

* [DLMED] complete array transform

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

* [DLMED] add unit tests

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

* [DLMED] add dict transform and inverse tests

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

* [DLMED] fix mypy type

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

* [DLMED] change to enhance Resize transform

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

* [DLMED] fix CI tests

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

* [DLMED] update according to comments

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

* [DLMED] fix TTA

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

* [DLMED] remove tests

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

* [DLMED] fix mypy error

Signed-off-by: Nic Ma <[email protected]>
* added stain norm and tests

Signed-off-by: Neha Srivathsa <[email protected]>

* import changes

Signed-off-by: Neha Srivathsa <[email protected]>

* changed stain extraction tests

Signed-off-by: Neha Srivathsa <[email protected]>

* edited stain norm tests

Signed-off-by: Neha Srivathsa <[email protected]>

* convert floats to float32

Signed-off-by: Neha Srivathsa <[email protected]>

* added uint8 assumption to docstring

Signed-off-by: Neha Srivathsa <[email protected]>

* add error case

Signed-off-by: Neha Srivathsa <[email protected]>

* formatting change

Signed-off-by: Neha Srivathsa <[email protected]>

* modify tests wrt cupy import

Signed-off-by: Neha Srivathsa <[email protected]>

* minor change to pass lint test

Signed-off-by: Neha Srivathsa <[email protected]>

* import changes

Signed-off-by: Neha Srivathsa <[email protected]>

* refactored classes

Signed-off-by: Neha Srivathsa <[email protected]>

* Restructure and rename transforms

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

* added dict transform

Signed-off-by: Neha Srivathsa <[email protected]>

* Move stain_extractor to init

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

* Exclude pathology transform tests from mini tests

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

* Fix type checking for cupy ndarray

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

* Include pathology transform tests

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

* Update to cupy 9.0.0

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

* Remove exact version for cupy

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

* add to docs

Signed-off-by: Neha Srivathsa <[email protected]>

* Organize into stain dir

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

* Add/update init files

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

* Transit all from cupy to numpy

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

* Update imports

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

* Update test cases for numpy

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

* Rename to NormalizeHEStains and NormalizeHEStainsD

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

* Add dictionary variant names

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

* Fix typing and formatting

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

* Fix docs

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

* Update test cases

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

* Fix clip max

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

* Fix var typing

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

* Fix a typing issue

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

* Update default values, and change D to d

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

* Update docs

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

* Add image value check

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

* Add test cases for negative and invalid values

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

Co-authored-by: Neha Srivathsa <[email protected]>
Co-authored-by: nsrivathsa <[email protected]>
* Add DatasetCalculator

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

* update docstring

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

* use multiprocessing

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

* update to use dataset and other places

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

* update to support array return

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

* update with new testcases and change name

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

* update min test

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

* update unittest

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

* fix vstack error

Signed-off-by: Yiheng Wang <[email protected]>
…m part of dataset (#2667)

* [DLMED] add RandCompose

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

* [DLMED] add unit tests

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

* [DLMED] change to enhance RandLambda

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

* [DLMED] remove RandCompose

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

* [DLMED] fix format

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

* [DLMED] enhance doc

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

* [DLMED] add inverse operation

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

* [DLMED] add more tests

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

* [DLMED] fix subprogress issue

Signed-off-by: Nic Ma <[email protected]>
* Restructure transforms into a directory

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

* Fix a typo

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

Co-authored-by: Behrooz <[email protected]>
* Moved fourier functions to their own class. Modified RandKSpaceSpikeNoised.

1. Allow RandKSpaceSpikeNoised to work with arbitrary keys.
2. Introduced Fourier transform to keep the forward/backward fourier mappings.

Signed-off-by: Yaniel Cabrera <[email protected]>

* removed old code

Signed-off-by: Yaniel Cabrera <[email protected]>

* Ignore torch.fft tests if not present

Ignore tests with versions of Pytorch which lack the module fft.

Signed-off-by: Yaniel Cabrera <[email protected]>

* update

Signed-off-by: Yaniel Cabrera <[email protected]>

* typing update

Signed-off-by: Yaniel Cabrera <[email protected]>

* added unit test for Fourier

Signed-off-by: Yaniel Cabrera <[email protected]>

* added unit test for Fourier

Signed-off-by: Yaniel Cabrera <[email protected]>

* fixing black

Signed-off-by: Yaniel Cabrera <[email protected]>
This is to address an issue in the bibtex conversion.

Signed-off-by: Tom Vercauteren <[email protected]>
… meta data (#2685)

* [DLMED] add IntensityStats transform

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

* [DLMED] add unit tests

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

* [DLMED] add dict version transform

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

* [DLMED] enhance ShiftIntensity transform

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

* [DLMED] fix typo

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

* [DLMED] change to utility

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

* [DLMED] adjust to look_up_option

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

* [DLMED] add multi-processing test

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

* [DLMED] add mask option

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

* [DLMED] fix flake8

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

* [DLMED] fix typo

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

* [DLMED] fix pickle issue

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

* [DLMED] enhance error message

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

* [DLMED] add pickle test

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

* [MONAI] python code formatting

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

* [DLMED] enhance pickle test

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

Co-authored-by: monai-bot <[email protected]>
* [DLMED] update doc-strings of Affine transforms

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

* [DLMED] fix format issue

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

* [DLMED] update according to comments

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

* [DLMED] remove coord link

Signed-off-by: Nic Ma <[email protected]>
* 2d/3d patchembedding

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

* minor updates for selfattention

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

* 2d vit

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

* fixes type hint

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

* update unetr

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

* fixes unit test

Signed-off-by: Wenqi Li <[email protected]>
* Add transform to fill holes and to filter (#2678)

Signed-off-by: Sebastian Penhouet <[email protected]>

* Change name of label filter class (#2678)

Signed-off-by: Sebastian Penhouet <[email protected]>

* Change fill holes to growing logic (#2678)

Signed-off-by: Sebastian Penhouet <[email protected]>

* Fix missing entry in min_tests (#2678)

Signed-off-by: Sebastian Penhouet <[email protected]>

* Fix review comments (#2678)

Signed-off-by: Sebastian Penhouet <[email protected]>

* Remove batch dim and add one-hot handling (#2678)

Signed-off-by: Sebastian Penhouet <[email protected]>

* [MONAI] python code formatting

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

Co-authored-by: Sebastian Penhouet <[email protected]>
* Remove unnecessary use of comprehension

* Remove unnecessary comprehension (#2718)

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

* Refactor unnecessary `else` / `elif` when `if` block has a `return` statement (#2717)

* Refactor unnecessary `else` / `elif` when `if` block has a `return` statement

* Unnecessary `else`/`elif` used after `raise` PYL-R1720

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

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

* Replace ternary syntax with if expression (#2716)

* Replace ternary syntax with if expression

* fixes Duplicate dictionary keys PYL-W0109

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

* remove Unused variable data_

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

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

* [MONAI] python code formatting

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

* fixes scaler type

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

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: monai-bot <[email protected]>
* Update Mish to default PyTorch 1.9 version
* [DLMED] add Histogram normalize

Signed-off-by: Nic Ma <[email protected]>
* Added OneOf class

Signed-off-by: Lyndon Boone <[email protected]>

* Clean up OneOf constructor

Signed-off-by: Lyndon Boone <[email protected]>

* add flatten, len and unit test

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

* Added unit tests and inverse method

Signed-off-by: Lyndon Boone <[email protected]>

* rename test

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

* flatten tests

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

* add inverse

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

Co-authored-by: Richard Brown <[email protected]>
* no extension check for user specified reader; allow Path object
* [DLMED] add round_values

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

* [DLMED] update according to comments

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

* [DLMED] update according to comments

Signed-off-by: Nic Ma <[email protected]>
* [DLMED] fix continuously run

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

* [MONAI] python code formatting

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

* [DLMED] remove out-date comment

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

Co-authored-by: monai-bot <[email protected]>
rijobro and others added 29 commits August 25, 2021 00:22
* all close

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

* assert_allclose

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

* ScaleIntensity

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

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

* code format

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

* code format2

Signed-off-by: Richard Brown <[email protected]>
* [DLMED] support random fill

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

* [DLMED] update for test

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

* [DLMED] fix typo

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

* [DLMED] update dict transform

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

* [DLMED] fix mypy

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

* [DLMED] fix typo

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

* [DLMED] fix typo

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

* [DLMED] fix typo

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

* [DLMED] fix typo

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

* [DLMED] support auto computing min and max

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

* [MONAI] python code formatting

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

Co-authored-by: monai-bot <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
* enhance swish

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

* add inplace to swish

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

* add efn features

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

* add more pretrained weights url

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

* fix flake8 errors

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

* use look up option

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

* fix deepsource issues

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

* fix type issues

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

Co-authored-by: Wenqi Li <[email protected]>
* resume github premerge tests

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

* fixes #2821

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

* update group names

Signed-off-by: Wenqi Li <[email protected]>
* add pre-commit

Signed-off-by: Jirka <[email protected]>
* Local Patch Shuffle Transform Initial Version Added

Signed-off-by: vnath <[email protected]>
* [DLMED] add support to fill outside

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

* [DLMED] add paper link for cutout

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

Co-authored-by: Wenqi Li <[email protected]>
* Add deepedit transforms

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

* Run unittests - autofix

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

* Update transform

Signed-off-by: Andres <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
…il, ToTensor, Transpose (#2850)

* backends -> backend

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

* code format

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

* code format2

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

* AddChannel, AsChannelFirst, AsChannelLast, EnsureChannelFirst, Identity, RepeatChannel

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

* moveaxis backwards compatible

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

* code format

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

* EnsureType, RemoveRepeatedChannel, SplitChannel, ToCupy, ToNumpy, ToPil, ToTensor, Transpose

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

* trigger ci/cd

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

* permute requires positive indices

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

* correct permute

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

* correct permute

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

* has_pil

Signed-off-by: Richard Brown <[email protected]>
* add classification support for ViT Model

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

* add classification support for ViT Model

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

* add classification support for ViT Model

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

* [MONAI] python code formatting

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

Co-authored-by: monai-bot <[email protected]>
* [DLMED] add args to ThreadDataLoader

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

* [DLMED] fix flake8

Signed-off-by: Nic Ma <[email protected]>
…_at_least (#2859)

* DataStats, LabelToMask, Lambda, RandLambda, SqueezeDim, is_module_ver_at_least

Signed-off-by: Richard Brown <[email protected]>
* update cron tests

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

* temp tests

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

* update gpu info

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

* tmp tests

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

* temp test

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

* Revert "temp test"

This reverts commit 3a5b8f8.

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

* Revert "tmp tests"

This reverts commit e960dac.

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

* Revert "temp tests"

This reverts commit 911c332.

Signed-off-by: Wenqi Li <[email protected]>
* fixes #2639

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

* fixes typo

Signed-off-by: Wenqi Li <[email protected]>
* split CI package

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

* tmpdir

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

* tmpdir

Signed-off-by: Jirka <[email protected]>
* Implement SplitOnGrid

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

* Implement dictionary-based SplitOnGrid

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

* Update inits

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

* Update docs

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

* Change imports

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

* Update input logic in SplitOnGrid)

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

* Add unittests for SplitOnGrid and SplitOnGridDict

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

* Sort import

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

* Remove imports

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

* Address comments

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

* Remove optional

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

* Address thread safety issues

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

* [DLMED] fix type issue

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

* [DLMED] fix test

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

* [DLMED] simplify the change

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

* [DLMED] fix flake8

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

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

* back compatibility

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

* Update special method replacement
@Nic-Ma Nic-Ma merged commit f398298 into Nic-Ma:main Sep 8, 2021
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.