class_docstr: A class to evaluate detections.
class_docstr_tok: ["A","class","to","evaluate","detections","."]
docstr: Adds detections for a single image to be used for evaluation.
  
  Args:
    image_id: A unique string/integer identifier for the image.
    detections_dict: A dictionary containing -
      standard_fields.DetectionResultFields.detection_boxes: float32 numpy
        array of shape [num_boxes, 4] containing `num_boxes` detection boxes
        of the format [ymin, xmin, ymax, xmax] in absolute image coordinates.
      standard_fields.DetectionResultFields.detection_scores: float32 numpy
        array of shape [num_boxes] containing detection scores for the boxes.
      standard_fields.DetectionResultFields.detection_classes: integer numpy
        array of shape [num_boxes] containing 1-indexed detection classes for
        the boxes.
      standard_fields.DetectionResultFields.detection_masks: uint8 numpy
        array of shape [num_boxes, height, width] containing `num_boxes` masks
        of values ranging between 0 and 1.
  
  Raises:
    ValueError: If detection masks are not in detections dictionary.
code: def add_single_detected_image_info(self, image_id, detections_dict):
      """Adds detections for a single image to be used for evaluation.
  
      Args:
        image_id: A unique string/integer identifier for the image.
        detections_dict: A dictionary containing -
          standard_fields.DetectionResultFields.detection_boxes: float32 numpy
            array of shape [num_boxes, 4] containing `num_boxes` detection boxes
            of the format [ymin, xmin, ymax, xmax] in absolute image coordinates.
          standard_fields.DetectionResultFields.detection_scores: float32 numpy
            array of shape [num_boxes] containing detection scores for the boxes.
          standard_fields.DetectionResultFields.detection_classes: integer numpy
            array of shape [num_boxes] containing 1-indexed detection classes for
            the boxes.
          standard_fields.DetectionResultFields.detection_masks: uint8 numpy
            array of shape [num_boxes, height, width] containing `num_boxes` masks
            of values ranging between 0 and 1.
  
      Raises:
        ValueError: If detection masks are not in detections dictionary.
      """
      detection_classes = (
          detections_dict[
              standard_fields.DetectionResultFields.detection_classes
          ]
          - self._label_id_offset
      )
      detection_masks = None
      if self._evaluate_masks:
          if (
              standard_fields.DetectionResultFields.detection_masks
              not in detections_dict
          ):
              raise ValueError(
                  "Detection masks not in detections dictionary."
              )
          detection_masks = detections_dict[
              standard_fields.DetectionResultFields.detection_masks
          ]
      self._evaluation.add_single_detected_image_info(
          image_key=image_id,
          detected_boxes=detections_dict[
              standard_fields.DetectionResultFields.detection_boxes
          ],
          detected_scores=detections_dict[
              standard_fields.DetectionResultFields.detection_scores
          ],
          detected_class_labels=detection_classes,
          detected_masks=detection_masks,
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import collections
  import logging
  import numpy
  from abc import ABCMeta, abstractmethod
  from .None import label_map_util, metrics, per_image_evaluation, standard_fields
label_desc: Use image node_id 3 for calling the ObjectDetectionEvaluator obj's underlying member method code with example usage: obj.add_single_detected_image_info(image_id, detections_dict) without return types