code: def test_perform_inference(self):
      from sahi.models.yolov8 import Yolov8DetectionModel
  
      # init model
      download_yolov8n_model()
  
      yolov8_detection_model = Yolov8DetectionModel(
          model_path=Yolov8TestConstants.YOLOV8N_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
      yolov8_detection_model.perform_inference(image)
      original_predictions = yolov8_detection_model.original_predictions
  
      boxes = original_predictions
  
      # find box of first car detection with conf greater than 0.5
      for box in boxes[0]:
          if box[5].item() == 2:  # if category car
              if box[4].item() > 0.5:
                  break
  
      # compare
      desired_bbox = [448, 309, 497, 342]
      predicted_bbox = list(map(int, box[:4].tolist()))
      margin = 2
      for ind, point in enumerate(predicted_bbox):
          assert (
              point < desired_bbox[ind] + margin
              and point > desired_bbox[ind] - margin
          )
      self.assertEqual(len(yolov8_detection_model.category_names), 80)
      for box in boxes[0]:
          self.assertGreaterEqual(box[4].item(), CONFIDENCE_THRESHOLD)
  
file_path: sahi/tests/test_yolov8model.py
imports: import unittest
  import numpy
  from sahi.utils.cv import read_image
  from sahi.utils.yolov8 import Yolov8TestConstants, download_yolov8n_model, download_yolov8s_model
label_desc: Use image node_id 3 for calling the TestYolov8DetectionModel obj's underlying member method code with example usage: obj.test_perform_inference() without return types