AH-YOLOFlow: Vision-Based Pedestrian Flow Analytics for Smart Urban Crosswalk Performance Monitoring
Abstract
Proper management of pedestrian flow at urban crosswalks is crucial for alleviating congestion, reducing waiting times, and improving general traffic safety. This paper presents AH-YOLOFlow, a computer vision framework for pedestrian detection, multi-object tracking, and zone-based flow analytics at urban crosswalks. The proposed framework integrates an attention-enhanced YOLO26n detector, Hungarian assignment-based multi-object tracking, polygon-based spatial zone modeling, and key performance indicator aggregation to estimate pedestrian flow rate, waiting behavior, crossing activity, and localized pedestrian density. The framework was evaluated using a 228.74-s CCTV crosswalk video with a fixed split and an augmented training dataset. Experimental results demonstrate that the proposed detector achieved a mAP@50-95 of 0.5794, mAP@50 of 0.8000, precision of 0.9003, and recall of 0.6847, outperforming the evaluated YOLO-family baselines in terms of mAP@50-95 and precision while remaining competitive with RT-DETR. In the end-to-end pedestrian analytics evaluation, AH-YOLOFlow identified 638 zone-entry events and 495 directional movement events, and successfully associated 54.01% of tracked pedestrian identities with predefined spatial regions. Furthermore, a pseudo-MOT evaluation based on spatially propagated identity annotations demonstrated enhanced tracking consistency following data augmentation, achieving a pseudo-MOTA of 0.7671, pseudo-MOTP of 0.9205, pseudo-HOTA of 0.4527, and pseudo-IDF1 of 0.3844. These findings demonstrate that AH-YOLOFlow provides an effective and computationally efficient framework for real-time crosswalk monitoring by integrating pedestrian detection, tracking, and spatial analytics. In future work, we will focus on validating the system across diverse urban environments using larger multi-scene datasets with manually verified identity annotations to further improve tracking robustness and generalization.