marco-rudolph / differnet

This is the official repository to the WACV 2021 paper "Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flows" by Marco Rudolph, Bastian Wandt and Bodo Rosenhahn.
215 stars 67 forks source link

test on the good sample of dummy_dataset #2

Closed lihyin closed 4 years ago

lihyin commented 4 years ago

Capture

Tried to test the false alarm by using the good sample. It lable the square as anomaly as well. Is it normal as expected?

marco-rudolph commented 4 years ago

The colormap is normed for every single sample so that the maximum gradient value for every sample appears yellow. See 'save_imgs' in localization.py: normed_grad = (grad[g] - np.min(grad[g])) / (np.max(grad[g]) - np.min(grad[g])) A common normalization of the gradients should lead to different intensities for anomalies and good samples. Then a common setting of vmin and vmax in plt.imshow should do the trick.