Leveraging Vision Transformers for Real-Time Anomaly Detection in Automated Manufacturing Lines

Authors

  • Dr. Abhishek Upadhyay Department of computer science
  • Ayush Dubey Department of computer science

Keywords:

Anomaly Detection; Vision Transformer (ViT); Smart Manufacturing; Real-Time Systems; Predictive Maintenance; Industrial Computer Vision; Edge AI

Abstract

The integration of deep learning for visual inspection in smart manufacturing is
paramount for achieving zero-defect production. While convolutional neural
networks (CNNs) have been widely adopted, they often struggle with capturing
long-range dependencies and contextual anomalies in complex assembly lines. This
paper proposes a novel framework, ViT-AD (Vision Transformer for Anomaly
Detection), specifically optimized for real-time operation in industrial
environments. The core architecture employs a lightweight, hybrid Vision
Transformer (ViT) that processes multi-scale image patches from high-resolution
cameras. To address the scarcity of labeled anomaly data, we introduce a self
supervised pretraining strategy using only normal operating data, followed by a fine
tuning phase with a minimal set of fault examples. A key contribution is a custom
temporal-spatial attention module that correlates sequential frames from the
production line, distinguishing between transient shadows/lighting changes and
actual product defects. The system was deployed and evaluated on three real-world
production lines (automotive electronics, pharmaceutical packaging, and precision
machining) with a mean detection accuracy of 99.2% and a false positive rate below
0.5%. Crucially, the optimized model achieves an inference speed of 45 ms per frame
on an edge computing device (NVIDIA Jetson AGX Orin), satisfying the strict sub
100ms latency requirement for high-speed conveyor systems. The results
demonstrate that Vision Transformers, when properly optimized and deployed, can
significantly outperform traditional CNN-based methods in both a

Downloads

Published

2025-12-12