-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
allow bbox in occ sens constructor #5169
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Richard Brown <[email protected]>
@@ -298,6 +306,7 @@ def __call__(self, x: torch.Tensor, b_box: Optional[Sequence] = None) -> Tuple[t | |||
* The most probable class when the corresponding part of the image is occluded (``argmax(dim=-1)``). | |||
Both images will be cropped if a bounding box used, but voxel sizes will always match the input. | |||
""" | |||
bbox = bbox if bbox is not None else self.bbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the method is currently using b_box
bbox = bbox if bbox is not None else self.bbox | |
bbox = b_box if b_box is not None else self.bbox |
@@ -182,6 +189,7 @@ def __init__( | |||
self.stride = stride | |||
self.per_channel = per_channel | |||
self.verbose = verbose | |||
self.bbox = bbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the doc-string and code in consistent: "bbox" vs "b_box".
I would suggest b_box
as the existing arg is b_box
.
Thanks.
Description
If bounding box is always the same, it makes sense to give the user the option to set it in the constructor.
If bbox given in
__call__
method use that. Else use bbox given in constructor. Else useNone
.Types of changes