Skip to content

JustinTebbe/Dynamic-noise-AD

Repository files navigation

Dynamic Addition of Noise in a Diffusion Model for Anomaly Detection

D3AD This repo contains the official implementation of Dynamic Addition of Noise in a Diffusion Model for Anomaly Detection

Setup

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
|--- ...

Run the model

For training of the model run:

python main.py

For evaluating model performance run:

python main.py --eval True

Citation

@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}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages