Giter VIP home page Giter VIP logo

anomaly-detection-in-industry-manufacturing's Introduction

Anomaly Detection in Industry Manufacturing

Introduction

Dataset

THE MVTEC ANOMALY DETECTION DATASET (MVTEC AD)

MVTec AD is a dataset for benchmarking anomaly detection methods with a focus on industrial inspection. It contains over 5000 high-resolution images divided into fifteen different object and texture categories. Each category comprises a set of defect-free training images and a test set of images with various kinds of defects as well as images without defects.

Link dataset: https://www.mvtec.com/company/research/datasets/mvtec-ad

Install packages

conda create -n anomaly-detection python=3.8
conda activate anomaly-detection
pip install -r requirements.txt

Flow

Custom dataset

For each new dataset, the data consist of three folders:

  • train, which contains the (defect-free) training images
  • test, which contains the test images
  • ground_truth, which contains the pixel-precise annotations of anomalous regions

Train

python train.py --config "configs/patchcore_grid.yaml" --model "patchcore"

or download pretrained models

bash download_pretrained.sh

Evaluation (Coming soon)

Inference

python script_inference.py --config "configs/patchcore_hazelnut.yaml" --weight "models/patchcore_hazelnut.ckpt" --image "samples/007_hazelnut.png"

or just simple:

python script_inference.py

App

Gradio

python demo.py

Open local URL: http://127.0.0.1:7860

Sample:

Flask

python app.py

Open local URL: http://127.0.0.1:5000

Default account login:

  • Username: aicamp_batch9
  • Password: 123456

Homepage:

Train:

Inference:

Database:

Container

docker build -t anomaly:v1 .
docker run anomaly:v1

or just simple

docker-compose up

Deploy AWS

First: Create EC2 instance

Second: git clone and install related packages

git clone https://github.com/vnk8071/anomaly-detection-in-industry-manufacturing.git

sh download_pretrained.sh

Next: install Miniconda and Docker engine

docker-compose up

Final: access link http://user-IPv4-public-ec2-aws

anomaly-detection-in-industry-manufacturing's People

Contributors

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