class_docstr: Class for handling detection model predictions.
class_docstr_tok: ["Class","for","handling","detection","model","predictions","."]
docstr: Returns shifted version ObjectPrediction.
  Shifts bbox and mask coords.
  Used for mapping sliced predictions over full image.
docstr_tok: ["Returns","shifted","version","ObjectPrediction",".","Shifts","bbox","and","mask","coords",".","Used","for","mapping","sliced","predictions","over","full","image","."]
code: def get_shifted_object_prediction(self):
      """
      Returns shifted version ObjectPrediction.
      Shifts bbox and mask coords.
      Used for mapping sliced predictions over full image.
      """
      if self.mask:
          return ObjectPrediction(
              bbox=self.bbox.get_shifted_box().to_xyxy(),
              category_id=self.category.id,
              score=self.score.value,
              bool_mask=self.mask.get_shifted_mask().bool_mask,
              category_name=self.category.name,
              shift_amount=[0, 0],
              full_shape=self.mask.get_shifted_mask().full_shape,
          )
      else:
          return ObjectPrediction(
              bbox=self.bbox.get_shifted_box().to_xyxy(),
              category_id=self.category.id,
              score=self.score.value,
              bool_mask=None,
              category_name=self.category.name,
              shift_amount=[0, 0],
              full_shape=None,
          )
  
imports: import copy
  from typing import Dict, List, Optional, Union
  import numpy
  from PIL import Image
  from sahi.annotation import ObjectAnnotation
  from sahi.utils.coco import CocoAnnotation, CocoPrediction
  from sahi.utils.cv import read_image_as_pil, visualize_object_predictions
  from sahi.utils.file import Path
label_desc: Use image node_id 2 for calling the ObjectPrediction obj's underlying member method code with example usage: obj.get_shifted_object_prediction() and returns: ObjectPrediction, ObjectPrediction