Extended implementation of PaDiM.
Original paper: PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization
- MVTec AD: Download from MVTec website
- AITEX: Download from AITEX website
- BTAD: Download from AViReS Laboratory website
To train the model, use:
python train.py
To evaluate the model:
python evaluate.py
The option -d
permits to choose the dataset (aitex
, mvtec
, btad
).
In the train file, the datasets will be automatically downloaded.
Python 3.9 with PyTorch 1.9.0. Use the file environment.yml
for the conda environment.
[1] Thomas Defard, Aleksandr Setkov, Angelique Loesch, Romaric Audigier. PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization. https://arxiv.org/pdf/2011.08785
[2] https://github.com/xiahaifeng1995/PaDiM-Anomaly-Detection-Localization-master