def _wad_do_detection_eval(args, json_dataset, res_file, output_dir):
    coco_dt = json_dataset.WAD_CVPR2018.loadRes(str(res_file))
    coco_gt = json_dataset.WAD_CVPR2018.loadGt(args.range, 'boxes')
    coco_eval = WAD_eval(args, coco_gt, coco_dt, 'bbox')
    coco_eval.evaluate()
    coco_eval.accumulate()
    _log_detection_eval_metrics(json_dataset, coco_eval)
    eval_file = os.path.join(output_dir, 'detection_results.pkl')
    save_object(coco_eval, eval_file)
    logger.info('Wrote json eval results to: {}'.format(eval_file))
    return coco_eval
Example #2
0
def _apolloscape_do_segmentation_eval(args, json_dataset, res_file, output_dir):
    coco_dt = json_dataset.ApolloScape.loadRes(str(res_file))
    coco_gt = json_dataset.ApolloScape.loadGt(json_dataset.roidb, args.range, 'segms')
    coco_eval = WAD_eval(args, coco_gt, coco_dt, 'segm')
    coco_eval.evaluate()
    coco_eval.accumulate()
    _log_detection_eval_metrics(json_dataset, coco_eval)
    eval_file = os.path.join(output_dir, 'segmentation_results.pkl')
    save_object(coco_eval, eval_file)
    logger.info('Wrote json eval results to: {}'.format(eval_file))
    return coco_eval