EMACA: A Robust Pedestrian Detection and Counting Using YOLOv8 with Attention Mechanism
摘要
Accurate object detection and counting are critical for intelligent surveillance and traffic monitoring systems, particularly in dynamic, real-world environments. This study proposes an improved YOLOv8-based framework enhanced with Efficient Channel Attention (ECA) and Efficient Multi-Scale Attention (EMA) modules to strengthen both spatial and channel-wise feature extraction. The proposed method is evaluated on two benchmark datasets: the MOT17-04-SDP sequence from the MOT Challenge and a real-world, self-recorded pedestrian street video. Experimental results demonstrate that our approach consistently outperforms both the original YOLOv8m and the ECA-only variant (YOLOv8mECA) across all key performance metrics. On the MOT17-04-SDP dataset, the proposed method achieves a Precision of 0.79, Recall of 0.84, and mAP of 0.79, representing significant improvements in detection accuracy. It also attains perfect In Count Accuracy (1.00) and a high Out Count Accuracy (0.93). Similarly, on the real-world dataset, our model maintains superior counting reliability, even under complex visual conditions caused by oblique camera angles and pedestrian occlusions challenges that significantly reduce accuracy in baseline models. These results confirm the robustness and effectiveness of combining ECA and EMA within the YOLOv8 framework, making the proposed method well-suited for high-precision, real-time pedestrian monitoring in unconstrained environments.