Your Question
Hi Anomalib team,
I'm currently using Anomalib v2.1 and the PatchCore model for anomaly detection.
I have two questions regarding the inference process in the Python API:
Saving concatenated (3-in-1) results
During inference, Anomalib generates the concatenated visualization that includes the input image, anomaly map, and overlay result.
Is there a way to control whether this 3-in-1 image is saved when running inference from a Python script (not the CLI)?
For example, can I disable saving or only save specific outputs (e.g., overlay only)?
Mask threshold adjustment
Is there a parameter or function that allows adjusting the threshold used to create the binary anomaly mask from the anomaly score map?
If yes, could you please point me to where this threshold can be configured (e.g., via config file, Inferencer, or direct Python API call)?
Any code snippet or guidance would be greatly appreciated.
Thanks for your help and for maintaining such a great project!
Environment:
Anomalib version: 2.1
Model: PatchCore
Running mode: Python API
Forum Check