Skip to content
Discussion options

You must be logged in to vote

It's hard to tell what is in /home/sjx/project/LogSAD/evaluation.py, but I suspect that you are not using Anomalib's Batch object.

You have two options:

  • You could follow @rajeshgangireddy's suggestion in #2737
  • Alternatively, you could use the _F1Max class that does not need Batch but just uses torch.Tensor. Something like the following:

class _F1Max(Metric):
"""F1Max metric for computing the maximum F1 score.
This class calculates the maximum F1 score by varying the classification
threshold. The F1 score is the harmonic mean of precision and recall,
providing a balanced metric fo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by samet-akcay
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 #2670 on June 12, 2025 08:36.