def __init__(self,
               categories,
               evaluate_masks=False,
               matching_iou_threshold=0.5,
               evaluate_corlocs=False,
               group_of_weight=1.0):
    """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'.
      evaluate_masks: set to true for instance segmentation metric and to false
        for detection metric.
      matching_iou_threshold: IOU threshold to use for matching groundtruth
        boxes to detection boxes.
      evaluate_corlocs: if True, additionally evaluates and returns CorLoc.
      group_of_weight: Weight of group-of boxes. If set to 0, detections of the
        correct class within a group-of box are ignored. If weight is > 0, then
        if at least one detection falls within a group-of box with
        matching_iou_threshold, weight group_of_weight is added to true
        positives. Consequently, if no detection falls within a group-of box,
        weight group_of_weight is added to false negatives.
    """
    if not evaluate_masks:
      metrics_prefix = 'OpenImagesDetectionChallenge'
    else:
      metrics_prefix = 'OpenImagesInstanceSegmentationChallenge'

    super(OpenImagesChallengeEvaluator, self).__init__(
        categories,
        matching_iou_threshold,
        evaluate_masks=evaluate_masks,
        evaluate_corlocs=evaluate_corlocs,
        group_of_weight=group_of_weight,
        metric_prefix=metrics_prefix)

    self._evaluatable_labels = {}
    # Only one of the two has to be provided, but both options are given
    # for compatibility with previous codebase.
    self._expected_keys.update([
        standard_fields.InputDataFields.groundtruth_image_classes,
        standard_fields.InputDataFields.groundtruth_labeled_classes])
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'.
      evaluate_masks: set to true for instance segmentation metric and to false
        for detection metric.
      matching_iou_threshold: IOU threshold to use for matching groundtruth
        boxes to detection boxes.
      evaluate_corlocs: if True, additionally evaluates and returns CorLoc.
      group_of_weight: Weight of group-of boxes. If set to 0, detections of the
        correct class within a group-of box are ignored. If weight is > 0, then
        if at least one detection falls within a group-of box with
        matching_iou_threshold, weight group_of_weight is added to true
        positives. Consequently, if no detection falls within a group-of box,
        weight group_of_weight is added to false negatives.
    
inference_api/src/main/object_detection/utils/object_detection_evaluation.py