class_docstr: Object detection pipeline using any `AutoModelForObjectDetection`. This pipeline predicts bounding boxes of objects
  and their classes.
  
  This object detection pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"object-detection"`.
  
  See the list of available models on [huggingface.co/models](https://huggingface.co/models?filter=object-detection).
code: def postprocess(self, model_outputs, threshold=0.9):
      target_size = model_outputs["target_size"]
      raw_annotations = self.feature_extractor.post_process(
          model_outputs, target_size
      )
      raw_annotation = raw_annotations[0]
      keep = raw_annotation["scores"] > threshold
      scores = raw_annotation["scores"][keep]
      labels = raw_annotation["labels"][keep]
      boxes = raw_annotation["boxes"][keep]
  
      raw_annotation["scores"] = scores.tolist()
      raw_annotation["labels"] = [
          self.model.config.id2label[label.item()] for label in labels
      ]
      raw_annotation["boxes"] = [
          self._get_bounding_box(box) for box in boxes
      ]
  
      # {"scores": [...], ...} --> [{"score":x, ...}, ...]
      keys = ["score", "label", "box"]
      annotation = [
          dict(zip(keys, vals))
          for vals in zip(
              raw_annotation["scores"],
              raw_annotation["labels"],
              raw_annotation["boxes"],
          )
      ]
  
      return annotation
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/pipelines/object_detection.py
imports: from typing import Any, Dict, List, Union
  from ..utils import add_end_docstrings, is_torch_available, is_vision_available, logging, requires_backends
  from .base import PIPELINE_INIT_ARGS, Pipeline
label_desc: Use image node_id 6 for calling the ObjectDetectionPipeline obj's underlying member method code with example usage: obj.postprocess(model_outputs, threshold) and returns: annotation