This is an unofficial implementation of Reconstruction by inpainting for visual anomaly detection (RIAD).
This is an unofficial implementation of Reconstruction by inpainting for visual anomaly detection (RIAD).
Please check this mosaic.ipynb file
To train RIAD on MVTec AD
dataset:
python train.py --obj zipper --data_path [your-mvtec_ad-data-path]
Then to test:
python test.py --obj zipper --data_path [your-mvtec_ad-data-path] --checkpoint_dir [your-saved-weights-path]
Finally, you will get results like img_ROCAUC (anomaly detection) around 0.97 and pixel_ROCAUC (anomaly segmetation) around 0.98
Vitjan Zavrtanik, Matej Kristan, Danijel Skčaj,
Reconstruction by inpainting for visual anomaly detection,
Pattern Recognition,
2020,
107706,
ISSN 0031-3203
Thanks for the paper authors.
A big thanks to xiahaifeng1995 for contributing most of the codes.