I'm using the python coco api to run evaluation for object detection. I have two files, a ground truth json, and a results json. The coco notebook demo only shows running eval for all classes. How can I run it for only one specific class or a subset of classes? Currently I'm doing this:
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
annType = 'bbox'
cocoGt=COCO(gt_json)
cocoDt=cocoGt.loadRes(results_json)
imgIds=sorted(cocoGt.getImgIds())
# running evaluation
cocoEval = COCOeval(cocoGt,cocoDt,annType)
cocoEval.params.imgIds = imgIds
cocoEval.evaluate()
cocoEval.accumulate()
cocoEval.summarize()