code: def _prediction_to_deepchecks_format(model, image):
      pred = model([image])
      boxes, class_id, prob = (
          pred["detection_boxes"][0],
          pred["detection_classes"][0],
          pred["detection_scores"][0],
      )
      # convert [y_min, x_min, y_max, x_max] to [x_min, y_min, w, h]
      formatted_boxes = [
          boxes[:, 1],
          boxes[:, 0],
          boxes[:, 3] - boxes[:, 1],
          boxes[:, 2] - boxes[:, 0],
          prob,
          class_id,
      ]
      return tf.stack(formatted_boxes, axis=1)[prob > PROBA_THRESHOLD]
  
file_path: deepchecks/deepchecks/vision/datasets/detection/coco_tensorflow.py
imports: import os
  import typing
  from pathlib import Path
  import albumentations
  import numpy
  from typing_extensions import Literal
  from deepchecks import vision
  from deepchecks.vision.datasets.detection.coco_utils import COCO_DIR, LABEL_MAP, download_coco128, get_image_and_label
  from deepchecks.vision.vision_data import VisionData
label_desc: Use image node_id 2 for calling a global function with example usage: _prediction_to_deepchecks_format(model, image) and returns: tf