class documentation

Class that stores the results of a COCO detection evaluation.

Parameters
samplesthe fiftyone.core.collections.SampleCollection used
configthe COCOEvaluationConfig used
eval_keythe evaluation key
matchesa list of (gt_label, pred_label, iou, pred_confidence, gt_id, pred_id) matches. Either label can be None to indicate an unmatched object
precisionan array of precision values of shape num_iou_threshs x num_classes x num_recall
recallan array of recall values
iou_threshsan array of IoU thresholds
classesthe list of possible classes
recall_sweepan array of recall values of shape num_iou x num_classes
thresholdsan optional array of decision thresholds of shape num_iou_threshs x num_classes x num_recall
missinga missing label string. Any unmatched objects are given this label for evaluation purposes
custom_metricsan optional dict of custom metrics
backenda COCOEvaluation backend
Method __init__ Undocumented
Method mAP Computes COCO-style mean average precision (mAP) for the specified classes.
Method mAR Computes COCO-style mean average recall (mAR) for the specified classes.
Method plot_pr_curves Plots precision-recall (PR) curves for the results.
Instance Variable iou_threshs Undocumented
Instance Variable precision Undocumented
Instance Variable recall Undocumented
Instance Variable recall_sweep Undocumented
Instance Variable thresholds Undocumented
Class Method _from_dict Subclass implementation of from_dict.
Method _get_class_index Undocumented
Method _get_iou_thresh_inds Undocumented
Instance Variable _classwise_AP Undocumented
Instance Variable _classwise_AR Undocumented

Inherited from DetectionResults:

Instance Variable ious Undocumented

Inherited from BaseClassificationResults (via DetectionResults):

Method confusion_matrix Generates a confusion matrix for the results via sklearn:sklearn.metrics.confusion_matrix.
Method metrics Computes classification metrics for the results, including accuracy, precision, recall, and F-beta score.
Method plot_confusion_matrix Plots a confusion matrix for the evaluation results.
Method print_metrics Prints the metrics computed via metrics.
Method print_report Prints a classification report for the results via sklearn:sklearn.metrics.classification_report.
Method report Generates a classification report for the results via sklearn:sklearn.metrics.classification_report.
Instance Variable confs Undocumented
Instance Variable weights Undocumented
Instance Variable ypred Undocumented
Instance Variable ypred_ids Undocumented
Instance Variable ytrue Undocumented
Instance Variable ytrue_ids Undocumented
Method _confusion_matrix Undocumented
Method _parse_classes Undocumented

Inherited from BaseEvaluationResults (via DetectionResults, BaseClassificationResults):

Method _get_custom_metrics Undocumented
Method _print_metrics Undocumented

Inherited from BaseRunResults (via DetectionResults, BaseClassificationResults, BaseEvaluationResults, EvaluationResults):

Class Method from_dict Builds a BaseRunResults from a JSON dict representation of it.
Static Method base_results_cls Returns the results class for the given run type.
Method attributes Returns the list of class attributes that will be serialized by serialize.
Method save Saves the results to the database.
Method save_config Saves these results config to the database.
Property cls The fully-qualified name of this BaseRunResults class.
Property config The BaseRunConfig for these results.
Property key The run key for these results.
Property samples The fiftyone.core.collections.SampleCollection associated with these results.
Instance Variable _backend Undocumented
Instance Variable _config Undocumented
Instance Variable _key Undocumented
Instance Variable _samples Undocumented
def __init__(self, samples, config, eval_key, matches, precision, recall, iou_threshs, classes, recall_sweep=None, thresholds=None, missing=None, custom_metrics=None, backend=None): (source)
def mAP(self, classes=None): (source)

Computes COCO-style mean average precision (mAP) for the specified classes.

See this page for more details about COCO-style mAP.

Parameters
classes:Nonea list of classes for which to compute mAP
Returns
the mAP in [0, 1]
def mAR(self, classes=None): (source)

Computes COCO-style mean average recall (mAR) for the specified classes.

See this page for more details about COCO-style mAR.

Parameters
classes:Nonea list of classes for which to compute mAR
Returns
the mAR in [0, 1]
def plot_pr_curves(self, classes=None, iou_thresh=None, backend='plotly', **kwargs): (source)

Plots precision-recall (PR) curves for the results.

Parameters
classes:Nonea list of classes to generate curves for. By default, the top 3 AP classes will be plotted
iou_thresh:Nonean optional IoU threshold or list of IoU thresholds for which to plot curves. If multiple thresholds are provided, precision data is averaged across these thresholds. By default, precision data is averaged over all IoU thresholds. Refer to iou_threshs to see the available thresholds
backend:"plotly"the plotting backend to use. Supported values are ("plotly", "matplotlib")
**kwargs

keyword arguments for the backend plotting method:

Returns
one of the following
iou_threshs = (source)

Undocumented

precision = (source)

Undocumented

Undocumented

recall_sweep: None = (source)

Undocumented

thresholds: None = (source)

Undocumented

@classmethod
def _from_dict(cls, d, samples, config, eval_key, **kwargs): (source)

Subclass implementation of from_dict.

Parameters
da JSON dict
samplesthe fiftyone.core.collections.SampleCollection for the run
configthe BaseRunConfig for the run
eval_keyUndocumented
keythe run key
**kwargsUndocumented
Returns
a BaseRunResults
def _get_class_index(self, label): (source)

Undocumented

def _get_iou_thresh_inds(self, iou_thresh=None): (source)

Undocumented

_classwise_AP = (source)

Undocumented

_classwise_AR = (source)

Undocumented