code: def __init__(
      self,
      coco: COCO = None,
      iou_type: str = None,
      results_file_name: str = "predict_results.json",
      classes_mapping: dict = None,
  ):
      self.coco = copy.deepcopy(coco)
      self.img_ids = []  # 记录每个进程处理图片的ids
      self.results = []
      self.aggregation_results = None
      self.classes_mapping = classes_mapping
      self.coco_evaluator = None
      assert iou_type in ["bbox", "segm", "keypoints"]
      self.iou_type = iou_type
      self.results_file_name = results_file_name
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/mask_rcnn/train_utils/coco_eval.py
imports: import json
  import copy
  import numpy
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  import pycocotools.mask
  from .distributed_utils import all_gather, is_main_process
label_desc: Use image node_id 1 to create a new EvalCOCOMetric object  with example: obj = EvalCOCOMetric(coco, iou_type, results_file_name, classes_mapping)