Authors: Jinhwan Suk, Jihyeong Jung
git clone https://github.com/vrvrv/Anomaly-detection-using-SBM.git
cd Anomaly-detection-using-SBM
pip install -r requirements.txt
MVTec AD is a dataset for benchmarking anomaly detection methods with a focus on industrial inspection. It contains over 5000 high-resolution images divided into fifteen different object and texture categories.
wget https://www.mydrive.ch/shares/38536/3830184030e49fe74747669442f0f282/download/420938113-1629952094/mvtec_anomaly_detection.tar.xz
tar Jxvf mvtec_anomaly_detection.tar.xz
You can find configuration files at configs/experiment/. Also, we provide pretrained weights from here. Please save the checkpoints at checkpoints/ directory.
In our code, wandb is the default logger. So, before running code, please sign up wandb.
python train.py experiment=capsule_64
The above code starts training from the prescribed checkpoints. If you want to train the model from scratch,
comment out the line resume_from_checkpoint: ...
in YAML
configuration file that you selected.
python test.py experiment=capsule_64
This computes the likelihood and within-image conditional likelihood of test dataset.
Our codes are based on the following references.