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

Update documentation in iou3d_calculator.py #2678

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions mmdet3d/structures/ops/iou3d_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def __call__(self, bboxes1, bboxes2, mode='iou', is_aligned=False):

Return:
torch.Tensor: If ``is_aligned`` is ``True``, return ious between
bboxes1 and bboxes2 with shape (M, N). If ``is_aligned`` is
``False``, return shape is M.
bboxes1 and bboxes2 with shape (M, N, 1). If ``is_aligned`` is
``False``, return shape is (M, 1).
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that the comment is correct.

"""
return bbox_overlaps_nearest_3d(bboxes1, bboxes2, mode, is_aligned,
self.coordinate)
Expand Down Expand Up @@ -85,7 +85,7 @@ def __call__(self, bboxes1, bboxes2, mode='iou'):

Return:
torch.Tensor: Bbox overlaps results of bboxes1 and bboxes2
with shape (M, N) (aligned mode is not supported currently).
with shape (M, N, 1) (aligned mode is not supported currently).
"""
return bbox_overlaps_3d(bboxes1, bboxes2, mode, self.coordinate)

Expand Down Expand Up @@ -124,8 +124,8 @@ def bbox_overlaps_nearest_3d(bboxes1,

Return:
torch.Tensor: If ``is_aligned`` is ``True``, return ious between
bboxes1 and bboxes2 with shape (M, N). If ``is_aligned`` is
``False``, return shape is M.
bboxes1 and bboxes2 with shape (M, N, 1). If ``is_aligned`` is
``False``, return shape is (M, 1).
"""
assert bboxes1.size(-1) == bboxes2.size(-1) >= 7

Expand Down Expand Up @@ -164,7 +164,7 @@ def bbox_overlaps_3d(bboxes1, bboxes2, mode='iou', coordinate='camera'):

Return:
torch.Tensor: Bbox overlaps results of bboxes1 and bboxes2
with shape (M, N) (aligned mode is not supported currently).
with shape (M, N, 1) (aligned mode is not supported currently).
"""
assert bboxes1.size(-1) == bboxes2.size(-1) >= 7

Expand Down Expand Up @@ -195,7 +195,7 @@ def __call__(self, bboxes1, bboxes2, mode='iou', is_aligned=False):
is_aligned (bool, optional): If True, then m and n must be equal.
Defaults to False.
Returns:
Tensor: shape (m, n) if ``is_aligned`` is False else shape (m,)
Tensor: shape (m, n, 1) if ``is_aligned`` is False else shape (m, 1)
"""
assert bboxes1.size(-1) == bboxes2.size(-1) == 6
return axis_aligned_bbox_overlaps_3d(bboxes1, bboxes2, mode,
Expand Down Expand Up @@ -232,7 +232,7 @@ def axis_aligned_bbox_overlaps_3d(bboxes1,
stability. Defaults to 1e-6.

Returns:
Tensor: shape (m, n) if ``is_aligned`` is False else shape (m,)
Tensor: shape (m, n, 1) if ``is_aligned`` is False else shape (m, 1)

Example:
>>> bboxes1 = torch.FloatTensor([
Expand Down
Loading