docstr: Prediction is performed using self.model and the prediction result is set to self._original_predictions.
  Args:
      image: np.ndarray
          A numpy array that contains the image to be predicted. 3 channel image should be in RGB order.
docstr_tok: ["Prediction","is","performed","using","self.model","and","the","prediction","result","is","set","to","self._original_predictions",".","Args",":","image",":","np.ndarray","A","numpy","array","that","contains","the","image","to","be","predicted",".","3","channel","image","should","be","in","RGB","order","."]
code: def perform_inference(self, image: np.ndarray):
      """
      Prediction is performed using self.model and the prediction result is set to self._original_predictions.
      Args:
          image: np.ndarray
              A numpy array that contains the image to be predicted. 3 channel image should be in RGB order.
      """
  
      # Confirm model is loaded
      if self.model is None:
          raise ValueError(
              "Model is not loaded, load it by calling .load_model()"
          )
  
      # Supports only batch of 1
  
      # perform inference
      if isinstance(image, np.ndarray):
          # https://github.com/obss/sahi/issues/265
          image = image[:, :, ::-1]
      # compatibility with sahi v0.8.15
      if not isinstance(image, list):
          image = [image]
      prediction_result = self.model(image)
  
      self._original_predictions = prediction_result["predictions"]
  
file_path: sahi/sahi/models/mmdet.py
imports: import logging
  from typing import Any, Dict, List, Optional, Union
  import numpy
  from sahi.models.base import DetectionModel
  from sahi.prediction import ObjectPrediction
  from sahi.utils.compatibility import fix_full_shape_list, fix_shift_amount_list
  from sahi.utils.cv import get_bbox_from_bool_mask
  from sahi.utils.import_utils import check_requirements
label_desc: Use image node_id 5 for calling the MmdetDetectionModel obj's underlying member method code with example usage: obj.perform_inference(image) without return types