U-Flow: A U-shaped Normalizing Flow for Anomaly Detection with Unsupervised Threshold

Read original: arXiv:2211.12353 - Published 5/28/2024 by Mat'ias Tailanian, 'Alvaro Pardo, Pablo Mus'e
Total Score

0

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • Proposes a one-class self-supervised method for anomaly segmentation in images
  • Combines modern machine learning approaches with classic statistical detection theory
  • Consists of four main phases: feature extraction, normalization flow, anomaly mapping, and segmentation

Plain English Explanation

This research paper introduces a new approach for detecting and segmenting anomalies in images. Anomalies are things that are unusual or different from the norm, like a crack in a wall or a foreign object in an industrial setting. The method they propose has four key steps:

  1. Feature Extraction: First, they use a multi-scale image Transformer architecture to extract important visual features from the images.

  2. Normalization Flow: These features are then fed into a U-shaped Normalizing Flow (NF) model. This lays the statistical foundation for the subsequent steps.

  3. Anomaly Mapping: The NF model is used to create a pixel-level "anomaly map" that highlights areas of the image that are unusual or different from the norm.

  4. Segmentation: Finally, they use the a contrario framework to perform a robust, unsupervised segmentation of the anomalous regions in the image.

The key advantage of this approach is that it combines modern machine learning techniques with more classic statistical methods, allowing it to produce state-of-the-art results for anomaly detection and segmentation across a variety of datasets. This could have important applications in areas like quality control, medical imaging, and autonomous systems.

Technical Explanation

The proposed method consists of four main phases:

  1. Feature Extraction: The authors use a multi-scale image Transformer architecture to extract rich visual features from the input images. This captures information at multiple scales to better represent the structure and content of the images.

  2. Normalization Flow: The extracted features are then fed into a U-shaped Normalizing Flow (NF) model. NFs are a type of generative model that can learn the underlying distribution of the normal, non-anomalous data. This provides the statistical foundation for the subsequent anomaly detection and segmentation steps.

  3. Anomaly Mapping: The NF model is used to compute a pixel-level anomaly map, which highlights regions of the image that are unusual or different from the learned distribution of normal data. This anomaly map is a key output of the method.

  4. Segmentation: Finally, the authors use the a contrario framework to perform a robust, unsupervised segmentation of the anomalous regions in the image. This framework allows them to derive stable, unsupervised detection thresholds, which is crucial for real-world applications where an operational point is needed.

The authors evaluate their method using several standard anomaly segmentation metrics, including mean Intersection over Union (mIoU) and the Area Under the Receiver Operating Characteristic curve (AUROC). They also introduce a new metric, the Area Under the Per-Region-Overlap curve (AUPRO), to better assess the quality of the generated anomaly maps. Extensive experiments across various datasets show that their approach outperforms state-of-the-art methods for all metrics and datasets, ranking first in most categories of the MVTec-AD benchmark.

Critical Analysis

The authors have made a compelling contribution to the field of anomaly segmentation by combining modern machine learning techniques with more classic statistical methods. Their use of a multi-scale Transformer architecture for feature extraction and a Normalizing Flow model for anomaly mapping are novel and effective approaches.

One potential limitation of the work is that it is primarily focused on 2D image data. While the authors mention that the method could be extended to 3D data, such as point clouds or video, the paper does not provide details on how this could be achieved. Extending the method to handle 3D and temporal data could further broaden its applicability.

Additionally, while the authors demonstrate state-of-the-art results on several benchmark datasets, it would be valuable to see how the method performs on real-world industrial or medical imaging applications, where the distribution of normal and anomalous data may be more complex and challenging.

Overall, this research represents a significant advancement in the field of anomaly segmentation and could have important implications for a wide range of applications, from quality control to medical diagnosis. The authors have provided a strong foundation for future work in this area.

Conclusion

This paper presents a novel one-class self-supervised method for anomaly segmentation in images that combines modern machine learning approaches with classic statistical detection theory. The key steps of the method include feature extraction using a multi-scale Transformer, normalization flow modeling, anomaly mapping, and robust unsupervised segmentation. Extensive experiments demonstrate state-of-the-art results across various benchmark datasets, highlighting the potential of this approach for real-world applications in areas such as quality control, medical imaging, and autonomous systems.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

Total Score

0

U-Flow: A U-shaped Normalizing Flow for Anomaly Detection with Unsupervised Threshold

Mat'ias Tailanian, 'Alvaro Pardo, Pablo Mus'e

In this work we propose a one-class self-supervised method for anomaly segmentation in images that benefits both from a modern machine learning approach and a more classic statistical detection theory. The method consists of four phases. First, features are extracted using a multi-scale image Transformer architecture. Then, these features are fed into a U-shaped Normalizing Flow (NF) that lays the theoretical foundations for the subsequent phases. The third phase computes a pixel-level anomaly map from the NF embedding, and the last phase performs a segmentation based on the a contrario framework. This multiple hypothesis testing strategy permits the derivation of robust unsupervised detection thresholds, which are crucial in real-world applications where an operational point is needed. The segmentation results are evaluated using the Mean Intersection over Union (mIoU) metric, and for assessing the generated anomaly maps we report the area under the Receiver Operating Characteristic curve (AUROC), as well as the Area Under the Per-Region-Overlap curve (AUPRO). Extensive experimentation in various datasets shows that the proposed approach produces state-of-the-art results for all metrics and all datasets, ranking first in most MVTec-AD categories, with a mean pixel-level AUROC of 98.74%. Code and trained models are available at https:// github.com/mtailanian/uflow.

