code: def deccode_output_score_and_ptss(tpMap, topk_n=200, ksize=5):
      """
      tpMap:
      center: tpMap[1, 0, :, :]
      displacement: tpMap[1, 1:5, :, :]
      """
      b, c, h, w = tpMap.shape
      assert b == 1, "only support bsize==1"
      displacement = tpMap[:, 1:5, :, :][0]
      center = tpMap[:, 0, :, :]
      heat = torch.sigmoid(center)
      hmax = F.max_pool2d(
          heat, (ksize, ksize), stride=1, padding=(ksize - 1) // 2
      )
      keep = (hmax == heat).float()
      heat = heat * keep
      heat = heat.reshape(
          -1,
      )
  
      scores, indices = torch.topk(heat, topk_n, dim=-1, largest=True)
      yy = torch.floor_divide(indices, w).unsqueeze(-1)
      xx = torch.fmod(indices, w).unsqueeze(-1)
      ptss = torch.cat((yy, xx), dim=-1)
  
      ptss = ptss.detach().cpu().numpy()
      scores = scores.detach().cpu().numpy()
      displacement = displacement.detach().cpu().numpy()
      displacement = displacement.transpose((1, 2, 0))
      return ptss, scores, displacement
  
imports: import numpy
  import torch
  from torch.nn import functional
label_desc: Use image node_id 1 for calling a global function with example usage: deccode_output_score_and_ptss(tpMap, topk_n, ksize) and returns: ptss,  scores,  displacement