def add_single_detected_image_info(self, image_key, detected_box_tuples,
                                     detected_scores, detected_class_tuples):
    """Adds detections for a single image to be used for evaluation.

    Args:
      image_key: A unique string/integer identifier for the image.
      detected_box_tuples: A numpy array of structures with shape [N, 1],
          representing N tuples, each tuple containing the same number of named
          bounding boxes.
          Each box is of the format [y_min, x_min, y_max, x_max].
      detected_scores: A float numpy array of shape [N, 1], representing
          the confidence scores of the detected N object instances.
      detected_class_tuples: A numpy array of structures shape [N, 1],
          representing the class labels of the corresponding bounding boxes and
          possibly additional classes.
    """
    self._detection_keys.add(image_key)
    if image_key in self._groundtruth_box_tuples:
      groundtruth_box_tuples = self._groundtruth_box_tuples[image_key]
      groundtruth_class_tuples = self._groundtruth_class_tuples[image_key]
    else:
      groundtruth_box_tuples = np.empty(
          shape=[0, 4], dtype=detected_box_tuples.dtype)
      groundtruth_class_tuples = np.array([], dtype=detected_class_tuples.dtype)

    scores, tp_fp_labels, mapping = (
        self._per_image_eval.compute_detection_tp_fp(
            detected_box_tuples=detected_box_tuples,
            detected_scores=detected_scores,
            detected_class_tuples=detected_class_tuples,
            groundtruth_box_tuples=groundtruth_box_tuples,
            groundtruth_class_tuples=groundtruth_class_tuples))

    self._scores += [scores]
    self._tp_fp_labels += [tp_fp_labels]
    self._relation_field_values += [detected_class_tuples[mapping]['relation']]
Adds detections for a single image to be used for evaluation.

    Args:
      image_key: A unique string/integer identifier for the image.
      detected_box_tuples: A numpy array of structures with shape [N, 1],
          representing N tuples, each tuple containing the same number of named
          bounding boxes.
          Each box is of the format [y_min, x_min, y_max, x_max].
      detected_scores: A float numpy array of shape [N, 1], representing
          the confidence scores of the detected N object instances.
      detected_class_tuples: A numpy array of structures shape [N, 1],
          representing the class labels of the corresponding bounding boxes and
          possibly additional classes.
    
inference_api/src/main/object_detection/utils/vrd_evaluation.py