CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows

Denis Gudovskiy, Shun Ishizaka, Kazuki Kozuka
7/27/2021
cs.CVcs.AIcs.LG

Official code: gudovskiy/cflow-ad (271 stars, BSD-3-Clause, last commit 2023-08-18).

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.

View on arXivView PDF

Code Implementations(1)

gudovskiy/cflow-adOfficial100%
BSD-3-Clause

Official PyTorch code for WACV 2022 paper "CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows"

27168PythonJul 27, 20213 years agoBSD-3-Clause
anomalydetectionmvtecmvtec-adnormalizing-flows+1 more

Cite this paper

@article{gudovskiy2021cflowad,
  title  = {CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows},
  author = {Denis Gudovskiy and Shun Ishizaka and Kazuki Kozuka},
  year   = {2021},
  eprint = {2107.12571},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2107.12571}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2107.12571.svg)](https://codeofpaper.com/paper/2107.12571)

Discussion