Skip to content
Discussion options

You must be logged in to vote

you have to save the return of your model call in a variable. then you can access its content. For Padim, the anomaly score is the max of the anomaly map.

In this case the pred_score is calculated as follows:
https://github.com/openvinotoolkit/anomalib/blob/4459c2b9e90321ccdd8a7820f15b8e367e884a9e/src/anomalib/deploy/inferencers/torch_inferencer.py#L212-L215

You also might want to post process the map and the score. Please see the torch inference for details:
https://github.com/openvinotoolkit/anomalib/blob/4459c2b9e90321ccdd8a7820f15b8e367e884a9e/src/anomalib/deploy/inferencers/torch_inferencer.py#L246-L259

output =  model(tensor_image)
anomaly_map = output["anomaly_map"].detach().cpu().…

Replies: 6 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@alexriedel1
Comment options

@semaegrii
Comment options

@alexriedel1
Comment options

Answer selected by semaegrii
@semaegrii
Comment options

Comment options

You must be logged in to vote
1 reply
@alexriedel1
Comment options

Comment options

You must be logged in to vote
2 replies
@alexriedel1
Comment options

@semaegrii
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
3 participants