code: def process_bbox_predictions(
      pred: Prediction,
      img: Union[PIL.Image.Image, np.ndarray],
      transforms: List[Any],
  ) -> List[Dict[str, Any]]:
      """
      Postprocess prediction.
  
      Parameters
      ----------
      pred: icevision prediction object
      img: original image, before any model-pre-processing done
      transforms: list of model-pre-processing transforms
  
      Returns
      -------
      List of dicts with class, score and bbox coordinates
      """
      img = np.array(img)
      bboxes = []
      for bbox, score, label in zip(
          pred.pred.detection.bboxes,
          pred.pred.detection.scores,
          pred.pred.detection.labels,
      ):
          img_size = get_img_size_from_data(img)
          xmin, ymin, xmax, ymax = postprocess_bbox(
              img_size,
              bbox,
              transforms,
              pred.pred.height,
              pred.pred.width,
          )
  
          bbox = BBox.from_xyxy(xmin, ymin, xmax, ymax)
          bboxes.append(bbox)
  
      pred.pred.img = np.array(img)
      pred.pred.detection.set_bboxes(bboxes)
      return pred
  
file_path: icevision/icevision/models/inference.py
imports: from icevision.imports import *
  from icevision.core import *
  from icevision.data import *
  from icevision.tfms.albumentations.albumentations_helpers import get_size_without_padding
  from icevision.tfms.albumentations import albumentations_adapter
  from icevision.utils.imageio import *
  from icevision.visualize.draw_data import *
  from icevision.visualize.utils import *
  from icevision.utils.imageio import get_img_size_from_data
label_desc: Use image node_id 2 for calling a global function with example usage: process_bbox_predictions(pred, img, transforms) and returns: pred