Closed Z-MU-Z closed 2 years ago
https://github.com/NVlabs/FreeSOLO/blob/main/LICENSE FreeSOLO use this function to evaluate on coco, but seemingly lvis don‘t have .loadRes,
from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval
annType = 'segm' prefix = 'instances' print('Running demo for {} results.'.format(annType))
dataDir='datasets/coco/' dataType='val2017' annFile = '{}/annotations/{}_{}.json'.format(dataDir,prefix,dataType) cocoGt=COCO(annFile)
resFile = 'training_dir/FreeSOLO_pl/inference/coco_instances_results.json'
cocoDt=cocoGt.loadRes(resFile)
cocoEval = COCOeval(cocoGt,cocoDt,annType) cocoEval.params.useCats = 0 cocoEval.evaluate() cocoEval.accumulate() cocoEval.summarize()
❓ Questions and Help
https://github.com/NVlabs/FreeSOLO/blob/main/LICENSE FreeSOLO use this function to evaluate on coco, but seemingly lvis don‘t have .loadRes,
from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval
annType = 'segm' prefix = 'instances' print('Running demo for {} results.'.format(annType))
dataDir='datasets/coco/' dataType='val2017' annFile = '{}/annotations/{}_{}.json'.format(dataDir,prefix,dataType) cocoGt=COCO(annFile)
resFile = 'training_dir/FreeSOLO_pl/inference/coco_instances_results.json'
resFile = 'demo/instances_val2017_densecl_r101.json'
cocoDt=cocoGt.loadRes(resFile)
cocoEval = COCOeval(cocoGt,cocoDt,annType) cocoEval.params.useCats = 0 cocoEval.evaluate() cocoEval.accumulate() cocoEval.summarize()