CoChat

An Unsupervised Method for Industrial Image Anomaly Detection with Vision Transformer-Based Autoencoder

Open access
Yang, Qiying, Guo, Rongzuo · 2024 · Sensors

The DOI matches its Crossref record; 42 of the 44 references it cites were found in a registry or an index; 5 of the 29 sources its claims cite were checked for support.

Abstract

Existing industrial image anomaly detection techniques predominantly utilize codecs based on convolutional neural networks (CNNs). However, traditional convolutional autoencoders are limited to local features, struggling to assimilate global feature information. CNNs’ generalizability enables the reconstruction of certain anomalous regions. To mitigate these issues, this study proposes an unsupervised anomaly detection model employing the Vision Transformer (ViT) architecture, incorporating a Transformer structure to understand the global context between image blocks, thereby extracting a superior representation of feature information. It integrates a memory module to catalog normal sample features, both to counteract anomaly reconstruction issues and bolster feature representation, and additionally introduces a coordinate attention (CA) mechanism.

Overview

CoChat Summary

TL;DR

The paper proposes an unsupervised industrial image anomaly detection model combining a ViT-based autoencoder with a memory module and coordinate attention. On MVTec AD and BeanTech AD it reports average image-level AUROC of 91.2% and 92.2%, respectively, with ablation showing the memory and attention modules improve localization.

Key findings

  • On MVTec AD, the proposed method achieves average image-level AUROC 91.2%, pixel-level AUROC 93.0%, and PRO 92.3%; it obtains the highest scores in 9 categories, including 100% on hazelnut and screw.
  • On BeanTech AD, it reports average image-level AUROC 92.2%, pixel-level AUROC 91.9%, and PRO 91.0%, with improvements over compared methods of 3.6–10.5%, 0.2–10.1%, and 2–37% across those metrics, respectively.
  • Ablation on MVTec AD: adding only the memory module increases image-level AUROC, pixel-level AUROC, and PRO by 3.5%, 8%, and 20.9%; adding only coordinate attention increases them by 2.3%, 2.6%, and 6.1%; adding both yields 91.2%, 93.0%, and 92.3%.
  • The abstract reports an approximate 20% improvement in average image-level AUROC% over traditional convolutional encoders, while the MVTec AD comparison states overall average performance improved by 14% to 28% versus AE_SSIM, L2-CAE, and VAE.

Methods

  • Unsupervised reconstruction-based anomaly detection: input images are split into patches, processed by a ViT-based encoder, passed through a memory module that stores normal feature patterns via sparse weighted retrieval, enhanced by coordinate attention, and reconstructed by a decoder; anomalies are detected from reconstruction differences.
  • Datasets: MVTec AD (5354 high-resolution color images: 3629 normal and 1725 anomalous; 15 categories; resolutions 700 × 700 or 1024 × 1024) and BeanTech AD (2830 RGB images across three industrial products).
  • Evaluation uses image-level and pixel-level AUROC and PRO, with comparisons to baselines and an ablation study on MVTec AD. Training settings include 384 × 384 input, 16 × 16 patches, embedding dimension 768, 8 attention heads, 200 epochs, batch size 8, learning rate 0.0002, Adam optimizer, grid search, and Gaussian smoothing post-processing.

Limitations

  • Stated: the memory unit requires substantial storage and increases computational demands; current memory storage methods limit the clarity of stored potential features, and future work aims to reduce computation and improve storage/query efficiency.
  • Stated: detection results in challenging categories such as transistors are unsatisfactory, possibly because the model struggles to identify and localize subtle anomalies such as missing or misoriented transistors.
  • Evident: evaluation is limited to two public datasets, and the paper does not report quantitative runtime or memory measurements despite identifying computational demand as a limitation.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.3390/s24082440

Cites

