pycocotools模块
code one:from pycocotools.coco import COCOdataDir = '..'dataType = 'val2017'annFile = '{}/annotations/instances_{}.json'.format(dataDir, dataType)coco = COCO(annFile) # initialize COCO api for instance annotationsThe result is:loading annotatio