def get_cat_ids(self, idx):
    'Get COCO category ids by index.\n        Args:\n            idx (int): Index of data.\n        Returns:\n            list[int]: All categories in the image of specified index.\n        '
    img_id = self.data_infos[idx]['id']
    ann_ids = self.coco.get_ann_ids(img_ids=[img_id])
    ann_info = self.coco.load_anns(ann_ids)
    return [ann['category_id'] for ann in ann_info]
Get COCO category ids by index.
Args:
    idx (int): Index of data.
Returns:
    list[int]: All categories in the image of specified index.
def get_cat_ids(self, idx):
    'Get COCO category ids by index.\n        Args:\n            idx (int): Index of data.\n        Returns:\n            list[int]: All categories in the image of specified index.\n        '
    img_id = self.data_infos[idx]['id']
    ann_ids = self.coco.get_ann_ids(img_ids=[img_id])
    ann_info = self.coco.load_anns(ann_ids)
    return [ann['category_id'] for ann in ann_info]