class_docstr: refer to
  https://github.com/leoxiaobin/deep-high-resolution-net.pytorch
  Copyright (c) Microsoft, under the MIT License.
class_docstr_tok: ["refer","to","https",":","\/\/github.com\/leoxiaobin\/deep-high-resolution-net.pytorch","Copyright","(","c",")","Microsoft",",","under","the","MIT","License","."]
code: def update(self, inputs, outputs):
      kpts, _ = outputs["keypoint"][0]
  
      num_images = inputs["image"].shape[0]
      self.results["all_preds"][
          self.idx : self.idx + num_images, :, 0:3
      ] = kpts[:, :, 0:3]
      self.results["all_boxes"][
          self.idx : self.idx + num_images, 0:2
      ] = (
          inputs["center"].numpy()[:, 0:2]
          if isinstance(inputs["center"], paddle.Tensor)
          else inputs["center"][:, 0:2]
      )
      self.results["all_boxes"][
          self.idx : self.idx + num_images, 2:4
      ] = (
          inputs["scale"].numpy()[:, 0:2]
          if isinstance(inputs["scale"], paddle.Tensor)
          else inputs["scale"][:, 0:2]
      )
      self.results["all_boxes"][self.idx : self.idx + num_images, 4] = (
          np.prod(inputs["scale"].numpy() * 200, 1)
          if isinstance(inputs["scale"], paddle.Tensor)
          else np.prod(inputs["scale"] * 200, 1)
      )
      self.results["all_boxes"][self.idx : self.idx + num_images, 5] = (
          np.squeeze(inputs["score"].numpy())
          if isinstance(inputs["score"], paddle.Tensor)
          else np.squeeze(inputs["score"])
      )
      if isinstance(inputs["im_id"], paddle.Tensor):
          self.results["image_path"].extend(inputs["im_id"].numpy())
      else:
          self.results["image_path"].extend(inputs["im_id"])
      self.idx += num_images
  
imports: import os
  import json
  from collections import defaultdict, OrderedDict
  import numpy
  import paddle
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from ..modeling.keypoint_utils import oks_nms, keypoint_pck_accuracy, keypoint_auc, keypoint_epe
  from scipy.io import loadmat, savemat
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 3 for calling the KeyPointTopDownCOCOEval obj's underlying member method code with example usage: obj.update(inputs, outputs) without return types