Skip to content

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.

KumoLiu added 2 commits July 18, 2023 17:22
Signed-off-by: KumoLiu <yunl@nvidia.com>
Signed-off-by: KumoLiu <yunl@nvidia.com>
@KumoLiu KumoLiu requested review from Nic-Ma, ericspod, myron and wyli July 18, 2023 09:32
Signed-off-by: KumoLiu <yunl@nvidia.com>
@wyli
Copy link
Contributor

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

Thanks for the quick updates

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

wyli commented Jul 18, 2023

/build

@wyli wyli merged commit 38d73e8 into Project-MONAI:dev Jul 18, 2023
@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