anomalib.utils.metrics.anomaly_score_distribution

Module that computes the parameters of the normal data distribution of the training set.

Module Contents

Classes

AnomalyScoreDistribution

Mean and standard deviation of the anomaly scores of normal training data.

class anomalib.utils.metrics.anomaly_score_distribution.AnomalyScoreDistribution(**kwargs)[source]

Bases: torchmetrics.Metric

Mean and standard deviation of the anomaly scores of normal training data.

update(self, anomaly_scores: Optional[torch.Tensor] = None, anomaly_maps: Optional[torch.Tensor] = None) None[source]

Update the precision-recall curve metric.

compute(self) Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor][source]

Compute stats.