Skip to content

merge master#99

Merged
Nic-Ma merged 236 commits intoNic-Ma:2150-enhance-metrics-reportfrom
Project-MONAI:dev
May 7, 2021
Merged

merge master#99
Nic-Ma merged 236 commits intoNic-Ma:2150-enhance-metrics-reportfrom
Project-MONAI:dev

Conversation

@Nic-Ma
Copy link
Copy Markdown
Owner

@Nic-Ma Nic-Ma commented May 7, 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 --codeformat --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

wyli and others added 30 commits February 24, 2021 15:02
* update openmp flag

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

* improves boundtype docs

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

* update setup.py

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

* input validation 1d

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

* fixes typos

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

* fixes typos

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

* merge upstream changes

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

* tests enums

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

* init. test grid pull

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

* update

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

* test grid_pull

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

* fixes min test

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

* adds device tests

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

* bwd tests

Signed-off-by: Wenqi Li <[email protected]>
move transforms out of compose file. this is backwards compatible.
* pad_collation

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

* increase number of test cases to ensure required testing errors

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

* determinism in setUp

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

* pad collate for list of lists

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

* code format

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

* allow padding options

Signed-off-by: Richard Brown <[email protected]>
decollate batch
enhance random range parameters

If element `i` is iterable, then `uniform[-rotate_range[i][0], rotate_range[i][1])` will be used to generate the rotation parameter for the ith dimension. If not, `uniform[-rotate_range[i], rotate_range[i])` will be used. This can be altered on a per-dimension basis. E.g., `((0,3), 1, ...)`: for dim0, rotation will be in range `[0, 3]`, and for dim1 `[-1, 1]` will be used. Setting a single value will use `[-x, x]` for dim0 and nothing for the remaining dimensions.

Backwards compatibility is ensured because the old behaviour used to do `uniform[-rotate_range[i], rotate_range[i])`, and this PR just adds the possibility to do `uniform[-rotate_range[i][0], rotate_range[i][1])`.
* Fixing issues preventing loss functions from being compatible with Torchscript

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

* Updates

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

* Updates

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

* [MONAI] python code formatting

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

* Updates

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

* Adding conditional skip to Torchscript tests

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

Co-authored-by: monai-bot <[email protected]>
* [DLMED] fix length > 1024 issue in string list all gather

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

* [DLMED] fix flake8 issue

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] add more test

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

Co-authored-by: Yiheng Wang <[email protected]>
* DeleteChannel array, dictionary, tests

Signed-off-by: Leo Tam <[email protected]>

* formatting

Signed-off-by: Leo Tam <[email protected]>

* DeleteChannel array, dictionary, tests

Signed-off-by: Leo Tam <[email protected]>

* Register in transform init

Signed-off-by: Leo Tam <[email protected]>

* clean comment

Signed-off-by: Leo Tam <[email protected]>

* Dict init

Signed-off-by: Leo Tam <[email protected]>

* Register D and Dict

Signed-off-by: Leo Tam <[email protected]>

* Style fix

Signed-off-by: Leo Tam <[email protected]>

* Safety cast

Signed-off-by: Leo Tam <[email protected]>

* Changinging names from DeleteChannel to RemoveRepeatedChannel

Signed-off-by: Leo Tam <[email protected]>

* Lint fixes

Signed-off-by: Leo Tam <[email protected]>

* Test import fix, autofix again

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

Co-authored-by: Eric Kerfoot <[email protected]>
* update distcall

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

* update final closing

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

Co-authored-by: Eric Kerfoot <[email protected]>
* Add ToPIL transformation

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

* Add ToPILd, ToPILD, ToPILDict

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

* Remove has_pil

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

* Include ToPIL, ToPILd, ToPILD, and ToPILDict

Also include ToNumpyD, ToNumpyDict, TorchVisionD, and TorchVisionDict

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

* Fix a typing issue

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

* Fix PIL optional import

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

* Add unittests for ToPIL and ToPILD

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

* Fix formatting

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

* Fix formatting

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

* Add PILImage.Image as the input for ToNumpy and ToTensor

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

* Fix type checking issue for PIL.Image.Image

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

* Change PILImage_fromarray to lower case

Signed-off-by: Behrooz <[email protected]>
add RandomizableTransform
* Add more tests to test_deepgrow_dataset

Signed-off-by: YuanTingHsieh <[email protected]>
* Add inference transforms

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

* Remove unused import

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

* Fix review comments

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

Co-authored-by: SACHIDANAND ALLE <[email protected]>
* [DLMED] add RandAxisFlip transforms

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

* [MONAI] python code formatting

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

* [DLMED] fix flake8 issues

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

Co-authored-by: monai-bot <[email protected]>
fix big endianness problem for dictionary reading. Also allow dictionary image_only
* [DLMED] add AutoAdjustChannel transform

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

* [DLMED] add dict version transform

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

* [MONAI] python code formatting

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

* [DLMED] fix doc-build issue

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

* [DLMED] fix flake8 issue

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

* [DLMED] fix flake8 issue

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

* [DLMED] update according to Wenqi's comments

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

* [DLMED] update doc-strings

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]>
Signed-off-by: Richard Brown <[email protected]>
* Update load pretrain for densenet

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

* Fix isort issue

Signed-off-by: Yiheng Wang <[email protected]>
* [DLMED] add suqeeze to handler

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

* [DLMED] update according to comments

