docstr_tok: []
code: def get_pred(self):
      """ """
      img = self.inputs["image"]
      batch_size, _, height, width = img.shape
      img_metas = [
          dict(
              batch_input_shape=(height, width),
              img_shape=(height, width, 3),
              scale_factor=self.inputs["scale_factor"][i],
          )
          for i in range(batch_size)
      ]
      kptpred = self.simple_test(
          self.inputs, img_metas=img_metas, rescale=True
      )
      keypoints = kptpred[0][1][0]
      bboxs = kptpred[0][0][0]
      keypoints[..., 2] = bboxs[:, None, 4]
      res_lst = [[keypoints, bboxs[:, 4]]]
      outputs = {"keypoint": res_lst}
      return outputs
  
file_path: PaddleDetection/ppdet/modeling/architectures/keypoint_petr.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from ppdet.core.workspace import register
  from .meta_arch import BaseArch
  from ..None import layers
label_desc: Use image node_id 6 for calling the PETR obj's underlying member method code with example usage: obj.get_pred() and returns: outputs