docstr: self._original_predictions is converted to a list of prediction.ObjectPrediction and set to
  self._object_prediction_list_per_image.
  Args:
      shift_amount_list: list of list
          To shift the box and mask predictions from sliced image to full sized image, should
          be in the form of List[[shift_x, shift_y],[shift_x, shift_y],...]
      full_shape_list: list of list
          Size of the full image after shifting, should be in the form of
          List[[height, width],[height, width],...]
docstr_tok: ["self._original_predictions","is","converted","to","a","list","of","prediction.ObjectPrediction","and","set","to","self._object_prediction_list_per_image",".","Args",":","shift_amount_list",":","list","of","list","To","shift","the","box","and","mask","predictions","from","sliced","image","to","full","sized","image",",","should","be","in","the","form","of","List","[","[","shift_x",",","shift_y","]",",","[","shift_x",",","shift_y","]",",","...","]","full_shape_list",":","list","of","list","Size","of","the","full","image","after","shifting",",","should","be","in","the","form","of","List","[","[","height",",","width","]",",","[","height",",","width","]",",","...","]"]
code: def _create_object_prediction_list_from_original_predictions(
      self,
      shift_amount_list: Optional[List[List[int]]] = [[0, 0]],
      full_shape_list: Optional[List[List[int]]] = None,
  ):
      """
      self._original_predictions is converted to a list of prediction.ObjectPrediction and set to
      self._object_prediction_list_per_image.
      Args:
          shift_amount_list: list of list
              To shift the box and mask predictions from sliced image to full sized image, should
              be in the form of List[[shift_x, shift_y],[shift_x, shift_y],...]
          full_shape_list: list of list
              Size of the full image after shifting, should be in the form of
              List[[height, width],[height, width],...]
      """
      original_predictions = self._original_predictions["detection"]
      category_mapping = self.category_mapping
  
      categories = list(category_mapping.keys())
      boxes = {v: [] for v in category_mapping.values() if v != 0}
      labels, scores = [], []
  
      total_detections = len(original_predictions["labels"])
  
      # compatilibty for sahi v0.8.15
      if isinstance(shift_amount_list[0], int):
          shift_amount_list = [shift_amount_list]
      if full_shape_list is not None and isinstance(
          full_shape_list[0], int
      ):
          full_shape_list = [full_shape_list]
  
      # assuming self._original_predictions["detection"] contains single image results
      image_ind = 0
      shift_amount = shift_amount_list[image_ind]
      full_shape = (
          None
          if full_shape_list is None
          else full_shape_list[image_ind]
      )
  
      for i in range(total_detections):
          lbl = original_predictions["label_ids"][i]
          scores.append(original_predictions["scores"][i])
          boxes[lbl].append(original_predictions["bboxes"][i].xyxy)
          labels.append(lbl)
  
      object_prediction_list = []
  
      for category_id in list(category_mapping.values())[1:]:
          category_boxes = boxes[category_id]
          num_category_predictions = len(category_boxes)
  
          for category_predictions_ind in range(
              num_category_predictions
          ):
              bbox = category_boxes[category_predictions_ind]
              score = scores[category_predictions_ind]
              bool_mask = None
  
              category_name = categories[category_id]
              object_prediction = ObjectPrediction(
                  bbox=bbox,
                  category_id=category_id,
                  score=score,
                  bool_mask=bool_mask,
                  category_name=category_name,
                  shift_amount=shift_amount,
                  full_shape=full_shape,
              )
              object_prediction_list.append(object_prediction)
  
      self._object_prediction_list_per_image = [object_prediction_list]
  
imports: from types import ModuleType
  from icevision.imports import *
  from icevision.imports import *
  from icevision.core import *
  from icevision.data import *
  from icevision.utils.imageio import *
  from icevision.visualize.draw_data import *
  from icevision.visualize.utils import *
  from icevision.tfms.albumentations import albumentations_adapter
  from sahi.models.base import DetectionModel
  from sahi.prediction import ObjectPrediction
  from sahi.predict import get_sliced_prediction
label_desc: Use image node_id 7 for calling the IceSahiModel obj's underlying member method code with example usage: obj._create_object_prediction_list_from_original_predictions(shift_amount_list, full_shape_list) without return types