class_docstr: A class to evaluate detections.
class_docstr_tok: ["A","class","to","evaluate","detections","."]
docstr: Compute evaluation result.
  
  Returns:
    A dictionary of metrics with the following fields -
  
    1. summary_metrics:
      'Precision/mAP@<matching_iou_threshold>IOU': mean average precision at
      the specified IOU threshold.
  
    2. per_category_ap: category specific results with keys of the form
      'PerformanceByCategory/mAP@<matching_iou_threshold>IOU/category'.
code: def evaluate(self):
      """Compute evaluation result.
  
      Returns:
        A dictionary of metrics with the following fields -
  
        1. summary_metrics:
          'Precision/mAP@<matching_iou_threshold>IOU': mean average precision at
          the specified IOU threshold.
  
        2. per_category_ap: category specific results with keys of the form
          'PerformanceByCategory/mAP@<matching_iou_threshold>IOU/category'.
      """
      (
          per_class_ap,
          mean_ap,
          _,
          _,
          per_class_corloc,
          mean_corloc,
      ) = self._evaluation.evaluate()
      pascal_metrics = {
          self._metric_prefix
          + "Precision/mAP@{}IOU".format(
              self._matching_iou_threshold
          ): mean_ap
      }
      if self._evaluate_corlocs:
          pascal_metrics[
              self._metric_prefix
              + "Precision/meanCorLoc@{}IOU".format(
                  self._matching_iou_threshold
              )
          ] = mean_corloc
      category_index = label_map_util.create_category_index(
          self._categories
      )
      for idx in range(per_class_ap.size):
          if idx + self._label_id_offset in category_index:
              display_name = (
                  self._metric_prefix
                  + "PerformanceByCategory/AP@{}IOU/{}".format(
                      self._matching_iou_threshold,
                      category_index[idx + self._label_id_offset][
                          "name"
                      ],
                  )
              )
              pascal_metrics[display_name] = per_class_ap[idx]
  
              # Optionally add CorLoc metrics.classes
              if self._evaluate_corlocs:
                  display_name = (
                      self._metric_prefix
                      + "PerformanceByCategory/CorLoc@{}IOU/{}".format(
                          self._matching_iou_threshold,
                          category_index[idx + self._label_id_offset][
                              "name"
                          ],
                      )
                  )
                  pascal_metrics[display_name] = per_class_corloc[idx]
  
      return pascal_metrics
  
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 ObjectDetectionEvaluator obj's underlying member method code with example usage: obj.evaluate() and returns: pascal_metrics