IEEE Access (Jan 2023)

GAMFlow: Global Attention-Based Flow Model for Anomaly Detection and Localization

  • Fan Zhang,
  • Ruiqing Yan,
  • Jinfeng Li,
  • Jiasheng He,
  • Chun Fang

DOI
https://doi.org/10.1109/ACCESS.2023.3326753
Journal volume & issue
Vol. 11
pp. 116608 – 116621

Abstract

Read online

In industrial areas where anomalous samples are lacking, unsupervised methods with high accuracy are especially important to ensure product quality and stability. An unsupervised method based on a feature extractor and a distribution estimation module has been applied in the industrial field and has achieved good performance. Flow models are usually used as distribution estimation modules. But traditional flow models only focus on feature information in two dimensions, the channel dimension, and the space dimension, while ignoring the cross-dimensional connection between them. To solve this problem, we proposed a flow model with a global attention mechanism for anomaly detection of images. It embeds combined modules of global attention mechanism and convolutional layer in the structure of a reversible neural network, which is capable of global cross-dimensional extraction of image features. In the comparison experiments, our method achieves average image and pixel-level AUC of 0.997 and 0.987 on the MVTec AD dataset and 0.968 and 0.984 on the BTAD dataset, respectively, which outperforms the other traditional methods. In addition, in the detection task, our method also possesses faster inference speeds. This shows that our method has excellent anomaly detection and localization performance, which meets the industrial demand for high-precision anomaly detection and localization.

Keywords