Skip to content
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

merge master #324

Merged
merged 258 commits into from
Dec 16, 2021
Merged

merge master #324

merged 258 commits into from
Dec 16, 2021

Conversation

Nic-Ma
Copy link
Owner

@Nic-Ma Nic-Ma commented Dec 16, 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 September 13, 2021 14:37
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
* con1_padding -> conv1_padding

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* simpler init.

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes 2715

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* adds 3d tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes flake8 error

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* ThresholdIntensity, ThresholdIntensityd

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
* Add dropout arg in DynUNet init

Signed-off-by: Andres <diazandr3s@gmail.com>
* [DLMED] add device option

Signed-off-by: Nic Ma <nma@nvidia.com>

* look up options for types

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* adds unit tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

Co-authored-by: Wenqi Li <wenqil@nvidia.com>
…iles, ScaleIntensityRangePercentilesd (#2943)

ScaleIntensityRange, ScaleIntensityRanged, ScaleIntensityRangePercentiles, ScaleIntensityRangePercentilesd
Rotate, Rotated, RandRotate, RandRotated
…ndAffined, Rand2dElastic, Rand3dElastic, Rand2dElasticd, Rand3dElasticd (#2922)

* AffineGrid, RandAffineGrid, Resample

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* Affine, RandAffine, Affined, RandAffined

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* deprecate as_tensor_output

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* fixes

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* remove plotting

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* Rand2dElastic, Rand3dElastic, Rand2dElasticd, Rand3dElasticd

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* CropForeground

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>

* fix Invertd

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
* transforms convert to the necessary type

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
* Add dtype to ToCuPy

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Add unittests to include dtype

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Implement convert_to_cupy

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Addressed all comments

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Addressed all comments

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Add dtype for Sequence

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] remove unnecessary arg

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix style issue

Signed-off-by: Nic Ma <nma@nvidia.com>
* [DLMED] enhance type conversion

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix CI test

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] add more unit tests

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix flake8

Signed-off-by: Nic Ma <nma@nvidia.com>
* fixes tutorial 353

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* adding type tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* improves type checks

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes flake8

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes as channel first

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* type test option

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* ndarray suuport

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes unit tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

 update

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* bash option for windows test

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes unit tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* enhance norm intensity tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes merge tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
* add multimodal transformers

Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
…op_centers`, `generate_pos_neg_label_crop_centers`, `generate_label_classes_crop_centers` (#2958)

torch map_binary_to_indices, map_classes_to_indices, correct_crop_centers, generate_pos_neg_label_crop_centers, generate_label_classes_crop_centers
* Implement CuCIM wrapper transfrom

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
* Update with cupy.ndarray

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Change to use has_cp

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Change the format

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Fix a bug

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
* Fix for Jupyter plotting

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>

* Fix for Jupyter plotting

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>

* Fix for Jupyter plotting

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
* fixes tutorial issue 352

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* simplified

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* [DLMED] enhance tensor transforms

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix tests

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix mypy

Signed-off-by: Nic Ma <nma@nvidia.com>
…abelClasses`, `RandCropByLabelClassesd` (#2967)

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
* enhance affinegrid to use torch backend

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* style fixes

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* codeformat fixes

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* backend affien grid

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* device support

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* less lookup

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* create grid with torch backend

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes tests

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* default to torch create grid

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes unit test

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* randaffine with create grid

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* create_grid backend change for spatial transforms

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* create control grid tensor

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* enhance spatial, and crop xforms

  - Update test_rand_deform_grid.py
  - center_scale_crop
  - center_spatial_crop
  - rand_scale_crop
  - rand_spatial_crop
  - rand_spatial_crop_samples

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* fixes invert

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* tensor resize, unit test fixes

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
* update multimodal doc and model names (Transchex)

Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
* remove deprecated

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* min-test list

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* preserves tests from tests/test_handler_transform_inverter.py

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* enhance nightly test

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* print after the test for information

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Nic-Ma and others added 29 commits November 30, 2021 09:15
Signed-off-by: Nic Ma <nma@nvidia.com>
* [DLMED] enhance not-nan reduction

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>
…ks (#3419)

* Update segresnet_block.py

making the activation function a parameter to the class of the ResBlock

* Update segresnet.py

* passing activation to the residual blocks

* little change

* signed

Signed-off-by: Patricio Astudillo <patricio.astudillo@robovision.ai>

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

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

* update

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* [DLMED] add args and update default (#3418)

Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* update docstrings

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

Co-authored-by: Patricio Astudillo <patricio.astudillo@robovision.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Nic Ma <nma@nvidia.com>
* update vitautoenc

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* update based on the comments; compatibility with the previous model weights

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* Update WSIReader level/location/size calculation

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Update location downsampling

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Update tests and add a new test case

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Update few names and logics

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Fix the dependency issue

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Check for imagecodecs + tifffile

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Remove new test case that uses too much memory

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Add new case and ignore level=0 for TiffFile

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Address comments

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

Co-authored-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* Update TiffFile backend to read only the entire image

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
* [DLMED] extract write logic

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>
* [DLMED] add dataframe

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] enhance CSV iterable dataset

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] add unit tests

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix typehints

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] add comment

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix file close issue

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix doc

