vision
vision copied to clipboard
references/segmentation/coco_utils might require merging rles?
https://github.com/pytorch/vision/blob/6d7851bd5e2bedc294e40e90532f0e375fcfee04/references/segmentation/coco_utils.py#L27-L41 Above seems to assume that objects are not occluded, not merging rles from frPyObjects. In such case, i think it must be changed to
rles = coco_mask.frPyObjects(polygons, height, width)
rle = coco_mask.merge(rles)
mask = coco_mask.decode(rle)
Is there any specific reason for this, or am I wrong?
Hi @crazyboy9103 , thanks for the report. I'm not so familiar with that part of the code-base so I could be way off, but I suspect the logic you're looking for is implemented later in https://github.com/pytorch/vision/blob/6d7851bd5e2bedc294e40e90532f0e375fcfee04/references/segmentation/coco_utils.py#L50-L56 ?