class_docstr: Open Images-style evaluation config.
  
  Args:
      pred_field: the name of the field containing the predicted
          :class:`fiftyone.core.labels.Detections`,
          :class:`fiftyone.core.labels.Polylines`, or
          :class:`fiftyone.core.labels.Keypoints`
      gt_field: the name of the field containing the ground truth
          :class:`fiftyone.core.labels.Detections`,
          :class:`fiftyone.core.labels.Polylines`, or
          :class:`fiftyone.core.labels.Keypoints`
      iou (None): the IoU threshold to use to determine matches
      classwise (None): whether to only match objects with the same class
          label (True) or allow matches between classes (False)
      iscrowd ("IsGroupOf"): the name of the crowd attribute
      use_masks (False): whether to compute IoUs using the instances masks in
          the ``mask`` attribute of the provided objects, which must be
          :class:`fiftyone.core.labels.Detection` instances
      use_boxes (False): whether to compute IoUs using the bounding boxes
          of the provided :class:`fiftyone.core.labels.Polyline` instances
          rather than using their actual geometries
      tolerance (None): a tolerance, in pixels, when generating approximate
          polylines for instance masks. Typical values are 1-3 pixels
      max_preds (None): the maximum number of predicted objects to evaluate
          when computing mAP and PR curves
      error_level (1): the error level to use when manipulating instance
          masks or polylines. Valid values are:
  
          -   0: raise geometric errors that are encountered
          -   1: log warnings if geometric errors are encountered
          -   2: ignore geometric errors
  
          If ``error_level > 0``, any calculation that raises a geometric
          error will default to an IoU of 0
      hierarchy (None): an optional dict containing a hierachy of classes for
          evaluation following the structure
          ``{"LabelName": label, "Subcategory": [{...}, ...]}``
      pos_label_field (None): the name of a field containing image-level
          :class:`fiftyone.core.labels.Classifications` that specify which
          classes should be evaluated in the image
      neg_label_field (None): the name of a field containing image-level
          :class:`fiftyone.core.labels.Classifications` that specify which
          classes should not be evaluated in the image
      expand_gt_hierarchy (True): whether to expand ground truth objects and
          labels according to the provided ``hierarchy``
      expand_pred_hierarchy (False): whether to expand predicted objects and
          labels according to the provided ``hierarchy``
