Skip to content
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:
https://github.com/openvinotoolkit/anomalib/blob/d7e7d86411d106369e9cca53d8c148cba659493a/src/anomalib/models/components/base/anomaly_module.py#L48-L50
The method is the same, but they differ in data they work on. In case of image threshold, it is calculated on image level predictions (indicating if image is anomalous or not) trying to maximize image level F1. In case of pixe…

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.