42 of 42 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Figure 1 Architecture of original ViT. (a) Flowchart of vision transformer; (b) Structure of transformer encoder.
Figure 1 Architecture of original ViT. (a) Flowchart of vision transformer; (b) Structure of transformer encoder.CC BY · PubMed Central
Figure 2 The flowchart of proposed method based on vision transformer and autoencoder structure. The model mainly consists of a ViT-based encoder, a memory module (M), a coordinate attention (CA), and a decoder. X and X^ represent the input image and the reconstructed output image, respectively.
Figure 2 The flowchart of proposed method based on vision transformer and autoencoder structure. The model mainly consists of a ViT-based encoder, a memory module (M), a coordinate attention (CA), and a decoder. X and X^ represent the input image and the reconstructed output image, respectively.CC BY · PubMed Central
Figure 3 The network structure of memory modules M. z represents the input features extracted from the feature map and z^ represents the enhanced features computed by the memory module.
Figure 3 The network structure of memory modules M. z represents the input features extracted from the feature map and z^ represents the enhanced features computed by the memory module.CC BY · PubMed Central
Figure 4 The flowchart of coordinate attention.
Figure 4 The flowchart of coordinate attention.CC BY · PubMed Central
Figure 5 Examples of BTAD. From top to bottom are products 01, 02 and 03, representing normal images, abnormal images and ground truth from left to right.
Figure 5 Examples of BTAD. From top to bottom are products 01, 02 and 03, representing normal images, abnormal images and ground truth from left to right.CC BY · PubMed Central
Figure 6 Visualization of MVTecAD dataset detection results. From top to bottom are the 4 categories of cable, wood, greed and leather, and from left to right are the input normal image, anomaly image, ground truth image and the results of L2_CAE, AnoViT and the method in this paper.
Figure 6 Visualization of MVTecAD dataset detection results. From top to bottom are the 4 categories of cable, wood, greed and leather, and from left to right are the input normal image, anomaly image, ground truth image and the results of L2_CAE, AnoViT and the method in this paper.CC BY · PubMed Central
Figure 7 Visualization of BTAD dataset detection results. From top to bottom are products 01, 02 and 03, and from left to right are the input normal image, anomaly image, ground truth image and the results of the proposed method in this paper.
Figure 7 Visualization of BTAD dataset detection results. From top to bottom are products 01, 02 and 03, and from left to right are the input normal image, anomaly image, ground truth image and the results of the proposed method in this paper.CC BY · PubMed Central
Figure 8 Visualization of ablation experiment results on MVTecAD. From top to bottom are the 3 categories of carpet, tile and grid, and from left to right are the input normal image, anomaly image, ground truth image and the results of Base and the proposed method in this paper.
Figure 8 Visualization of ablation experiment results on MVTecAD. From top to bottom are the 3 categories of carpet, tile and grid, and from left to right are the input normal image, anomaly image, ground truth image and the results of Base and the proposed method in this paper.CC BY · PubMed Central

Verification

Claims the paper makes

4 Valid · 8 Not valid · 14 Not checked · 48 Own results and interpretations

26 more claims

Create a free account to see all 74 claims and to verify the 9 references still open.

See all claims — free account
  • Probably not a substantial claim. 21
  • It may state two separate claims as one. 29
  • The quote only partly states this claim. 1

Create a free account to see these claims.

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

4 of 4

Citations

Cites

Research works printed but not linked: 6

  1. Zhou, 2021, A template matching based monochrome fabric defect detection algorithm, Meas. Control Technol., 40, 6
  2. Luo, 2022, A review of deep learning methods for industrial defect detection, Sci. China Inf. Sci., 52, 1002
  3. Liu, 2022, Research progress on transformer based on computer vision, Comput. Eng. Appl., 58, 1
  4. Li, 2023, Unsupervised wafer defect detection based on improved generative adversarial networks, Electron. Meas. Technol., 46, 91
  5. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017, January 4–9). Attention is all you need. Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA.
  6. Schubert, E., Reyes, N., and Connor, R. (October, January 29). A triangle inequality for cosine similarity. Proceedings of the International Conference on Similarity Search and Applications, Dortmund, Germany.

Cited by

See all 35

Metadata

Authors
Yang, Q., & Guo, R.
Affiliations
Sichuan Normal University (CN)
Corresponding author
Yang, Qiying
Venue
Sensors
Publisher
MDPI AG
Published
2024-04-11
Volume
24
Issue
8
Pages
2440
ISSN
1424-8220 (ISSN-L)
OpenAlex
W4394726689
Cited by
35
References
44
Citations by year
2026: 10 · 2025: 19 · 2024: 6
FWCI
7.14
Type
journal article
Language
en
Open access
Locations
  • Sensors (publishedVersion, cc-by)
  • PubMed Central (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion)
Funders
National Natural Science Foundation of China (11905153, 61701331)
Topics
  • Physical Sciences › Engineering › Industrial and Manufacturing Engineering › Industrial Vision Systems and Defect Detection
  • Physical Sciences › Computer Science › Artificial Intelligence › Anomaly Detection Techniques and Applications
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
Keywords
unsupervised anomaly detection, vision transformer, transformer-based autoencoder, memory modules, coordinate attention, anomaly localization, global feature representation, class imbalance, MVTec AD

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.