anomalib.utils.metrics.optimal_f1¶
Implementation of Optimal F1 score based on TorchMetrics.
Module Contents¶
Classes¶
Optimal F1 Metric. |
- class anomalib.utils.metrics.optimal_f1.OptimalF1(num_classes: int, **kwargs)[source]¶
Bases:
torchmetrics.MetricOptimal F1 Metric.
Compute the optimal F1 score at the adaptive threshold, based on the F1 metric of the true labels and the predicted anomaly scores.