Skip to content

Commit 4922856

Browse files
authored
fix img_shape (#719)
1 parent bff5160 commit 4922856

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mmrotate/datasets/transforms/transforms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ def _transform_bboxes(self, results: dict) -> None:
151151

152152
def _filter_invalid(self, results: dict) -> None:
153153
"""Filter invalid data w.r.t `gt_bboxes`"""
154-
height, width = results['img_shape']
154+
# results['img_shape'] maybe (h,w,c) or (h,w)
155+
height, width = results['img_shape'][:2]
155156
if 'gt_bboxes' in results:
156157
if len(results['gt_bboxes']) == 0:
157158
return

0 commit comments

Comments
 (0)