Skip to content

Commit

Permalink
fix img_shape (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyanyi authored Feb 6, 2023
1 parent bff5160 commit 4922856
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmrotate/datasets/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def _transform_bboxes(self, results: dict) -> None:

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

0 comments on commit 4922856

Please sign in to comment.