Skip to content

Commit

Permalink
Fixed mask shape after Albu postprocess (#11280)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilcopione authored Dec 27, 2023
1 parent e5f9f35 commit b98f372
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mmdet/datasets/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,10 @@ def _postprocess_results(
results['masks'] = np.array(
[results['masks'][i] for i in results['idx_mapper']])
results['masks'] = ori_masks.__class__(
results['masks'], ori_masks.height, ori_masks.width)

results['masks'],
results['masks'][0].shape[0],
results['masks'][0].shape[1],
)
if (not len(results['idx_mapper'])
and self.skip_img_without_anno):
return None
Expand Down

0 comments on commit b98f372

Please sign in to comment.