code: def xywh2xyxy(box_coord: torch.Tensor):
      """
      Convert bounding box coordinates from center_x, center_y, width, height
      to x_1, y_1, x_2, x_3
      """
      n = box_coord.clone()
      n[:, 0] = box_coord[:, 0] - (box_coord[:, 2] / 2)
      n[:, 1] = box_coord[:, 1] - (box_coord[:, 3] / 2)
      n[:, 2] = box_coord[:, 0] + (box_coord[:, 2] / 2)
      n[:, 3] = box_coord[:, 1] + (box_coord[:, 3] / 2)
  
      return n
  
file_path: ImageAI/imageai/Detection/Custom/yolo/validate.py
imports: import os
  import numpy
  import torch
  from torchvision.ops import box_iou
  from ....yolov3.utils import get_predictions
  from .metric import ap_per_class
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: xywh2xyxy(box_coord) and returns: n