Shopformer: Transformer-Based Framework for Detecting Shoplifting via Human Pose
Narges Rashvand, Ghazal Alinezhad Noghre, Armin Danesh Pazho, Babak Rahimi Ardabili, Hamed Tabkhi
TL;DR
Shopformer shifts shoplifting detection from pixel-based video analysis to pose-sequence modeling by combining a Graph Convolutional Autoencoder–based tokenizer with a transformer encoder-decoder. The two-stage training first learns rich spatio-temporal pose embeddings, which are then tokenized for efficient sequence modeling; reconstruction error on normal pose sequences serves as the anomaly score. On PoseLift, Shopformer achieves state-of-the-art AUC-ROC among pose-based detectors and demonstrates a favorable balance between discrimination and efficiency, with ablations showing that two tokens plus a 144-channel embedding optimize performance. The approach offers privacy-preserving, real-time surveillance potential for retail environments, highlighting the viability of pose-centric transformer architectures for behavior-specific anomaly detection.
Abstract
Shoplifting remains a costly issue for the retail sector, but traditional surveillance systems, which are mostly based on human monitoring, are still largely ineffective, with only about 2% of shoplifters being arrested. Existing AI-based approaches rely on pixel-level video analysis which raises privacy concerns, is sensitive to environmental variations, and demands significant computational resources. To address these limitations, we introduce Shopformer, a novel transformer-based model that detects shoplifting by analyzing pose sequences rather than raw video. We propose a custom tokenization strategy that converts pose sequences into compact embeddings for efficient transformer processing. To the best of our knowledge, this is the first pose-sequence-based transformer model for shoplifting detection. Evaluated on real-world pose data, our method outperforms state-of-the-art anomaly detection models, offering a privacy-preserving, and scalable solution for real-time retail surveillance. The code base for this work is available at https://github.com/TeCSAR-UNCC/Shopformer.
