class_docstr: COCO-style evaluation.
  
  Args:
      config: a :class:`COCOEvaluationConfig`
class_docstr_tok: ["COCO-style","evaluation",".","Args",":","config",":","a",":","class",":","`","COCOEvaluationConfig","`"]
docstr: Performs COCO-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","COCO-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 COCO-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]
  
      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 _coco_evaluation_single_iou(
          gts, preds, eval_key, self.config
      )
  
imports: import logging
  from collections import defaultdict
  import numpy
  import eta.core.utils
  import fiftyone.core.plots
  import fiftyone.utils.iou
  from .detection import DetectionEvaluation, DetectionEvaluationConfig, DetectionResults
label_desc: Use image node_id 2 for calling the COCOEvaluation obj's underlying member method code with example usage: obj.evaluate(sample_or_frame, eval_key) and returns: _coco_evaluation_single_iou