class_docstr: A class to evaluate detections.
docstr: Constructor.
  
  Args:
    categories: A list of dicts, each of which has the following keys -
      'id': (required) an integer id uniquely identifying this category.
      'name': (required) string representing category name e.g., 'cat', 'dog'.
    matching_iou_threshold: IOU threshold to use for matching groundtruth
      boxes to detection boxes.
    evaluate_corlocs: (optional) boolean which determines if corloc scores
      are to be returned or not.
    metric_prefix: (optional) string prefix for metric name; if None, no
      prefix is used.
    use_weighted_mean_ap: (optional) boolean which determines if the mean
      average precision is computed directly from the scores and tp_fp_labels
      of all classes.
    evaluate_masks: If False, evaluation will be performed based on boxes.
      If True, mask evaluation will be performed instead.
  
  Raises:
    ValueError: If the category ids are not 1-indexed.
docstr_tok: ["Constructor",".","Args",":","categories",":","A","list","of","dicts",",","each","of","which","has","the","following","keys","-","'id","'",":","(","required",")","an","integer","id","uniquely","identifying","this","category",".","'name","'",":","(","required",")","string","representing","category","name","e.g.",",","'cat","'",",","'dog","'",".","matching_iou_threshold",":","IOU","threshold","to","use","for","matching","groundtruth","boxes","to","detection","boxes",".","evaluate_corlocs",":","(","optional",")","boolean","which","determines","if","corloc","scores","are","to","be","returned","or","not",".","metric_prefix",":","(","optional",")","string","prefix","for","metric","name",";","if","None",",","no","prefix","is","used",".","use_weighted_mean_ap",":","(","optional",")","boolean","which","determines","if","the","mean","average","precision","is","computed","directly","from","the","scores","and","tp_fp_labels","of","all","classes",".","evaluate_masks",":","If","False",",","evaluation","will","be","performed","based","on","boxes",".","If","True",",","mask","evaluation","will","be","performed","instead",".","Raises",":","ValueError",":","If","the","category","ids","are","not","1-indexed","."]
code: def __init__(
      self,
      categories,
      matching_iou_threshold=0.5,
      evaluate_corlocs=False,
      metric_prefix=None,
      use_weighted_mean_ap=False,
      evaluate_masks=False,
  ):
      """Constructor.
  
      Args:
        categories: A list of dicts, each of which has the following keys -
          'id': (required) an integer id uniquely identifying this category.
          'name': (required) string representing category name e.g., 'cat', 'dog'.
        matching_iou_threshold: IOU threshold to use for matching groundtruth
          boxes to detection boxes.
        evaluate_corlocs: (optional) boolean which determines if corloc scores
          are to be returned or not.
        metric_prefix: (optional) string prefix for metric name; if None, no
          prefix is used.
        use_weighted_mean_ap: (optional) boolean which determines if the mean
          average precision is computed directly from the scores and tp_fp_labels
          of all classes.
        evaluate_masks: If False, evaluation will be performed based on boxes.
          If True, mask evaluation will be performed instead.
  
      Raises:
        ValueError: If the category ids are not 1-indexed.
      """
      super(ObjectDetectionEvaluator, self).__init__(categories)
      self._num_classes = max([cat["id"] for cat in categories])
      if min(cat["id"] for cat in categories) < 1:
          raise ValueError("Classes should be 1-indexed.")
      self._matching_iou_threshold = matching_iou_threshold
      self._use_weighted_mean_ap = use_weighted_mean_ap
      self._label_id_offset = 1
      self._evaluate_masks = evaluate_masks
      self._evaluation = ObjectDetectionEvaluation(
          num_groundtruth_classes=self._num_classes,
          matching_iou_threshold=self._matching_iou_threshold,
          use_weighted_mean_ap=self._use_weighted_mean_ap,
          label_id_offset=self._label_id_offset,
      )
      self._image_ids = set([])
      self._evaluate_corlocs = evaluate_corlocs
      self._metric_prefix = (
          (metric_prefix + "_") if metric_prefix else ""
      )
  
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 1 to create a new ObjectDetectionEvaluator object from inherited base classes: DetectionEvaluator with example: obj = ObjectDetectionEvaluator(categories, matching_iou_threshold, evaluate_corlocs, metric_prefix, use_weighted_mean_ap, evaluate_masks)