Skip to content

Commit

Permalink
[Fix] type of "counts" in COCO’s compressed RLE (#9274)
Browse files Browse the repository at this point in the history
* [Fix]: fix wrong padding value in cached MixUp (#9259)

* [Fix] type of "counts" in COCO’s compressed RLE 

counts in COCO’s compressed RLE format have type 'str' or 'list'

Co-authored-by: plutoyuxie <34409171+plutoyuxie@users.noreply.github.com>
  • Loading branch information
Daa98 and plutoyuxie committed Nov 15, 2022
1 parent 22fb94e commit fdf9ee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmdet/datasets/transforms/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def _process_masks(self, results: dict) -> list:
elif isinstance(gt_mask, dict) and \
not (gt_mask.get('counts') is not None and
gt_mask.get('size') is not None and
isinstance(gt_mask['counts'], list)):
isinstance(gt_mask['counts'], (list, str))):
# if gt_mask is a dict, it should include `counts` and `size`,
# so that `BitmapMasks` can uncompressed RLE
instance['ignore_flag'] = 1
Expand Down

0 comments on commit fdf9ee2

Please sign in to comment.