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

Added RandSimulateLowResolution(d) array and dictionary transforms and corresponding unit tests #6806

Merged

Conversation

aaronkujawa
Copy link
Contributor

@aaronkujawa aaronkujawa commented Jul 31, 2023

Fixes #3781.

Description

Random simulation of low resolution corresponding to nnU-Net's (https://github.com/MIC-DKFZ/batchgenerators/blob/7651ece69faf55263dd582a9f5cbd149ed9c3ad0/batchgenerators/transforms/resample_transforms.py#L23).
First, the array/tensor is resampled at lower resolution as determined by the zoom_factor which is uniformly sampled from the zoom_range. Then, the array/tensor is resampled at the original resolution. MONAI's Resize transform is used for the resampling operations.

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.

aaronkujawa and others added 8 commits July 31, 2023 12:05
I, Aaron Kujawa <[email protected]>, hereby add my Signed-off-by to this commit: 774b6f1
I, Aaron Kujawa <[email protected]>, hereby add my Signed-off-by to this commit: 9618f35
I, Aaron Kujawa <[email protected]>, hereby add my Signed-off-by to this commit: 6227edf
I, Aaron Kujawa <[email protected]>, hereby add my Signed-off-by to this commit: 5500220
I, Aaron Kujawa <[email protected]>, hereby add my Signed-off-by to this commit: 146b1f2

Signed-off-by: Aaron Kujawa <[email protected]>
@aaronkujawa aaronkujawa force-pushed the 3781-downsampling-augmentation-transform branch from c614d30 to 4330001 Compare July 31, 2023 14:05
Signed-off-by: Aaron Kujawa <[email protected]>
@aaronkujawa aaronkujawa marked this pull request as ready for review July 31, 2023 20:12
@wyli
Copy link
Contributor

wyli commented Jul 31, 2023

/build

@wyli wyli requested review from ericspod, Nic-Ma and KumoLiu July 31, 2023 21:38
Copy link
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks good to me, thanks!

Copy link
Contributor

@KumoLiu KumoLiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

monai/transforms/spatial/array.py Outdated Show resolved Hide resolved
monai/transforms/spatial/dictionary.py Outdated Show resolved Hide resolved
wyli and others added 2 commits August 1, 2023 07:20
@wyli
Copy link
Contributor

wyli commented Aug 1, 2023

/build

@wyli wyli enabled auto-merge (squash) August 1, 2023 06:20
@wyli wyli disabled auto-merge August 1, 2023 07:00
@wyli wyli enabled auto-merge (squash) August 1, 2023 07:00
@wyli wyli merged commit d6bafc9 into Project-MONAI:dev Aug 1, 2023
25 of 30 checks passed
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.

Downsampling Augmentation Transform
3 participants