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
237 stars 59 forks source link

test score_label Inconsistent when test images Inconsistent in Same image #13

Open montensorrt opened 2 years ago

montensorrt commented 2 years ago

First of all, thank you for presenting your work as open source. When I tested model, I found test score_label changed when test same one image,When the batch_size is not the same, the test result is not the same,I tested 1 image, 2 images, and 3 images in sequence. One of them always exists, but the results are inconsistent in the 3 tests. such as: Batch_size = 1 score_label: [2.193307 2.3324122 2.3044298] score_label: [2.193307 2.3324122] score_label: [2.159736],

When I add an image to the test data, the test result is different from the previous test result, on the same image。 How is this going and How can i modify? Looking forward to hearing from you.

montensorrt commented 2 years ago

When the test batch_size is greater than the number of images, score_label: [2.159736] score_label: [2.1134617 2.0790164] score_label: [2.1982777 2.3371158 2.3093517] We can see that when there is only one image, the result is unchanged

gudovskiy commented 2 years ago

@montensorrt probably, it is because I normalize likelihoods for convenience. Try to remove it