Code Monkey home page Code Monkey logo

revisiting-reverse-distillation's Introduction

Revisiting Reverse Distillation for Anomaly Detection (CVPR 2023)

Official code of CVPR 2023 paper: Revisiting Reverse Distillation for Anomaly Detection.

Paper Open In Colab


AFA flowchart

    The paper proposes the RD++ approach for anomaly detection by enriching feature compactness and suppressing anomalous signals through a multi-task learning design. For the feature compactness task, RD++ introduces the self-supervised optimal transport method. For the anomalous signal suppression task, RD++ simulates pseudo-abnormal samples with simplex noise and minimizes the reconstruction loss.
    RD++ achieves a new state-of-the-art benchmark on the challenging MVTec dataset for both anomaly detection and localization. More importantly, when compared to recent SOTA methods, RD++ runs 6.x times faster than PatchCore and 2.x times faster than CFA, while introducing a negligible latency compared to RD.


AFA flowchart

Table of Contents

Libraries

- geomloss
- numba

or (preferably whithin a fresh env to avoid conflicts):

pip install -r requirements.txt

Data Preparations

Download MVTEC dataset from [Link]

Train

To train and test the RD++ method on 15 classes of MVTEC, for example, with two classes: carpet and leather, please run:

python main.py --save_folder RD++  \
               --classes carpet leather

Evaluation

If you only need to perform inference with checkpoints, please run:

python inference.py --checkpoint_folder RD++  \
                    --classes carpet leather

The pretrained weights can be found here [Google Drive]

Quick Experiments

Try the Colab here using Open In Colab

Citation

Please cite our paper if you find it's helpful in your work.

@InProceedings{Tien_2023_CVPR,
    author    = {Tien, Tran Dinh and Nguyen, Anh Tuan and Tran, Nguyen Hoang and Huy, Ta Duc and Duong, Soan T.M. and Nguyen, Chanh D. Tr. and Truong, Steven Q. H.},
    title     = {Revisiting Reverse Distillation for Anomaly Detection},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2023},
    pages     = {24511-24520}
}

Acknowledgement

We use RD as the baseline. Also, we use the Simplex Noise. We are thankful to their brilliant works!

revisiting-reverse-distillation's People

Contributors

tientrandinh avatar tdh512194 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.