GithubHelp home page GithubHelp logo

tagomaru / reconstruction-by-inpainting-for-visual-anomaly-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plutoyuxie/reconstruction-by-inpainting-for-visual-anomaly-detection

0.0 1.0 0.0 790 KB

This is an unofficial implementation of Reconstruction by inpainting for visual anomaly detection (RIAD).

Python 5.62% Jupyter Notebook 94.38%

reconstruction-by-inpainting-for-visual-anomaly-detection's Introduction

Reconstruction by Inpainting for visual Anomaly Detection (RIAD) in PyTorch

This is an unofficial implementation of Reconstruction by inpainting for visual anomaly detection (RIAD).

PipeLine

avatar

Prerequisites

  • PyTorch 1.5
  • sklearn, matplotlib
  • kornia ( incompatible with PyTorch>=1.6.0 so far )
    The kornia package is used for its medianfilter function. You may find a substitution if you want to get rid of this dependency.

Visualization demo of randomly generated mosaic masks

Please check this mosaic.ipynb file

Usage

To train RIAD on MVTec AD dataset:

python train.py --obj zipper --data_path [your-mvtec_ad-data-path]

Then to test:

python test.py --obj zipper --data_path [your-mvtec_ad-data-path] --checkpoint_dir [your-saved-weights-path]

Finally, you will get results like img_ROCAUC (anomaly detection) around 0.97 and pixel_ROCAUC (anomaly segmetation) around 0.98

Localization results

avatar

References

Vitjan Zavrtanik, Matej Kristan, Danijel Skčaj,
Reconstruction by inpainting for visual anomaly detection,
Pattern Recognition,
2020,
107706,
ISSN 0031-3203

Acknowledgement

Thanks for the paper authors.
A big thanks to xiahaifeng1995 for contributing most of the codes.

reconstruction-by-inpainting-for-visual-anomaly-detection's People

Contributors

plutoyuxie avatar xiahaifeng1995 avatar

Watchers

 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.