code: def pytorch_inference(image: np.ndarray, num_images: int = 20):
      image = torch.as_tensor(image, dtype=torch.float32)
  
      model = torch.hub.load("ultralytics/yolov5", "yolov5s")
      model.eval()
  
      with torch.no_grad():
          start = time.perf_counter()
          for _ in range(num_images):
              model(image)
          end = time.perf_counter()
          time_torch = end - start
  
      print(
          f"PyTorch model on CPU: {time_torch / num_images:.3f} seconds per image, "
          f"FPS: {num_images / time_torch:.2f}"
      )
  
      return num_images / time_torch
  
file_path: deep-learning-for-image-processing/deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/compare_fps.py
imports: import time
  import numpy
  import torch
  import onnxruntime
  import matplotlib.pyplot
  from openvino.runtime import Core
label_desc: Use image node_id 4 for calling a global function with example usage: pytorch_inference(image, num_images) and returns: unknown