class_docstr: Open Images-style evaluation.
  
  Args:
      config: a :class:`OpenImagesEvaluationConfig`
class_docstr_tok: ["Open","Images-style","evaluation",".","Args",":","config",":","a",":","class",":","`","OpenImagesEvaluationConfig","`"]
docstr: Performs Open Images-style evaluation on the given image.
  
  Predicted objects are matched to ground truth objects in descending
  order of confidence, with matches requiring a minimum IoU of
  ``self.config.iou``.
  
  The ``self.config.classwise`` parameter controls whether to only match
  objects with the same class label (True) or allow matches between
  classes (False).
  
  If a ground truth object has its ``self.config.iscrowd`` attribute set,
  then the object can have multiple true positive predictions matched to
  it.
  
  Args:
      sample_or_frame: a :class:`fiftyone.core.sample.Sample` or
          :class:`fiftyone.core.frame.Frame`
      eval_key (None): the evaluation key for this evaluation
  
  Returns:
      a list of matched
      ``(gt_label, pred_label, iou, pred_confidence, gt_id, pred_id)``
      tuples
docstr_tok: ["Performs","Open","Images-style","evaluation","on","the","given","image",".","Predicted","objects","are","matched","to","ground","truth","objects","in","descending","order","of","confidence",",","with","matches","requiring","a","minimum","IoU","of","``","self.config.iou","``",".","The","``","self.config.classwise","``","parameter","controls","whether","to","only","match","objects","with","the","same","class","label","(","True",")","or","allow","matches","between","classes","(","False",")",".","If","a","ground","truth","object","has","its","``","self.config.iscrowd","``","attribute","set",",","then","the","object","can","have","multiple","true","positive","predictions","matched","to","it",".","Args",":","sample_or_frame",":","a",":","class",":","`","fiftyone.core.sample.Sample","`","or",":","class",":","`","fiftyone.core.frame.Frame","`","eval_key","(","None",")",":","the","evaluation","key","for","this","evaluation","Returns",":","a","list","of","matched","``","(","gt_label",",","pred_label",",","iou",",","pred_confidence",",","gt_id",",","pred_id",")","``","tuples"]
code: def evaluate(self, sample_or_frame, eval_key=None):
      """Performs Open Images-style evaluation on the given image.
  
      Predicted objects are matched to ground truth objects in descending
      order of confidence, with matches requiring a minimum IoU of
      ``self.config.iou``.
  
      The ``self.config.classwise`` parameter controls whether to only match
      objects with the same class label (True) or allow matches between
      classes (False).
  
      If a ground truth object has its ``self.config.iscrowd`` attribute set,
      then the object can have multiple true positive predictions matched to
      it.
  
      Args:
          sample_or_frame: a :class:`fiftyone.core.sample.Sample` or
              :class:`fiftyone.core.frame.Frame`
          eval_key (None): the evaluation key for this evaluation
  
      Returns:
          a list of matched
          ``(gt_label, pred_label, iou, pred_confidence, gt_id, pred_id)``
          tuples
      """
      gts = sample_or_frame[self.gt_field]
      preds = sample_or_frame[self.pred_field]
  
      pos_labs = None
      if self.config.pos_label_field:
          pos_labs = sample_or_frame[self.config.pos_label_field]
          if pos_labs is None:
              pos_labs = []
          else:
              pos_labs = [c.label for c in pos_labs.classifications]
              if self.config.expand_gt_hierarchy:
                  pos_labs = _expand_label_hierarchy(
                      pos_labs, self.config
                  )
  
      neg_labs = None
      if self.config.neg_label_field:
          neg_labs = sample_or_frame[self.config.neg_label_field]
          if neg_labs is None:
              neg_labs = []
          else:
              neg_labs = [c.label for c in neg_labs.classifications]
              if self.config.expand_gt_hierarchy:
                  neg_labs = _expand_label_hierarchy(
                      neg_labs, self.config, expand_child=False
                  )
  
      if eval_key is None:
          # Don't save results on user's data
          eval_key = "eval"
          gts = _copy_labels(gts)
          preds = _copy_labels(preds)
  
      return _open_images_evaluation_single_iou(
          gts,
          preds,
          eval_key,
          self.config,
          pos_labs,
          neg_labs,
      )
  
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 2 for calling the OpenImagesEvaluation obj's underlying member method code with example usage: obj.evaluate(sample_or_frame, eval_key) and returns: _open_images_evaluation_single_iou