This repo contains the official implementation of Dynamic Addition of Noise in a Diffusion Model for Anomaly Detection
Install dependencies:
pip install -r requirements.txt
For consistency decoder:
$ pip install git+https://github.com/openai/consistencydecoder.git
Create folder structure for model checkpoints and results like:
checkpoints
|--- VisA
|--- BTAD
|--- MVTec
results
|--- category_name
Data:
MVTec can be used as is.
For VisA please structure like:
VisA_pytorch
|--- candle
|-----|----- ground_truth
|-----|----- test
|-----|-------|------- good
|-----|-------|------- bad
|-----|----- train
|-----|-------|------- good
|--- capsules
|--- ...
For training of the model run:
python main.py
For evaluating model performance run:
python main.py --eval True
@InProceedings{Tebbe_2024_CVPR,
author = {Tebbe, Justin and Tayyub, Jawad},
title = {Dynamic Addition of Noise in a Diffusion Model for Anomaly Detection},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2024},
pages = {3940-3949}
}