code: def oks_iou(g, d, a_g, a_d, sigmas=None, in_vis_thre=None):
      if not isinstance(sigmas, np.ndarray):
          sigmas = (
              np.array(
                  [
                      0.26,
                      0.25,
                      0.25,
                      0.35,
                      0.35,
                      0.79,
                      0.79,
                      0.72,
                      0.72,
                      0.62,
                      0.62,
                      1.07,
                      1.07,
                      0.87,
                      0.87,
                      0.89,
                      0.89,
                  ]
              )
              / 10.0
          )
      vars = (sigmas * 2) ** 2
      xg = g[0::3]
      yg = g[1::3]
      vg = g[2::3]
      ious = np.zeros((d.shape[0]))
      for n_d in range(0, d.shape[0]):
          xd = d[n_d, 0::3]
          yd = d[n_d, 1::3]
          vd = d[n_d, 2::3]
          dx = xd - xg
          dy = yd - yg
          e = (
              (dx**2 + dy**2)
              / vars
              / ((a_g + a_d[n_d]) / 2 + np.spacing(1))
              / 2
          )
          if in_vis_thre is not None:
              ind = list(vg > in_vis_thre) and list(vd > in_vis_thre)
              e = e[ind]
          ious[n_d] = (
              np.sum(np.exp(-e)) / e.shape[0]
              if e.shape[0] != 0
              else 0.0
          )
      return ious
  
imports: import cv2
  import numpy
  import paddle.nn.functional
label_desc: Use image node_id 10 for calling a global function with example usage: oks_iou(g, d, a_g, a_d, sigmas, in_vis_thre) and returns: ious