Skip to content

Threshold Calculation for Image and Pixel Anomalies #1896

Answered by blaz-r
weristeddy asked this question in Q&A
Discussion options

You must be logged in to vote

Hello. Adaptive threshold is calculated using the following class:
https://github.com/openvinotoolkit/anomalib/blob/main/src/anomalib/utils/metrics/anomaly_score_threshold.py#L15
It works by finding a threshold that optimizes the F1 score.

When it comes to image and anomaly thresholds, they are calculated separately:

self.threshold_method: ThresholdMethod
self.image_threshold = AnomalyScoreThreshold().cpu()
self.pixel_threshold = AnomalyScoreThreshold().cpu()

The method is the same, but they differ in data they work on. In case of image threshold, it is calculated on image …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by samet-akcay
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@samet-akcay
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1479 on March 22, 2024 09:24.