class_docstr: Detection metric for COCO bbox task.
  
  Parameters
  ----------
  dataset : instance of gluoncv.data.COCODetection
      The validation dataset.
  save_prefix : str
      Prefix for the saved JSON results.
  use_time : bool
      Append unique datetime string to created JSON file name if ``True``.
  cleanup : bool
      Remove created JSON file if ``True``.
  score_thresh : float
      Detection results with confident scores smaller than ``score_thresh`` will
      be discarded before saving to results.
  data_shape : tuple of int, default is None
      If `data_shape` is provided as (height, width), we will rescale bounding boxes when
      saving the predictions.
      This is helpful when SSD/YOLO box predictions cannot be rescaled conveniently. Note that
      the data_shape must be fixed for all validation images.
  post_affine : a callable function with input signature (orig_w, orig_h, out_w, out_h)
      If not None, the bounding boxes will be affine transformed rather than simply scaled.
docstr: Get evaluation metrics. 
docstr_tok: ["Get","evaluation","metrics","."]
code: def get(self):
      """Get evaluation metrics."""
  
      # Metric printing adapted from detectron/json_dataset_evaluator.
      def _get_thr_ind(coco_eval, thr):
          ind = np.where(
              (coco_eval.params.iouThrs > thr - 1e-5)
              & (coco_eval.params.iouThrs < thr + 1e-5)
          )[0][0]
          iou_thr = coco_eval.params.iouThrs[ind]
          assert np.isclose(iou_thr, thr)
          return ind
  
      # call real update
      try:
          coco_eval = self._update()
      except IndexError:
          # invalid model may result in empty JSON results, skip it
          return [
              "mAP",
          ], [
              "0.0",
          ]
  
      IoU_lo_thresh = 0.5
      IoU_hi_thresh = 0.95
      ind_lo = _get_thr_ind(coco_eval, IoU_lo_thresh)
      ind_hi = _get_thr_ind(coco_eval, IoU_hi_thresh)
      # precision has dims (iou, recall, cls, area range, max dets)
      # area range index 0: all area ranges
      # max dets index 2: 100 per image
      precision = coco_eval.eval["precision"][
          ind_lo : (ind_hi + 1), :, :, 0, 2
      ]
      ap_default = np.mean(precision[precision > -1])
      names, values = [], []
      names.append("~~~~ Summary metrics ~~~~\n")
      # catch coco print string, don't want directly print here
      _stdout = sys.stdout
      sys.stdout = StringIO()
      coco_eval.summarize()
      coco_summary = sys.stdout.getvalue()
      sys.stdout = _stdout
      values.append(str(coco_summary).strip())
      for cls_ind, cls_name in enumerate(self.dataset.classes):
          precision = coco_eval.eval["precision"][
              ind_lo : (ind_hi + 1), :, cls_ind, 0, 2
          ]
          ap = np.mean(precision[precision > -1])
          names.append(cls_name)
          values.append("{:.1f}".format(100 * ap))
      # put mean AP at last, for comparing perf
      names.append(
          "~~~~ MeanAP @ IoU=[{:.2f},{:.2f}] ~~~~\n".format(
              IoU_lo_thresh, IoU_hi_thresh
          )
      )
      values.append("{:.1f}".format(100 * ap_default))
      return names, values
  
file_path: gluon-cv/gluoncv/utils/metrics/coco_detection.py
imports: from __future__ import absolute_import
  import sys
  import os
  from os import path
  import warnings
  import numpy
  import mxnet
label_desc: Use image node_id 5 for calling the COCODetectionMetric obj's underlying member method code with example usage: obj.get() and returns: names,  values, ind, list,  list