code: def test_perform_inference_without_mask_output(self):
      from sahi.models.torchvision import TorchVisionDetectionModel
  
      # init model
      torchvision_detection_model = TorchVisionDetectionModel(
          config_path=TorchVisionTestConstants.SSD300_CONFIG_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
      torchvision_detection_model.perform_inference(image)
      original_predictions = (
          torchvision_detection_model.original_predictions
      )
  
      from sahi.utils.torchvision import COCO_CLASSES
  
      boxes = list(
          original_predictions[0]["boxes"].cpu().detach().numpy()
      )
      scores = list(
          original_predictions[0]["scores"].cpu().detach().numpy()
      )
      category_ids = list(
          original_predictions[0]["labels"].cpu().detach().numpy()
      )
  
      # get image height and width
      image_height, image_width = image.shape[:2]
  
      # ensure all box coords are valid
      for box_ind in range(len(boxes)):
          self.assertEqual(len(boxes[box_ind]), 4)
          self.assertTrue(boxes[box_ind][0] <= image_width)
          self.assertTrue(boxes[box_ind][1] <= image_height)
          self.assertTrue(boxes[box_ind][2] <= image_width)
          self.assertTrue(boxes[box_ind][3] <= image_height)
          for coord_ind in range(len(boxes[box_ind])):
              self.assertTrue(boxes[box_ind][coord_ind] >= 0)
  
      # ensure all category ids are valid
      for category_id_ind in range(len(category_ids)):
          self.assertTrue(
              category_ids[category_id_ind] < len(COCO_CLASSES)
          )
          self.assertTrue(category_ids[category_id_ind] >= 0)
  
      # ensure all scores are valid
      for score_ind in range(len(scores)):
          self.assertTrue(scores[score_ind] <= 1)
          self.assertTrue(scores[score_ind] >= 0)
  
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 4 for calling the TestTorchVisionDetectionModel obj's underlying member method code with example usage: obj.test_perform_inference_without_mask_output() without return types