Skip to content

Commit

Permalink
valid_inds 0d issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
unique-chan committed Feb 5, 2025
1 parent 363f4f9 commit c7adc52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmrotate/datasets/pipelines/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ def _crop_data(self, results, crop_size, allow_negative_crop):
if (key == 'gt_bboxes' and not valid_inds.any()
and not allow_negative_crop):
return None

valid_inds = np.atleast_1d(valid_inds)
results[key] = bboxes[valid_inds, :]
# label fields. e.g. gt_labels and gt_labels_ignore
label_key = self.bbox2label.get(key)
Expand Down

0 comments on commit c7adc52

Please sign in to comment.