code: def test_get_prediction_mmdet(self):
      from sahi.models.mmdet import MmdetDetectionModel
      from sahi.predict import get_prediction
      from sahi.utils.mmdet import (
          MmdetTestConstants,
          download_mmdet_yolox_tiny_model,
      )
  
      # init model
      download_mmdet_yolox_tiny_model()
  
      mmdet_detection_model = MmdetDetectionModel(
          model_path=MmdetTestConstants.MMDET_YOLOX_TINY_MODEL_PATH,
          config_path=MmdetTestConstants.MMDET_YOLOX_TINY_CONFIG_PATH,
          confidence_threshold=CONFIDENCE_THRESHOLD,
          device=MODEL_DEVICE,
          category_remapping=None,
          image_size=IMAGE_SIZE,
      )
      mmdet_detection_model.load_model()
  
      # prepare image
      image_path = "tests/data/small-vehicles1.jpeg"
      image = read_image(image_path)
  
      # get full sized prediction
      prediction_result = get_prediction(
          image=image,
          detection_model=mmdet_detection_model,
          shift_amount=[0, 0],
          full_shape=None,
      )
      object_prediction_list = prediction_result.object_prediction_list
  
      # compare
      self.assertEqual(len(object_prediction_list), 2)
      num_person = 0
      for object_prediction in object_prediction_list:
          if object_prediction.category.name == "person":
              num_person += 1
      self.assertEqual(num_person, 0)
      num_truck = 0
      for object_prediction in object_prediction_list:
          if object_prediction.category.name == "truck":
              num_truck += 1
      self.assertEqual(num_truck, 0)
      num_car = 0
      for object_prediction in object_prediction_list:
          if object_prediction.category.name == "car":
              num_car += 1
      self.assertEqual(num_car, 2)
  
file_path: sahi/tests/test_predict.py
imports: import os
  import shutil
  import unittest
  import numpy
  from sahi.utils.cv import read_image
label_desc: Use image node_id 3 for calling the TestPredict obj's underlying member method code with example usage: obj.test_get_prediction_mmdet() without return types