Skip to content
Discussion options

You must be logged in to vote

Each model in anomalib generates a prediction by using the PostProcessor.

So in your case, instead of calculating the threshold based on F1 (this is done internally by using F1AdaptiveThreshold), you could:

Turn off post-processing

from anomalib.models import Padim

model = Padim(post_processor=False)

This would generate an "anomaly map" which you can do any custom normalisation, thresholding or processing you want.

Change PostProcessor Args

The PostProcessor has some args you can change.

As an example you could keep the normalisation of the PostProcessor but turn off the thresholding.

from anomalib.models import Padim
from anomalib.post_processing import PostProcessor

post_processor = P…

Replies: 2 comments

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2641 on June 30, 2025 14:32.