Signed-off-by: Nic Ma <[email protected]>
* fixes #1285

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

* adds test

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

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

* add temp test

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

* adds docstring

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

* fixes dist sampler

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

* remove temp tests

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

* fixes type hint issue

Signed-off-by: Wenqi Li <[email protected]>
* fixes data type in switching

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

* [MONAI] python code formatting

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

Co-authored-by: monai-bot <[email protected]>
* Implement CuImageReader and OpenSlideReader

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

* Add unittests for CuImageReader

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

* Add unittests for OpenSlideReader

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

* Sort imports

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

* Add correct boundaries

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

* Add test cases for reading patches on a grid for CuImage

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

* Add patch whole slide imaging dataset for pathology

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

* Add test case for read patches for OpenSlide

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

* flake8 and few minor changes

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

* black

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

* flake8

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

* Add kwargs to CuImageReader and OpenSlideReader's read method

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

* Change the type hint from np.dtype to DTypeLike

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

* Fix a bug

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

* Implement WSIReader and unittests

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

* Minor updates

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

* Fix few typing issues

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

* Revert datasets

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

* Add shape property to openslide image object
Reverse size to be compatible with output size (hxw)

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

* Add untittest for loading the whole image
Reverse the size accroding to the WSIReader

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

* Update the whole image size

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

* Remove optional size

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

* Remove optional dtype

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

* Remove _get_spatial_shape return type

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

* Reverse the orders of dimensions of `location`
to be compatible with image shape

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

* Change test cases to use smaller image and revese location's dimensions

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

* Replace the test TIFF and some upgrades

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

* Update dependencies for OpenSlide

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

* Update unittests for OpenSlide and CuImage

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

* Fix openslide dependency

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

* Fix doc dependencies

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

* Minor changes

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

* Few variable name changes

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

* Add EnsureChannelFirst

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

* Add metadata to WSIReader

Signed-off-by: Behrooz <[email protected]>
wyli and others added 29 commits April 25, 2021 17:54
* enhance persistent temp

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

* fixes windows file rename issue

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

* enhance multiprocess LMDB

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

* remove usued vars

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

* fixes LGTM errors

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

* remove comparison-with-callable (W0143)

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

* fixes pylint W0231

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

* fixes PYL-R1705

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

* fixes PYL-R1720

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

* fixes PTC-W0060

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

* fixes PYL-W0105

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

* fixes PTC-W0016

Signed-off-by: Wenqi Li <[email protected]>
* update box_start/end for deepgrow

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

* add test

Signed-off-by: Richard Brown <[email protected]>
* [DLMED] add logging

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

* [DLMED] update according to comments

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

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

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

* fixes test

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

Co-authored-by: Wenqi Li <[email protected]>
* adding error messaging for unsupported tensor shapes

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

* [MONAI] python code formatting

Signed-off-by: monai-bot <[email protected]>
* [DLMED] Enhance unit test and doc-string

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

* [MONAI] python code formatting

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

* [DLMED] enhance unit test

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

* [DLMED] fix CI test issue

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

Co-authored-by: monai-bot <[email protected]>
* [DLMED] fix shallow copy issue

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

* [DLMED] add patch_index to RandWeightedCrop

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

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

* update index

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

* relative links

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

Co-authored-by: Eric Kerfoot <[email protected]>
* Added RicianNoise transform

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

* Use ensure_tuple_rep in channel-wise RandRicianNoise transform

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

* Added RandRicianNoised transform

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

* Autofixed coding style errors

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

* Added paper reference for RandRicianNoise in docstring

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

* Added unit test for RandRicianNoise transform

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

* Added unit test for RandRicianNoised transform

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

* Fixed mypy typing issues

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

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

* update based on comments

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

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

* temp tests

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

* temp tests

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

* torch

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

* Revert "temp tests"

This reverts commit 6a2e7a2.

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

* Revert "temp tests"

This reverts commit 9fc84df.

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

Co-authored-by: Eric Kerfoot <[email protected]>
* create meta data key if necessary

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

* add orientationd too

Signed-off-by: Richard Brown <[email protected]>
* update build option

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

* temp test

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

* Revert "temp test"

This reverts commit f22cdeb.

Signed-off-by: Wenqi Li <[email protected]>
* fixes subprocess transforms

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

* update based on comments

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

* add SelectItemsd alias

Signed-off-by: Wenqi Li <[email protected]>
* Temporarily changing crf test to allow some errors

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

* changing to unittest assert

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

Co-authored-by: Wenqi Li <[email protected]>
* Implement ToCupy

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

* Add unittests for ToCupy and ToCupyd

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

* Add docs

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

* Reformat

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

* Add CuPy to NumPy

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

* Add unittests for ToNumpy and ToNumpyd for CuPy input

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

* Add has_cp

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

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

* convert numpy array to list

Signed-off-by: Richard Brown <[email protected]>
* skip most recent pytype

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

* avoid pytype 2021.05.04

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

* pytype<2021

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

* old attrs

Signed-off-by: Richard Brown <[email protected]>
* skip RandAffine if possible

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

* add randaffined

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

* mypy fix

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

* check consistency

Signed-off-by: Richard Brown <[email protected]>
* [DLMED] use shutil.move instead

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]>
@Nic-Ma Nic-Ma merged commit cf8abee into Nic-Ma:2150-enhance-metrics-report May 7, 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.