Signed-off-by: Nic Ma <nma@nvidia.com>

* [MONAI] python code formatting

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
* [DLMED] add BaseWorkflow

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix typo

Signed-off-by: Nic Ma <nma@nvidia.com>

* [MONAI] python code formatting

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

* [DLMED] add *args, **kwargs

Signed-off-by: Nic Ma <nma@nvidia.com>

Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
* [DLMED] fix deprecated arg

Signed-off-by: Nic Ma <nma@nvidia.com>

* [MONAI] python code formatting

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
* enhance dynunet

Signed-off-by: Yiheng Wang <vennw@nvidia.com>

* fix black issue

Signed-off-by: Yiheng Wang <vennw@nvidia.com>

* use strict=False

Signed-off-by: Yiheng Wang <vennw@nvidia.com>

* fix black 21.12 error

Signed-off-by: Yiheng Wang <vennw@nvidia.com>

* enhance code and update docstring

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
* fixes deprecated args

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* update based on comments

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
improve error message if reader nott available
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* [DLMED] add dataset generator

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] add DatasetGenerator

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [MONAI] python code formatting

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

* [DLMED] fix wrong test

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] simplify according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] remove return

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update rtol for CI

Signed-off-by: Nic Ma <nma@nvidia.com>

Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
* [DLMED] add missing docs

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] add missing components

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix test

Signed-off-by: Nic Ma <nma@nvidia.com>
* [DLMED] add channel-wise

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix typo

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] skip test if before 1.7

Signed-off-by: Nic Ma <nma@nvidia.com>

* [MONAI] python code formatting

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
* [DLMED] add Iteration base class

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
* [DLMED] support string dtype

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix typo

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] enhance dtype in ToCupy

Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
* Update to not include number for the name of the first range

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Update CuCIM and TorchVision wrappers to include name

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Update nvtx range to append undelying class for wrapper tranforms

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Add new test cases to cover changes

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

* Update cucim and torchvision check

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
* [DLMED] add missing images

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix 3471

Signed-off-by: Nic Ma <nma@nvidia.com>

* [DLMED] fix AsDiscrete

Signed-off-by: Nic Ma <nma@nvidia.com>
* make bending energy loss invariant to resolution

fixes #3485

Signed-off-by: Ebrahim Ebrahim <ebrahim.ebrahim@kitware.com>

* set BendingEnergyLoss default normalize to False

Maybe it's more important that the default behavior match usage of the
term "bending energy" elsewhere, rather than that it be the most
convenient behavior.

Signed-off-by: Ebrahim Ebrahim <ebrahim.ebrahim@kitware.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@Nic-Ma Nic-Ma merged commit dffc659 into Nic-Ma:3498-add-kwargs Dec 16, 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.