Skip to content

Commit

Permalink
Fix bug when training images without gt (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
zytx121 authored Mar 27, 2023
1 parent 45f2036 commit 17f8abc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmrotate/structures/bbox/bbox_overlaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def fake_rbbox_overlaps(bboxes1: RotatedBoxes,
assert rows == cols

if rows * cols == 0:
return bboxes1.new(rows, 1) if is_aligned else bboxes1.new(rows, cols)
return bboxes1.tensor.new(
rows, 1) if is_aligned else bboxes1.tensor.new(rows, cols)

# convert rbb to minimum circumscribed hbb in <cx, cy, w, h, t> format.
fake_rbboxes1 = bboxes1.convert_to('hbox').convert_to('rbox')
Expand Down

0 comments on commit 17f8abc

Please sign in to comment.