code: def evaluate(self):
      # 只在主进程上评估即可
      if is_main_process():
          # accumulate predictions from all images
          coco_true = self.coco
          coco_pre = coco_true.loadRes(self.results_file_name)
  
          self.coco_evaluator = COCOeval(
              cocoGt=coco_true, cocoDt=coco_pre, iouType=self.iou_type
          )
  
          self.coco_evaluator.evaluate()
          self.coco_evaluator.accumulate()
          print(f"IoU metric: {self.iou_type}")
          self.coco_evaluator.summarize()
  
          coco_info = (
              self.coco_evaluator.stats.tolist()
          )  # numpy to list
          return coco_info
      else:
          return None
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/train_coco_dataset/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 6 for calling the EvalCOCOMetric obj's underlying member method code with example usage: obj.evaluate() and returns: coco_info, None