code: def yolop_detections_to_norfair_detections(
      yolop_detections: torch.tensor,
  ) -> List[Detection]:
      """convert detections_as_xywh to norfair detections"""
      norfair_detections: List[Detection] = []
  
      for detection_as_xyxy in yolop_detections[0]:
          # Move to cpu
          detection_as_xyxy = detection_as_xyxy.cpu().data
  
          bbox = np.array(
              [
                  [detection_as_xyxy[0], detection_as_xyxy[1]],
                  [detection_as_xyxy[2], detection_as_xyxy[3]],
              ]
          )
          scores = np.array(
              [detection_as_xyxy[4], detection_as_xyxy[4]]
          )
          label = int(detection_as_xyxy[5])
          norfair_detections.append(
              Detection(points=bbox, scores=scores, label=label)
          )
  
      return norfair_detections
  
imports: import glob
  import logging
  import os
  import re
  import time
  from pathlib import Path
  from typing import List
  import cv2
  import numpy
  import torch
  import torchvision
  from norfair import Detection
label_desc: Use image node_id 1 for calling a global function with example usage: yolop_detections_to_norfair_detections(yolop_detections) and returns: norfair_detections