class_docstr: A class to evaluate detections using Open Images V2 metrics.
  
  Open Images V2 introduce group_of type of bounding boxes and this metric
  handles those boxes appropriately.
class_docstr_tok: ["A","class","to","evaluate","detections","using","Open","Images","V2","metrics",".","Open","Images","V2","introduce","group_of","type","of","bounding","boxes","and","this","metric","handles","those","boxes","appropriately","."]
docstr: Adds groundtruth for a single image to be used for evaluation.
  
  Args:
    image_id: A unique string/integer identifier for the image.
    groundtruth_dict: A dictionary containing -
      standard_fields.InputDataFields.groundtruth_boxes: float32 numpy array
        of shape [num_boxes, 4] containing `num_boxes` groundtruth boxes of
        the format [ymin, xmin, ymax, xmax] in absolute image coordinates.
      standard_fields.InputDataFields.groundtruth_classes: integer numpy array
        of shape [num_boxes] containing 1-indexed groundtruth classes for the
        boxes.
      standard_fields.InputDataFields.groundtruth_group_of: Optional length
        M numpy boolean array denoting whether a groundtruth box contains a
        group of instances.
  
  Raises:
    ValueError: On adding groundtruth for an image more than once.
code: def add_single_ground_truth_image_info(
      self, image_id, groundtruth_dict
  ):
      """Adds groundtruth for a single image to be used for evaluation.
  
      Args:
        image_id: A unique string/integer identifier for the image.
        groundtruth_dict: A dictionary containing -
          standard_fields.InputDataFields.groundtruth_boxes: float32 numpy array
            of shape [num_boxes, 4] containing `num_boxes` groundtruth boxes of
            the format [ymin, xmin, ymax, xmax] in absolute image coordinates.
          standard_fields.InputDataFields.groundtruth_classes: integer numpy array
            of shape [num_boxes] containing 1-indexed groundtruth classes for the
            boxes.
          standard_fields.InputDataFields.groundtruth_group_of: Optional length
            M numpy boolean array denoting whether a groundtruth box contains a
            group of instances.
  
      Raises:
        ValueError: On adding groundtruth for an image more than once.
      """
      if image_id in self._image_ids:
          raise ValueError(
              "Image with id {} already added.".format(image_id)
          )
  
      groundtruth_classes = (
          groundtruth_dict[
              standard_fields.InputDataFields.groundtruth_classes
          ]
          - self._label_id_offset
      )
      # If the key is not present in the groundtruth_dict or the array is empty
      # (unless there are no annotations for the groundtruth on this image)
      # use values from the dictionary or insert None otherwise.
      if (
          standard_fields.InputDataFields.groundtruth_group_of
          in groundtruth_dict.keys()
          and (
              groundtruth_dict[
                  standard_fields.InputDataFields.groundtruth_group_of
              ].size
              or not groundtruth_classes.size
          )
      ):
          groundtruth_group_of = groundtruth_dict[
              standard_fields.InputDataFields.groundtruth_group_of
          ]
      else:
          groundtruth_group_of = None
          if not len(self._image_ids) % 1000:
              logging.warning(
                  "image %s does not have groundtruth group_of flag specified",
                  image_id,
              )
      self._evaluation.add_single_ground_truth_image_info(
          image_id,
          groundtruth_dict[
              standard_fields.InputDataFields.groundtruth_boxes
          ],
          groundtruth_classes,
          groundtruth_is_difficult_list=None,
          groundtruth_is_group_of_list=groundtruth_group_of,
      )
      self._image_ids.update([image_id])
  
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 2 for calling the OpenImagesDetectionEvaluator obj's underlying member method code with example usage: obj.add_single_ground_truth_image_info(image_id, groundtruth_dict) without return types