code: def test_get_sliced_prediction_torchvision(self):
      from sahi.models.torchvision import TorchVisionDetectionModel
      from sahi.predict import get_sliced_prediction
  
      # init model
      torchvision_detection_model = TorchVisionDetectionModel(
          config_path=TorchVisionTestConstants.FASTERRCNN_CONFIG_PATH,
          confidence_threshold=CONFIDENCE_THRESHOLD,
          device=MODEL_DEVICE,
          category_remapping=None,
          load_at_init=False,
          image_size=IMAGE_SIZE,
      )
      torchvision_detection_model.load_model()
  
      # prepare image
      image_path = "tests/data/small-vehicles1.jpeg"
  
      slice_height = 512
      slice_width = 512
      overlap_height_ratio = 0.1
      overlap_width_ratio = 0.2
      postprocess_type = "GREEDYNMM"
      match_metric = "IOS"
      match_threshold = 0.5
      class_agnostic = True
  
      # get sliced prediction
      prediction_result = get_sliced_prediction(
          image=image_path,
          detection_model=torchvision_detection_model,
          slice_height=slice_height,
          slice_width=slice_width,
          overlap_height_ratio=overlap_height_ratio,
          overlap_width_ratio=overlap_width_ratio,
          perform_standard_pred=False,
          postprocess_type=postprocess_type,
          postprocess_match_threshold=match_threshold,
          postprocess_match_metric=match_metric,
          postprocess_class_agnostic=class_agnostic,
      )
      object_prediction_list = prediction_result.object_prediction_list
  
      # compare
      self.assertEqual(len(object_prediction_list), 20)
      self.assertEqual(object_prediction_list[0].category.id, 3)
      self.assertEqual(object_prediction_list[0].category.name, "car")
      np.testing.assert_almost_equal(
          object_prediction_list[0].bbox.to_xywh(),
          [765.81, 259.37, 28.62, 24.63],
          decimal=1,
      )
  
file_path: sahi/tests/test_torchvision.py
imports: import unittest
  import numpy
  from sahi.utils.cv import read_image
  from sahi.utils.torchvision import TorchVisionTestConstants
label_desc: Use image node_id 8 for calling the TestTorchVisionDetectionModel obj's underlying member method code with example usage: obj.test_get_sliced_prediction_torchvision() without return types