code: def get_centroid(yolo_box, img_height, img_width):
      x1 = yolo_box[0] * img_width
      y1 = yolo_box[1] * img_height
      x2 = yolo_box[2] * img_width
      y2 = yolo_box[3] * img_height
      return np.array([(x1 + x2) / 2, (y1 + y2) / 2])
  
file_path: norfair/demos/yolov4/src/demo.py
imports: import argparse
  import cv2
  import numpy
  import torch
  from models import Yolov4
  from tool.torch_utils import do_detect
  from tool.utils import load_class_names, plot_boxes_cv2
  import norfair
  from norfair import Detection, Tracker, Video
label_desc: Use image node_id 1 for calling a global function with example usage: get_centroid(yolo_box, img_height, img_width) and returns: np