code: def fullbody_crop(pts):
      flags = pts[:, 2] > 0.5  # openpose
      # flags = pts[:,2] > 0.2  #detectron
      check_id = [11, 19, 21, 22]
      cnt = sum(flags[check_id])
  
      if cnt == 0:
          center = pts[8, :2].astype(np.int)
          pts = pts[pts[:, 2] > 0.5][:, :2]
          radius = int(
              1.45
              * np.sqrt(((center[None, :] - pts) ** 2).sum(1)).max(0)
          )
          center[1] += int(0.05 * radius)
      else:
          pts = pts[pts[:, 2] > 0.2]
          pmax = pts.max(0)
          pmin = pts.min(0)
  
          center = (0.5 * (pmax[:2] + pmin[:2])).astype(np.int)
          radius = int(0.65 * max(pmax[0] - pmin[0], pmax[1] - pmin[1]))
  
      x1 = center[0] - radius
      x2 = center[0] + radius
      y1 = center[1] - radius
      y2 = center[1] + radius
  
      return (x1, y1, x2 - x1, y2 - y1)
  
imports: import os
  import random
  import numpy
  from PIL import Image, ImageOps
  from PIL.ImageFilter import GaussianBlur
  import cv2
  import torch
  import json
  from torch.utils.data import Dataset
  import torchvision.transforms
label_desc: Use image node_id 4 for calling a global function with example usage: fullbody_crop(pts) and returns: x1,  y1,  unknown,  unknown