A Self-Contained Traffic Anomaly Detection System based on Distillation Learning for Resource Constrained Edge Deployment
Road traffic anomalies pose a critical threat to public safety, with fatality risk increasing by approximately 2.6% per minute of delayed medical response. While deep learning-based detection systems have shown promise, prevailing approaches either depend on computationally intensive architectures or cloud-based inference pipelines, rendering them unsuitable for resource-constrained deployments. Edge-capable alternatives, where they exist, typically demand relatively powerful dedicated hardware. This paper presents a fully self-contained traffic anomaly detection system deployed on a Raspberry Pi Zero 2W (based on a microprocessor operating at 1GHz and no specialized processing unit), without reliance on any external compute resources. The system is built on a lightweight spatiotemporal architecture trained via knowledge distillation, compressing a transformer-based teacher into a compact convolution-based student. The deployed model achieves a Top-1 accuracy of 76.23%, operating at 16.74FPS with an inference latency of 59.75ms on the target hardware.