Hybrid convNeXt-ViT architecture with focal self-attention for emergency vehicle classification in urban traffic
摘要
Urban congestion significantly challenges emergency response times, directly affecting public safety. This paper introduces a novel hybrid deep learning architecture that integrates ConvNeXt and Vision Transformer (ViT) with focal self-attention for real-time emergency vehicle classification. The proposed model combines local feature extraction with global context modeling to overcome limitations of existing single-architecture approaches. Using a balanced dataset of 6,222 images across four vehicle categories (non-emergency, ambulance, police car, and firefighter truck), the architecture incorporates focal self-attention modules that selectively emphasize critical features such as flashing lights, rooftop bars, and vehicle contours while reducing background noise. Key innovations include a strategic 30% layer freezing approach, robust preprocessing, and a data augmentation pipeline tailored for urban traffic scenarios. The model achieved a classification accuracy of 99.26% with 99.7% precision in ambulance detection, significantly outperforming ConvNeXt (99.01%) and DenseNet201 (98.60%). Paired t-test results confirmed that the improvements over ConvNeXt (p = 0.02) and DenseNet201 (p = 0.005) are statistically significant at