def _tasks_from_predictions(self, predictions):
        """
        Get COCO API "tasks" (i.e. iou_type) from COCO-format predictions.
        """
        tasks = {"bbox"}
        for pred in predictions:
            if "segmentation" in pred:
                tasks.add("segm")
            if "keypoints" in pred:
                tasks.add("keypoints")
        return sorted(tasks)

        Get COCO API "tasks" (i.e. iou_type) from COCO-format predictions.
        
iGPT/models/grit_src/third_party/CenterNet2/detectron2/evaluation/coco_evaluation.py