hq-deng / RD4AD

Anomaly Detection via Reverse Distillation from One-Class Embedding
MIT License
174 stars 31 forks source link

Some minor corrections in the test.py script #21

Closed Odin-byte closed 4 months ago

Odin-byte commented 1 year ago

In line 143 there is one full stop to much. Change the line from:

test_path = '../mvtec/' + _class_

to:

test_path = './mvtec/' + _class_

In line 144 the standard string when using the provided main.py should be:

ckp_path = './checkpoints/' + 'wres50_'+_class_+'.pth'

At last in line 356 the type should be changed from np.bool to bool:

binary_amaps = np.zeros_like(amaps, dtype=bool)

Thanks for your work. I hope this helps some people searching for the source of some errors when running the program.