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

Possible typo #8

Closed omergra closed 3 years ago

omergra commented 3 years ago

Hi, In train.py, line 89, you have the code: is_anomaly = np.array([0 if l == 0 else 1 for l in test_labels]) The thing is, that it seems that non-defective (or "good") data gets the label 1 in your code (your first class index in utils.py line 66: class_idx = 1)

Shouldn't the correct code be: [0 if l == 1 else 1 for l in test_labels]?

Thanks, Omer

marco-rudolph commented 3 years ago

Hi,

for me it works as it should. See this line and the following - the 'good' class is assigned to class 0. I just tested it another time and could not reproduce your issue. Can you?

Best regards, Marco