class_docstr_tok: ["Open","Images-style","evaluation","config",".","Args",":","pred_field",":","the","name","of","the","field","containing","the","predicted",":","class",":","`","fiftyone.core.labels.Detections","`",",",":","class",":","`","fiftyone.core.labels.Polylines","`",",","or",":","class",":","`","fiftyone.core.labels.Keypoints","`","gt_field",":","the","name","of","the","field","containing","the","ground","truth",":","class",":","`","fiftyone.core.labels.Detections","`",",",":","class",":","`","fiftyone.core.labels.Polylines","`",",","or",":","class",":","`","fiftyone.core.labels.Keypoints","`","iou","(","None",")",":","the","IoU","threshold","to","use","to","determine","matches","classwise","(","None",")",":","whether","to","only","match","objects","with","the","same","class","label","(","True",")","or","allow","matches","between","classes","(","False",")","iscrowd","(","``","IsGroupOf","''",")",":","the","name","of","the","crowd","attribute","use_masks","(","False",")",":","whether","to","compute","IoUs","using","the","instances","masks","in","the","``","mask","``","attribute","of","the","provided","objects",",","which","must","be",":","class",":","`","fiftyone.core.labels.Detection","`","instances","use_boxes","(","False",")",":","whether","to","compute","IoUs","using","the","bounding","boxes","of","the","provided",":","class",":","`","fiftyone.core.labels.Polyline","`","instances","rather","than","using","their","actual","geometries","tolerance","(","None",")",":","a","tolerance",",","in","pixels",",","when","generating","approximate","polylines","for","instance","masks",".","Typical","values","are","1-3","pixels","max_preds","(","None",")",":","the","maximum","number","of","predicted","objects","to","evaluate","when","computing","mAP","and","PR","curves","error_level","(","1",")",":","the","error","level","to","use","when","manipulating","instance","masks","or","polylines",".","Valid","values","are",":","-","0",":","raise","geometric","errors","that","are","encountered","-","1",":","log","warnings","if","geometric","errors","are","encountered","-","2",":","ignore","geometric","errors","If","``","error_level",">","0","``",",","any","calculation","that","raises","a","geometric","error","will","default","to","an","IoU","of","0","hierarchy","(","None",")",":","an","optional","dict","containing","a","hierachy","of","classes","for","evaluation","following","the","structure","``","{","``","LabelName","''",":","label",",","``","Subcategory","''",":","[","{","...","}",",","...","]","}","``","pos_label_field","(","None",")",":","the","name","of","a","field","containing","image-level",":","class",":","`","fiftyone.core.labels.Classifications","`","that","specify","which","classes","should","be","evaluated","in","the","image","neg_label_field","(","None",")",":","the","name","of","a","field","containing","image-level",":","class",":","`","fiftyone.core.labels.Classifications","`","that","specify","which","classes","should","not","be","evaluated","in","the","image","expand_gt_hierarchy","(","True",")",":","whether","to","expand","ground","truth","objects","and","labels","according","to","the","provided","``","hierarchy","``","expand_pred_hierarchy","(","False",")",":","whether","to","expand","predicted","objects","and","labels","according","to","the","provided","``","hierarchy","``"]
code: def __init__(
      self,
      pred_field,
      gt_field,
      iou=None,
      classwise=None,
      iscrowd="IsGroupOf",
      use_masks=False,
      use_boxes=False,
      tolerance=None,
      max_preds=None,
      error_level=1,
      hierarchy=None,
      pos_label_field=None,
      neg_label_field=None,
      expand_gt_hierarchy=True,
      expand_pred_hierarchy=False,
      **kwargs,
  ):
      super().__init__(
          pred_field, gt_field, iou=iou, classwise=classwise, **kwargs
      )
  
      self.iscrowd = iscrowd
      self.use_masks = use_masks
      self.use_boxes = use_boxes
      self.tolerance = tolerance
      self.max_preds = max_preds
      self.error_level = error_level
      self.hierarchy = hierarchy
      self.pos_label_field = pos_label_field
      self.neg_label_field = neg_label_field
      self.expand_gt_hierarchy = expand_gt_hierarchy
      self.expand_pred_hierarchy = expand_pred_hierarchy
  
      if expand_pred_hierarchy:
          if not hierarchy:
              self.expand_pred_hierarchy = False
  
          # If expand pred hierarchy is true, so is expand hierarchy
          self.expand_gt_hierarchy = self.expand_pred_hierarchy
  
      if expand_gt_hierarchy and not hierarchy:
          self.expand_gt_hierarchy = False
  
      if self.expand_gt_hierarchy or self.expand_pred_hierarchy:
          (
              self._hierarchy_keyed_parent,
              self._hierarchy_keyed_child,
              _,
          ) = _build_plain_hierarchy(self.hierarchy, skip_root=True)
  
imports: from collections import defaultdict
  from copy import deepcopy
  import numpy
  import fiftyone.core.plots
  import fiftyone.utils.iou
  from .detection import DetectionEvaluation, DetectionEvaluationConfig, DetectionResults
label_desc: Use image node_id 1 to create a new OpenImagesEvaluationConfig object from inherited base classes: DetectionEvaluationConfig with example: obj = OpenImagesEvaluationConfig(pred_field, gt_field, iou, classwise, iscrowd, use_masks, use_boxes, tolerance, max_preds, error_level, hierarchy, pos_label_field, neg_label_field, expand_gt_hierarchy, expand_pred_hierarchy)