code: def extract_predictions(predictions_):
      # Get the predicted class
      predictions_class = [
          COCO_INSTANCE_CATEGORY_NAMES[i]
          for i in list(predictions_["labels"])
      ]
      print("\npredicted classes:", predictions_class)
  
      # Get the predicted bounding boxes
      predictions_boxes = [
          [(i[0], i[1]), (i[2], i[3])]
          for i in list(predictions_["boxes"])
      ]
  
      # Get the predicted prediction score
      predictions_score = list(predictions_["scores"])
      print("predicted score:", predictions_score)
  
      # Get a list of index with score greater than threshold
      threshold = 0.5
      predictions_t = [
          predictions_score.index(x)
          for x in predictions_score
          if x > threshold
      ][-1]
  
      predictions_boxes = predictions_boxes[: predictions_t + 1]
      predictions_class = predictions_class[: predictions_t + 1]
  
      return predictions_class, predictions_boxes, predictions_class
  
file_path: adversarial-robustness-toolbox/examples/application_object_detection.py
imports: import cv2
  import numpy
  import matplotlib.pyplot
  from art.estimators.object_detection import PyTorchFasterRCNN
  from art.attacks.evasion import ProjectedGradientDescent
label_desc: Use image node_id 1 for calling a global function with example usage: extract_predictions(predictions_) and returns: predictions_class,  predictions_boxes,  predictions_class