gudovskiy / cflow-ad

Official PyTorch code for WACV 2022 paper "CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows"
https://arxiv.org/abs/2107.12571
BSD 3-Clause "New" or "Revised" License
243 stars 61 forks source link

Calculate detection AUROC #22

Closed jpmrs1313 closed 2 years ago

jpmrs1313 commented 2 years ago

In the line 334 of train file, the detection AUROC is calculated using truth label and score label. Why the truth label is bolean and score label is a float? Im trying to replicate using the leather class and the score label values are between [0.97,2.7].

gudovskiy commented 2 years ago

@jpmrs1313 it is the nature of auroc and other threshold-agnostic metrics. In your binary case, you can normalize [0.97, 2.7] to [0,1]