code: def test_convert_original_predictions(self):
      from sahi.models.yolonas import YoloNasDetectionModel
  
      # init model
      download_yolonas_s_model()
  
      yolonas_detection_model = YoloNasDetectionModel(
          model_name=YOLONAS_TEST_MODEL_NAME,
          model_path=YoloNasTestConstants.YOLONAS_S_MODEL_PATH,
          class_names_yaml_path=CLASS_NAMES_YAML_PATH,
          confidence_threshold=CONFIDENCE_THRESHOLD,
          device=MODEL_DEVICE,
          category_remapping=None,
          load_at_init=True,
          image_size=IMAGE_SIZE,
      )
  
      # prepare image
      image = read_image(TEST_IMAGE_PATH)
  
      # get raw predictions for reference
      original_results = list(
          yolonas_detection_model.model.predict(
              TEST_IMAGE_PATH, conf=CONFIDENCE_THRESHOLD
          )
      )[0].prediction
      num_results = len(original_results.bboxes_xyxy)
  
      # perform inference
      yolonas_detection_model.perform_inference(image)
  
      # convert predictions to ObjectPrediction list
      yolonas_detection_model.convert_original_predictions()
      object_prediction_list = (
          yolonas_detection_model.object_prediction_list
      )
  
      # compare
      self.assertEqual(len(object_prediction_list), num_results)
  
      # loop through predictions and check that they are equal
      for i in range(num_results):
          desired_bbox = [
              original_results.bboxes_xyxy[i][0],
              original_results.bboxes_xyxy[i][1],
              original_results.bboxes_xyxy[i][2],
              original_results.bboxes_xyxy[i][3],
          ]
          desired_cat_id = int(original_results.labels[i])
          self.assertEqual(
              object_prediction_list[i].category.id, desired_cat_id
          )
          predicted_bbox = object_prediction_list[i].bbox.to_xyxy()
          margin = 2
          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_yolonasmodel.py
imports: import unittest
  from sahi.utils.cv import read_image
  from sahi.utils.yolonas import YoloNasTestConstants, download_yolonas_s_model
label_desc: Use image node_id 4 for calling the TestYoloNasDetectionModel obj's underlying member method code with example usage: obj.test_convert_original_predictions() without return types