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: Use coco to get real scores. 
docstr_tok: ["Use","coco","to","get","real","scores","."]
code: def _update(self):
      """Use coco to get real scores."""
      if not self._current_id == len(self._img_ids):
          warnings.warn(
              "Recorded {} out of {} validation images, incomplete results".format(
                  self._current_id, len(self._img_ids)
              )
          )
      if not self._results:
          # in case of empty results, push a dummy result
          self._results.append(
              {
                  "image_id": self._img_ids[0],
                  "category_id": 0,
                  "bbox": [0, 0, 0, 0],
                  "score": 0,
              }
          )
      import json
  
      try:
          with open(self._filename, "w") as f:
              json.dump(self._results, f)
      except IOError as e:
          raise RuntimeError(
              "Unable to dump json file, ignored. What(): {}".format(
                  str(e)
              )
          )
  
      pred = self.dataset.coco.loadRes(self._filename)
      gt = self.dataset.coco
      # lazy import pycocotools
      from ...data.mscoco.utils import try_import_pycocotools
  
      try_import_pycocotools()
      from pycocotools.cocoeval import COCOeval
  
      coco_eval = COCOeval(gt, pred, "bbox")
      coco_eval.evaluate()
      coco_eval.accumulate()
      self._coco_eval = coco_eval
      return coco_eval
  
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 4 for calling the COCODetectionMetric obj's underlying member method code with example usage: obj._update() and returns: coco_eval