All Projects → Choubo → deviation-network-image

Choubo / deviation-network-image

Licence: other
Official PyTorch implementation of the paper “Explainable Deep Few-shot Anomaly Detection with Deviation Networks”, weakly/partially supervised anomaly detection, few-shot anomaly detection, image defect detection.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to deviation-network-image

XGBOD
Supplementary material for IJCNN paper "XGBOD: Improving Supervised Outlier Detection with Unsupervised Representation Learning"
Stars: ✭ 59 (+25.53%)
Mutual labels:  outlier-detection, anomaly-detection
DGFraud-TF2
A Deep Graph-based Toolbox for Fraud Detection in TensorFlow 2.X
Stars: ✭ 84 (+78.72%)
Mutual labels:  outlier-detection, anomaly-detection
deviation-network
Source code of the KDD19 paper "Deep anomaly detection with deviation networks", weakly/partially supervised anomaly detection, few-shot anomaly detection
Stars: ✭ 94 (+100%)
Mutual labels:  outlier-detection, anomaly-detection
drama
Main component extraction for outlier detection
Stars: ✭ 17 (-63.83%)
Mutual labels:  outlier-detection, anomaly-detection
f anogan pytorch
Code for reproducing f-AnoGAN in Pytorch
Stars: ✭ 28 (-40.43%)
Mutual labels:  outlier-detection, anomaly-detection
ADRepository-Anomaly-detection-datasets
ADRepository: Real-world anomaly detection datasets
Stars: ✭ 77 (+63.83%)
Mutual labels:  outlier-detection, anomaly-detection
DCSO
Supplementary material for KDD 2018 workshop "DCSO: Dynamic Combination of Detector Scores for Outlier Ensembles"
Stars: ✭ 20 (-57.45%)
Mutual labels:  outlier-detection, anomaly-detection
outliertree
(Python, R, C++) Explainable outlier/anomaly detection through decision tree conditioning
Stars: ✭ 40 (-14.89%)
Mutual labels:  outlier-detection, anomaly-detection
pytod
TOD: GPU-accelerated Outlier Detection via Tensor Operations
Stars: ✭ 131 (+178.72%)
Mutual labels:  outlier-detection, anomaly-detection
Anomaly Detection Resources
Anomaly detection related books, papers, videos, and toolboxes
Stars: ✭ 5,306 (+11189.36%)
Mutual labels:  outlier-detection, anomaly-detection
Awesome Ts Anomaly Detection
List of tools & datasets for anomaly detection on time-series data.
Stars: ✭ 2,027 (+4212.77%)
Mutual labels:  outlier-detection, anomaly-detection
Pyod
A Python Toolbox for Scalable Outlier Detection (Anomaly Detection)
Stars: ✭ 5,083 (+10714.89%)
Mutual labels:  outlier-detection, anomaly-detection
kenchi
A scikit-learn compatible library for anomaly detection
Stars: ✭ 36 (-23.4%)
Mutual labels:  outlier-detection, anomaly-detection
Hyperspectral-Anomaly-Detection-LSUNRSORAD-and-LSAD-CR-IDW-
This is the code for the paper nemed 'Anomaly Detection for Hyperspectral Imagery Based on the Regularized Subspace Method and Collaborative Representation'
Stars: ✭ 22 (-53.19%)
Mutual labels:  anomaly-detection
ind knn ad
Industrial knn-based anomaly detection for images. Visit streamlit link to check out the demo.
Stars: ✭ 102 (+117.02%)
Mutual labels:  anomaly-detection
anomaly-detection-models
some anomaly detection models and experiments.
Stars: ✭ 19 (-59.57%)
Mutual labels:  anomaly-detection
msda
Library for multi-dimensional, multi-sensor, uni/multivariate time series data analysis, unsupervised feature selection, unsupervised deep anomaly detection, and prototype of explainable AI for anomaly detector
Stars: ✭ 80 (+70.21%)
Mutual labels:  anomaly-detection
coursera-ml-py-sj
No description or website provided.
Stars: ✭ 41 (-12.77%)
Mutual labels:  anomaly-detection
transfertools
Python toolbox for transfer learning.
Stars: ✭ 22 (-53.19%)
Mutual labels:  anomaly-detection
GMRPD
A Ground Mobile Robot Perception Dataset, IEEE RA-L & IEEE T-CYB
Stars: ✭ 30 (-36.17%)
Mutual labels:  anomaly-detection

Explainable Deep Few-shot Anomaly Detection with Deviation Networks

By Guansong Pang, Choubo Ding, Chunhua Shen, Anton van den Hengel

Official PyTorch implementation of "Explainable Deep Few-shot Anomaly Detection with Deviation Networks".

This implementation is for handling image data. For tabular data, the official implementation is available at deviation-network.

Setup

This code is written in Python 3.6 and requires the packages listed in requirements.txt. Install with pip install -r requirements.txt preferably in a virtualenv.

Usage

Step 1. Setup the Anomaly Detection Dataset

Download the Anomaly Detection Dataset and convert it to MVTec AD format. (For datasets we used in the paper, we provided the convert script.) The dataset folder structure should look like:

DATA_PATH/
    subset_1/
        train/
            good/
        test/
            good/
            defect_class_1/
            defect_class_2/
            defect_class_3/
            ...
        ground_truth/
            defect_class_1/
            defect_class_2/
            defect_class_3/
            ...
    ...

NOTE: The ground_truth folder only available when the dataset has pixel-level annotation.

Step 2. Running DevNet

python train.py --dataset_root=./data/mvtec_anomaly_detection \
                --classname=carpet \
                --experiment_dir=./experiment \
                --epochs=50 \
                --n_anomaly=10 \
                --n_scales=2
  • dataset_root denotes the path of the dataset.
  • classname denotes the subset name of the dataset.
  • experiment_dir denotes the path to store the experiment setting and model weight.
  • epochs denotes the total epoch of training.
  • n_anomaly denotes the amount of the know outliers.
  • n_scales denotes the total scales of multi-scales module.

Step 2. Anomaly Explanation

Visualize the localization result of the trained model by the following command:

python localization.py --dataset_root=./data/mvtec_anomaly_detection \
                       --classname=carpet \
                       --experiment_dir=./experiment \
                       --n_anomaly=10 \
                       --n_scales=2

NOTE: use same argument as the training command.

Citation

@article{pang2021explainable,
  title={Explainable Deep Few-shot Anomaly Detection with Deviation Networks},
  author={Pang, Guansong and Ding, Choubo and Shen, Chunhua and Hengel, Anton van den},
  journal={arXiv preprint arXiv:2108.00462},
  year={2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].