mirror of
https://github.com/gudovskiy/cflow-ad.git
synced 2025-06-03 14:59:47 +08:00
added arXiv link
This commit is contained in:
parent
6a520d5eeb
commit
0cbf0b59ea
@ -1,16 +1,16 @@
|
||||
## CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows
|
||||
WACV 2022 preprint:[https://arxiv.org/abs/????.?????](https://arxiv.org/abs/????.?????)
|
||||
WACV 2022 preprint:[https://arxiv.org/abs/2107.12571](https://arxiv.org/abs/2107.12571)
|
||||
|
||||
## Abstract
|
||||
Unsupervised anomaly detection with localization has many practical applications when labeling is infeasible and, moreover, when anomaly examples are completely missing in the train data. While recently proposed models for such data setup achieve high accuracy metrics, their complexity is a limiting factor for real-time processing. In this paper, we propose a real-time model and analytically derive its relationship to prior methods. Our CFLOW-AD model is based on a conditional normalizing flow framework adopted for anomaly detection with localization. In particular, CFLOW-AD consists of a discriminatively pretrained encoder followed by a multi-scale generative decoders where the latter explicitly estimate likelihood of the encoded features. Our approach results in a computationally and memory-efficient model: CFLOW-AD is faster and smaller by a factor of 10x than prior state-of-the-art with the same input setting. Our experiments on the MVTec dataset show that CFLOW-AD outperforms previous methods by 0.36% AUROC in detection task, by 1.12% AUROC and 2.5% AUPRO in localization task, respectively. We open-source our code with fully reproducible experiments.
|
||||
|
||||
## BibTex Citation
|
||||
If you like our [paper](https://arxiv.org/abs/????.?????) or code, please cite its WACV 2022 preprint using the following BibTex:
|
||||
If you like our [paper](https://arxiv.org/abs/2107.12571) or code, please cite its WACV 2022 preprint using the following BibTex:
|
||||
```
|
||||
@article{cflow_ad,
|
||||
title={CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows},
|
||||
author={Gudovskiy, Denis and Ishizaka, Shun and Kozuka, Kazuki and Tsukizawa, Sotaro},
|
||||
journal={arXiv:????.?????},
|
||||
journal={arXiv:2107.12571},
|
||||
year={2021}
|
||||
}
|
||||
```
|
||||
@ -27,7 +27,7 @@ $ python3 -m pip install -U -r requirements.txt
|
||||
```
|
||||
|
||||
## Datasets
|
||||
We support [MVTec AD dataset](https://www.mvtec.com/de/unternehmen/forschung/datasets/mvtec-ad/) for anomaly localization in factory setting and [Shanghai Tech Campus (STC)](https://svip-lab.github.io/dataset/campus_dataset.html) dataset with surveillance camera videos. Please, download dataset from URLs and extract to 'data' folder.
|
||||
We support [MVTec AD dataset](https://www.mvtec.com/de/unternehmen/forschung/datasets/mvtec-ad/) for anomaly localization in factory setting and [Shanghai Tech Campus (STC)](https://svip-lab.github.io/dataset/campus_dataset.html) dataset with surveillance camera videos. Please, download dataset from URLs and extract to *data* folder or make symlink to that folder or [change default data path in main.py](https://github.com/gudovskiy/cflow-ad/blob/6a520d5eeb60e7df99a644f31836fb5cf7ffbfde/main.py#L48)).
|
||||
|
||||
## Code Organization
|
||||
- ./custom_datasets - contains dataloaders for MVTec and STC
|
||||
|
@ -13,7 +13,7 @@ def get_args():
|
||||
parser.add_argument('-cl', '--class-name', default='none', type=str, metavar='C',
|
||||
help='class name for MVTec/STC (default: none)')
|
||||
parser.add_argument('-enc', '--enc-arch', default='wide_resnet50_2', type=str, metavar='A',
|
||||
help='feature extractor architecture (default: wide_resnet50_2)')
|
||||
help='feature extractor: wide_resnet50_2/resnet18/mobilenet_v3_large (default: wide_resnet50_2)')
|
||||
parser.add_argument('-dec', '--dec-arch', default='freia-cflow', type=str, metavar='A',
|
||||
help='normalizing flow model (default: freia-cflow)')
|
||||
parser.add_argument('-pl', '--pool-layers', default=3, type=int, metavar='L',
|
||||
|
@ -9,20 +9,18 @@ def get_args():
|
||||
parser = argparse.ArgumentParser(description='CFLOW-AD')
|
||||
parser.add_argument('--dataset', default='mvtec', type=str, metavar='D',
|
||||
help='dataset name: mvtec/stc/video (default: mvtec)')
|
||||
parser.add_argument('-cl', '--class-name', default='none', type=str, metavar='C',
|
||||
help='class name for MVTec/STC (default: none)')
|
||||
parser.add_argument('-enc', '--enc-arch', default='resnet18', type=str, metavar='A',
|
||||
help='feature extractor architecture (default: resnet18)')
|
||||
parser.add_argument('-enc', '--enc-arch', default='wide_resnet50_2', type=str, metavar='A',
|
||||
help='feature extractor: wide_resnet50_2/resnet18/mobilenet_v3_large (default: wide_resnet50_2)')
|
||||
parser.add_argument('-dec', '--dec-arch', default='freia-cflow', type=str, metavar='A',
|
||||
help='normalizing flow model (default: freia-cflow)')
|
||||
parser.add_argument('-pl', '--pool-layers', default=2, type=int, metavar='L',
|
||||
help='number of layers used in NF model (default: 2)')
|
||||
parser.add_argument('-pl', '--pool-layers', default=3, type=int, metavar='L',
|
||||
help='number of layers used in NF model (default: 3)')
|
||||
parser.add_argument('-cb', '--coupling-blocks', default=8, type=int, metavar='L',
|
||||
help='number of layers used in NF model (default: 8)')
|
||||
parser.add_argument('-runs', '--run-count', default=4, type=int, metavar='C',
|
||||
help='number of runs (default: 4)')
|
||||
parser.add_argument('-inp', '--input-size', default=256, type=int, metavar='C',
|
||||
help='image resize dimensions (default: 256)')
|
||||
parser.add_argument('-inp', '--input-size', default=512, type=int, metavar='C',
|
||||
help='image resize dimensions (default: 512)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user