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

Revert #6686 #6736

Merged
merged 4 commits into from
Jul 18, 2023
Merged

Revert #6686 #6736

merged 4 commits into from
Jul 18, 2023

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented Jul 18, 2023

Fixes #6685.

  • Revert Fix the use of allow_smaller in CropForeground #6686 without changing the meaning of allow_smaller in generate_spatial_bounding_box.
  • Update the docstring of the allow_smaller to make it more clear.
  • Add deprecated_arg_default, then after 1.3, CropForeground with pad by default even if the image edges are smaller than the final box edges.

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.

Signed-off-by: KumoLiu <yunl@nvidia.com>
Signed-off-by: KumoLiu <yunl@nvidia.com>
Signed-off-by: KumoLiu <yunl@nvidia.com>
@wyli
Copy link
Member

wyli commented Jul 18, 2023

thanks, please also

  • update
    cropper = CropForegroundD(
    ["pred", "gt"], source_key="src", margin=1, allow_smaller=True, start_coord_key=None, end_coord_key=None
    )
  • review the docstring and add descriptions for the behaviour allow_smaller=False
    allow_smaller: when computing box size with `margin`, whether to allow the image edges to be smaller than the
    final box edges. If `True`, the bounding boxes edges are aligned with the input image edges, default to `True`.

Copy link
Member

@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.

Thanks for the quick updates

Signed-off-by: KumoLiu <yunl@nvidia.com>
@wyli
Copy link
Member

wyli commented Jul 18, 2023

/build

@wyli wyli merged commit 38d73e8 into Project-MONAI:dev Jul 18, 2023
31 of 35 checks passed
@KumoLiu KumoLiu deleted the cropforeground branch July 19, 2023 02:33
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.

cropforeground with margin>0
2 participants