anomalib.utils.metrics.adaptive_threshold¶
Implementation of Optimal F1 score based on TorchMetrics.
Module Contents¶
Classes¶
Optimal F1 Metric. |
- class anomalib.utils.metrics.adaptive_threshold.AdaptiveThreshold(default_value: float = 0.5, **kwargs)[source]¶
Bases:
torchmetrics.PrecisionRecallCurveOptimal 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.