Read more

5/28/2024

Hierarchical Gaussian Mixture Normalizing Flow Modeling for Unified Anomaly Detection
Total Score

0

Hierarchical Gaussian Mixture Normalizing Flow Modeling for Unified Anomaly Detection

Xincheng Yao, Ruoqi Li, Zefeng Qian, Lu Wang, Chongyang Zhang

Unified anomaly detection (AD) is one of the most challenges for anomaly detection, where one unified model is trained with normal samples from multiple classes with the objective to detect anomalies in these classes. For such a challenging task, popular normalizing flow (NF) based AD methods may fall into a homogeneous mapping issue,where the NF-based AD models are biased to generate similar latent representations for both normal and abnormal features, and thereby lead to a high missing rate of anomalies. In this paper, we propose a novel Hierarchical Gaussian mixture normalizing flow modeling method for accomplishing unified Anomaly Detection, which we call HGAD. Our HGAD consists of two key components: inter-class Gaussian mixture modeling and intra-class mixed class centers learning. Compared to the previous NF-based AD methods, the hierarchical Gaussian mixture modeling approach can bring stronger representation capability to the latent space of normalizing flows, so that even complex multi-class distribution can be well represented and learned in the latent space. In this way, we can avoid mapping different class distributions into the same single Gaussian prior, thus effectively avoiding or mitigating the homogeneous mapping issue. We further indicate that the more distinguishable different class centers, the more conducive to avoiding the bias issue. Thus, we further propose a mutual information maximization loss for better structuring the latent feature space. We evaluate our method on four real-world AD benchmarks, where we can significantly improve the previous NF-based AD methods and also outperform the SOTA unified AD methods.

Read more

7/8/2024

Total Score

0

Feature Density Estimation for Out-of-Distribution Detection via Normalizing Flows

Evan D. Cook, Marc-Antoine Lavoie, Steven L. Waslander

Out-of-distribution (OOD) detection is a critical task for safe deployment of learning systems in the open world setting. In this work, we investigate the use of feature density estimation via normalizing flows for OOD detection and present a fully unsupervised approach which requires no exposure to OOD data, avoiding researcher bias in OOD sample selection. This is a post-hoc method which can be applied to any pretrained model, and involves training a lightweight auxiliary normalizing flow model to perform the out-of-distribution detection via density thresholding. Experiments on OOD detection in image classification show strong results for far-OOD data detection with only a single epoch of flow training, including 98.2% AUROC for ImageNet-1k vs. Textures, which exceeds the state of the art by 7.8%. We additionally explore the connection between the feature space distribution of the pretrained model and the performance of our method. Finally, we provide insights into training pitfalls that have plagued normalizing flows for use in OOD detection.

Read more

5/1/2024

VQ-Flow: Taming Normalizing Flows for Multi-Class Anomaly Detection via Hierarchical Vector Quantization
Total Score

0

VQ-Flow: Taming Normalizing Flows for Multi-Class Anomaly Detection via Hierarchical Vector Quantization

Yixuan Zhou, Xing Xu, Zhe Sun, Jingkuan Song, Andrzej Cichocki, Heng Tao Shen

Normalizing flows, a category of probabilistic models famed for their capabilities in modeling complex data distributions, have exhibited remarkable efficacy in unsupervised anomaly detection. This paper explores the potential of normalizing flows in multi-class anomaly detection, wherein the normal data is compounded with multiple classes without providing class labels. Through the integration of vector quantization (VQ), we empower the flow models to distinguish different concepts of multi-class normal data in an unsupervised manner, resulting in a novel flow-based unified method, named VQ-Flow. Specifically, our VQ-Flow leverages hierarchical vector quantization to estimate two relative codebooks: a Conceptual Prototype Codebook (CPC) for concept distinction and its concomitant Concept-Specific Pattern Codebook (CSPC) to capture concept-specific normal patterns. The flow models in VQ-Flow are conditioned on the concept-specific patterns captured in CSPC, capable of modeling specific normal patterns associated with different concepts. Moreover, CPC further enables our VQ-Flow for concept-aware distribution modeling, faithfully mimicking the intricate multi-class normal distribution through a mixed Gaussian distribution reparametrized on the conceptual prototypes. Through the introduction of vector quantization, the proposed VQ-Flow advances the state-of-the-art in multi-class anomaly detection within a unified training scheme, yielding the Det./Loc. AUROC of 99.5%/98.3% on MVTec AD. The codebase is publicly available at https://github.com/cool-xuan/vqflow.

Read more

9/4/2024