-
What is the motivation for this task?Thanks for the useful tools! Describe the solution you'd likeHow can I find the codes that calculate the global anomaly scores for a special model when the classification task.Thank you. Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @Yzp1018, can you elaborate? For example, which model do you want to have a look at? |
Beta Was this translation helpful? Give feedback.
-
It usually depends on the model, but global anomaly scores are handled by where the torch model returns |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! I find the difference of the training results between the original implementation and your anomalib version.But I do not know why.Now I find the reason.Thanks again! |
Beta Was this translation helpful? Give feedback.
If anomaly score isn't separately calculated as part of the model, it is obtained as maximum value of the anomaly map here:
https://github.com/openvinotoolkit/anomalib/blob/df50c0ba150cfefdfe3fd8c745d232b720a281d5/src/anomalib/models/components/base/anomaly_module.py#L186-L193
Regarding the Draem, that is a nice little catch. Draem does in fact contain mean filtering (loccal avgpool) before the max is taken in original implementation. Anomalib version doesn't do that but just takes the max without mean filtering.