code: def json_eval_results(metric, json_directory, dataset):
      """
      cocoapi eval with already exists proposal.json, bbox.json or mask.json
      """
      assert metric == "COCO"
      anno_file = dataset.get_anno()
      json_file_list = ["proposal.json", "bbox.json", "mask.json"]
      if json_directory:
          assert os.path.exists(
              json_directory
          ), "The json directory:{} does not exist".format(
              json_directory
          )
          for k, v in enumerate(json_file_list):
              json_file_list[k] = os.path.join(str(json_directory), v)
  
      coco_eval_style = ["proposal", "bbox", "segm"]
      for i, v_json in enumerate(json_file_list):
          if os.path.exists(v_json):
              cocoapi_eval(
                  v_json, coco_eval_style[i], anno_file=anno_file
              )
          else:
              logger.info("{} not exists!".format(v_json))
  
file_path: PaddleDetection/ppdet/metrics/coco_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import numpy
  import itertools
  from ppdet.metrics.json_results import get_det_res, get_det_poly_res, get_seg_res, get_solov2_segm_res, get_keypoint_res, get_pose3d_res
  from ppdet.metrics.map_utils import draw_pr_curve
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 3 for calling a global function with example usage: json_eval_results(metric, json_directory, dataset) without return types