marco-rudolph / cs-flow

This is the official repository to the WACV 2022 paper "Fully Convolutional Cross-Scale-Flows for Image-based Defect Detection" by Marco Rudolph, Tom Wehrbein, Bodo Rosenhahn and Bastian Wandt.
111 stars 30 forks source link

Possible mistake in the likelihood_grouped calculation #10

Closed ira7bar closed 2 years ago

ira7bar commented 2 years ago

In line 177 of evaluate.py, the mean is calculated and then divided by the number of channels. Before the division the values are similar to the anomaly score (nll_score) and make sense. Perhaps the division is not needed as the mean operation already includes division by the number of channels?

This does not affect the visualization, as the heatmap is normalized anyway by the plotting function, but maybe good to fix it for other purposes and for correctness.

marco-rudolph commented 2 years ago

Thank you. It is fixed with the latest commit.