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``.
  in_vis_thresh : float
      Detection results with confident scores smaller than ``in_vis_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.
class_docstr_tok: ["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","``",".","in_vis_thresh",":","float","Detection","results","with","confident","scores","smaller","than","``","in_vis_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","can","not","be","rescaled","conveniently",".","Note","that","the","data_shape","must","be","fixed","for","all","validation","images","."]
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."""
      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, "keypoints")
      coco_eval.params.useSegm = None
      coco_eval.evaluate()
      coco_eval.accumulate()
      coco_eval.summarize()
      self._coco_eval = coco_eval
      return coco_eval
  
file_path: gluon-cv/gluoncv/utils/metrics/coco_keypoints.py
imports: from __future__ import absolute_import
  import os
  from os import path
  from collections import OrderedDict
  import warnings
label_desc: Use image node_id 4 for calling the COCOKeyPointsMetric obj's underlying member method code with example usage: obj._update() and returns: coco_eval