tae-mo / CRAD

The official repository of Continuous Memory Representation for Anomaly Detection

Home Page:https://tae-mo.github.io/crad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Continuous Memory Representation for Anomaly Detection (ECCV 2024)

Joo Chan Lee*, Taejune Kim*, Eunbyung Park, Simon S. Woo, Jong Hwan Ko

This repository is the official implementation of Continuous Memory Representation for Anomaly Detection.

Get Started

Environment

Python3.8

Packages:

  • torch==1.12.1
  • torchvision==0.13.1

Requirements

To install requirements:

pip install -r requirements.txt

Data preparation

  1. Download the MVTec AD dataset
  2. Construct the data structure as follows:
|-- data
    |-- MVTec-AD
        |-- mvtec_anomaly_detection
            |--bottle
            |--cable
            |-- ...
        |-- train.json
        |-- test.json

Training

To train the model(s) in the paper, run this command:

cd experiments/
bash train.sh 4 0,1,2,3 1111
# bash train.sh <num gpus> <gpu ids> <master port>

Evaluation

To evaluate a trained model, run:

cd experiments/
bash eval.sh 4 0,1,2,3 1111
# bash eval.sh <num gpus> <gpu ids> <master port>

Results

Our model achieves the following performance on MVTec AD:

Platform GPU Detection AUROC Localization AUROC
torch.distributed.launch 4 GPU (NVIDIA RTX A5000 24 GB) 99.3 97.8

BibTeX

@article{lee2024crad,
title={Continuous Memory Representation for Anomaly Detection},
author={Lee, Joo Chan and Kim, Taejune and Park, Eunbyung and Woo, Simon S. and Ko, Jong Hwan},
journal={arXiv preprint arXiv:2402.18293},
year={2024}
}

About

The official repository of Continuous Memory Representation for Anomaly Detection

https://tae-mo.github.io/crad/


Languages

Language:Python 99.8%Language:Shell 0.2%