code: def test_convert_original_predictions(self):
      from sahi.models.yolov5 import Yolov5DetectionModel
  
      # init model
      download_yolov5n_model()
  
      yolov5_detection_model = Yolov5DetectionModel(
          model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
          confidence_threshold=CONFIDENCE_THRESHOLD,
          device=MODEL_DEVICE,
          category_remapping=None,
          load_at_init=True,
          image_size=IMAGE_SIZE,
      )
  
      # prepare image
      image_path = "tests/data/small-vehicles1.jpeg"
      image = read_image(image_path)
  
      # perform inference
      yolov5_detection_model.perform_inference(image)
  
      # convert predictions to ObjectPrediction list
      yolov5_detection_model.convert_original_predictions()
      object_prediction_list = (
          yolov5_detection_model.object_prediction_list
      )
  
      # compare
      self.assertEqual(len(object_prediction_list), 3)
      self.assertEqual(object_prediction_list[0].category.id, 2)
      self.assertEqual(object_prediction_list[0].category.name, "car")
      desired_bbox = [321, 329, 57, 39]
      predicted_bbox = object_prediction_list[0].bbox.to_xywh()
      margin = 2
      for ind, point in enumerate(predicted_bbox):
          assert (
              point < desired_bbox[ind] + margin
              and point > desired_bbox[ind] - margin
          )
      self.assertEqual(object_prediction_list[2].category.id, 2)
      self.assertEqual(object_prediction_list[2].category.name, "car")
      desired_bbox = [381, 275, 42, 28]
      predicted_bbox = object_prediction_list[2].bbox.to_xywh()
      for ind, point in enumerate(predicted_bbox):
          assert (
              point < desired_bbox[ind] + margin
              and point > desired_bbox[ind] - margin
          )
  
      for object_prediction in object_prediction_list:
          self.assertGreaterEqual(
              object_prediction.score.value, CONFIDENCE_THRESHOLD
          )
  
file_path: sahi/tests/test_yolov5model.py
imports: import unittest
  import numpy
  from sahi.utils.cv import read_image
  from sahi.utils.yolov5 import Yolov5TestConstants, download_yolov5n_model, download_yolov5s6_model
label_desc: Use image node_id 4 for calling the TestYolov5DetectionModel obj's underlying member method code with example usage: obj.test_convert_original_predictions() without return types