Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
169 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

FastFlow: Unsupervised Anomaly Detection and Localization via 2D Normalizing Flows (2111.07677v2)

Published 15 Nov 2021 in cs.CV

Abstract: Unsupervised anomaly detection and localization is crucial to the practical application when collecting and labeling sufficient anomaly data is infeasible. Most existing representation-based approaches extract normal image features with a deep convolutional neural network and characterize the corresponding distribution through non-parametric distribution estimation methods. The anomaly score is calculated by measuring the distance between the feature of the test image and the estimated distribution. However, current methods can not effectively map image features to a tractable base distribution and ignore the relationship between local and global features which are important to identify anomalies. To this end, we propose FastFlow implemented with 2D normalizing flows and use it as the probability distribution estimator. Our FastFlow can be used as a plug-in module with arbitrary deep feature extractors such as ResNet and vision transformer for unsupervised anomaly detection and localization. In training phase, FastFlow learns to transform the input visual feature into a tractable distribution and obtains the likelihood to recognize anomalies in inference phase. Extensive experimental results on the MVTec AD dataset show that FastFlow surpasses previous state-of-the-art methods in terms of accuracy and inference efficiency with various backbone networks. Our approach achieves 99.4% AUC in anomaly detection with high inference efficiency.

Citations (264)

Summary

  • The paper introduces FastFlow, which uses a 2D normalizing flow to map normal image features into a standard distribution for effective anomaly detection and localization.
  • The paper employs a lightweight network with alternating convolution kernels to significantly boost inference efficiency while maintaining precision.
  • The approach integrates with various deep feature extractors, achieving 99.4% AUC on MVTec AD and demonstrating robust performance across multiple datasets.

Overview of FastFlow: Unsupervised Anomaly Detection and Localization via 2D Normalizing Flows

The paper presents FastFlow, a novel methodology centered on unsupervised anomaly detection and localization using 2D normalizing flows. This approach addresses key challenges in visual anomaly detection, especially when labeled anomaly data is insufficient or unavailable for supervised learning. The authors argue that traditional representation-based methods, which leverage deep CNNs and non-parametric distribution estimations, fall short in effectively mapping image features to a tractable base distribution. They also highlight that these methods often overlook the critical relationship between local and global image features, vital for discerning anomalies.

FastFlow aims to overcome these limitations through a plug-in module that operates with various deep feature extractors like ResNet and vision transformers. The core of FastFlow is a 2D normalizing flow used to estimate the feature distribution of normal images, transforming them into a standard normal distribution during training and leveraging likelihood evaluations to detect anomalies during inference. Notably, FastFlow supports end-to-end inference, delivering both anomaly detection and localization efficiently in contrast to the high complexity inference methods used by existing solutions.

The method demonstrated significant accuracy and efficiency improvements on the MVTec AD dataset, outperforming prior state-of-the-art models with an impressive 99.4% AUC in anomaly detection. This performance is attributed to FastFlow's efficient handling of visual features through a lightweight convolutional network design that alternates between larger and smaller convolution kernels.

Key Contributions

  1. 2D Normalizing Flow Model: FastFlow leverages a 2D normalizing flow, enabling effective modeling of both global and local feature distributions. This model uses fully convolutional networks to maintain spatial positional relationships, crucial for image features during distribution transformation.
  2. Lightweight Network Structure: The proposed model efficiently uses a combination of large and small convolution kernels organized in an alternating stack. This design promotes high inference efficiency and maintains robust anomaly detection capabilities.
  3. Versatility Across Feature Extractors: FastFlow's adaptability to various deep feature extractors allows it to be employed as a modular plug-in, ensuring broad applicability and robust anomaly detection performance across different architectures, including CNNs and vision transformers.

Experimental Results

The experiments conducted on the MVTec AD dataset underscored FastFlow's superiority over existing methods, benchmarked by both accuracy and inference speed. Unlike other methods, such as PatchCore or CFLOW, which have greater computational overhead during inference phase due to methods like slice windows or k-nearest neighbors, FastFlow boasts significant reductions in additional inference time and parameter count, enhancing its practical usability. Additional tests on the BTAD and CIFAR-10 datasets further validate FastFlow’s adaptability and high performance across datasets characterized by both subtle and semantic anomalies.

Implications and Future Directions

FastFlow represents a significant step forward in unsupervised anomaly detection and localization, offering a method that combines accuracy with efficiency—key priorities for deploying AI models in practical, resource-constrained environments. Its architecture redefines how spatial and distributional features are learned, providing a robust framework applicable to various image-based anomaly detection contexts.

Looking ahead, the implications of FastFlow's approach suggest potential avenues for improving models that require dense perceptual understanding of scenes and objects, such as autonomous driving systems and advanced industrial inspection applications. Additionally, adopting the 2D normalizing flow model could significantly enhance future AI systems' capabilities in achieving real-time anomaly detection and localization, particularly in settings where fast and reliable performance is critical.

In conclusion, the FastFlow framework offers a promising direction for advancing unsupervised learning methods in computer vision, paving the way for further exploration and integration of normalizing flows within broader AI domain applications.