class_docstr: Internal implementation of Pascal object detection metrics.
class_docstr_tok: ["Internal","implementation","of","Pascal","object","detection","metrics","."]
docstr: Adds groundtruth for a single image to be used for evaluation.
  
  Args:
    image_key: A unique string/integer identifier for the image.
    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.
    groundtruth_class_labels: integer numpy array of shape [num_boxes]
      containing 0-indexed groundtruth classes for the boxes.
    groundtruth_is_difficult_list: A length M numpy boolean array denoting
      whether a ground truth box is a difficult instance or not. To support
      the case that no boxes are difficult, it is by default set as None.
    groundtruth_is_group_of_list: A length M numpy boolean array denoting
        whether a ground truth box is a group-of box or not. To support
        the case that no boxes are groups-of, it is by default set as None.
    groundtruth_masks: uint8 numpy array of shape
      [num_boxes, height, width] containing `num_boxes` groundtruth masks.
      The mask values range from 0 to 1.
code: def add_single_ground_truth_image_info(
      self,
      image_key,
      groundtruth_boxes,
      groundtruth_class_labels,
      groundtruth_is_difficult_list=None,
      groundtruth_is_group_of_list=None,
      groundtruth_masks=None,
  ):
      """Adds groundtruth for a single image to be used for evaluation.
  
      Args:
        image_key: A unique string/integer identifier for the image.
        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.
        groundtruth_class_labels: integer numpy array of shape [num_boxes]
          containing 0-indexed groundtruth classes for the boxes.
        groundtruth_is_difficult_list: A length M numpy boolean array denoting
          whether a ground truth box is a difficult instance or not. To support
          the case that no boxes are difficult, it is by default set as None.
        groundtruth_is_group_of_list: A length M numpy boolean array denoting
            whether a ground truth box is a group-of box or not. To support
            the case that no boxes are groups-of, it is by default set as None.
        groundtruth_masks: uint8 numpy array of shape
          [num_boxes, height, width] containing `num_boxes` groundtruth masks.
          The mask values range from 0 to 1.
      """
      if image_key in self.groundtruth_boxes:
          logging.warning(
              "image %s has already been added to the ground truth database.",
              image_key,
          )
          return
  
      self.groundtruth_boxes[image_key] = groundtruth_boxes
      self.groundtruth_class_labels[
          image_key
      ] = groundtruth_class_labels
      self.groundtruth_masks[image_key] = groundtruth_masks
      if groundtruth_is_difficult_list is None:
          num_boxes = groundtruth_boxes.shape[0]
          groundtruth_is_difficult_list = np.zeros(
              num_boxes, dtype=bool
          )
      self.groundtruth_is_difficult_list[
          image_key
      ] = groundtruth_is_difficult_list.astype(dtype=bool)
      if groundtruth_is_group_of_list is None:
          num_boxes = groundtruth_boxes.shape[0]
          groundtruth_is_group_of_list = np.zeros(num_boxes, dtype=bool)
      self.groundtruth_is_group_of_list[
          image_key
      ] = groundtruth_is_group_of_list.astype(dtype=bool)
  
      self._update_ground_truth_statistics(
          groundtruth_class_labels,
          groundtruth_is_difficult_list.astype(dtype=bool),
          groundtruth_is_group_of_list.astype(dtype=bool),
      )
  
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 4 for calling the ObjectDetectionEvaluation obj's underlying member method code with example usage: obj.add_single_ground_truth_image_info(image_key, groundtruth_boxes, groundtruth_class_labels, groundtruth_is_difficult_list, groundtruth_is_group_of_list, groundtruth_masks) without return types