facebookresearch / Mask2Former

Code release for "Masked-attention Mask Transformer for Universal Image Segmentation"
MIT License
2.52k stars 384 forks source link

Facing issue in category id in panoptic output #97

Open arvindksh81 opened 2 years ago

arvindksh81 commented 2 years ago

First of all, thanks for your excellent work.

My Issue:

I am trying to use panoptic segmentation output and filter object categories in the output. But I am observing 'category_id' values which are not present in https://github.com/cocodataset/panopticapi/blob/master/panoptic_coco_categories.json

For example, please refer below panoptic info list output by the model for one example image. It contains 'category_id': 0 which are not present in panoptic_coco_categories.json above so how should I filter objects based on category_id ? Please let me know if I am missing anything. NOTE - 'category_id': 0 refers to 'person' category which is 'category_id': 1 in panoptic_coco_categories.json.

[{'id': 1, 'isthing': True, 'category_id': 0}, {'id': 2, 'isthing': False, 'category_id': 119}, {'id': 3, 'isthing': False, 'category_id': 103}, {'id': 4, 'isthing': True, 'category_id': 0}]

bowenc0221 commented 2 years ago

The category ids are being mapped to a continuous id but the order is preserved.