Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from pycocotools.coco import COCO
  2. from pycocotools.cocoeval import COCOeval
  3.  
  4. annFile = './ground_truth.json'
  5. cocoGt=COCO(annFile)
  6. resFile = './results.json'
  7. cocoDt=cocoGt.loadRes(resFile)
  8.  
  9. imgIds=sorted(cocoGt.getImgIds())
  10.  
  11. cocoEval = COCOeval(cocoGt,cocoDt,annType)
  12. cocoEval.params.imgIds = imgIds
  13. cocoEval.evaluate()
  14. cocoEval.accumulate()
  15. cocoEval.summarize()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement