Pedestrian flow counting at urban intersections using a retrained YOLOv8 model
Abstract
This study addresses the limited application of computer vision techniques for counting pedestrians at urban intersections by developing an integrated deep learning-based framework. Three models are proposed: a detection model trained on a large, diverse pedestrian dataset; a tracking model incorporating a novel reference point on bounding boxes with an enhanced identity-switch handling algorithm; and a counting model tailored to pedestrian crossing behaviors with movement-specific algorithms. The framework was applied to a case study in Vietnam, where pedestrian flow is often complex due to mixed traffic environments. A comprehensive dataset comprising 22 video footages under both daytime and nighttime conditions yielded over 120,000 labeled pedestrian instances. The tracking model effectively captures pedestrian trajectories across crosswalks, while the counting model introduces a multi-line crossing technique to enhance accuracy at signalized intersections. Evaluation results show the counting model achieves over 98% accuracy compared to manual annotations across various time frames and pedestrian densities. These findings offer valuable tools for urban transport planners and policymakers in Vietnam and similar countries, enabling automated pedestrian data collection, improving intersection safety assessment, and supporting infrastructure design.
Downloads
Copyright (c) 2025 Hanoi University of Civil Engineering

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
1. The Author assigns all copyright in and to the article (the Work) to the Journal of Science and Technology in Civil Engineering (JSTCE) – Hanoi University of Civil Engineering (HUCE), including the right to publish, republish, transmit, sell and distribute the Work in whole or in part in electronic and print editions of the Journal, in all media of expression now known or later developed.
2. By this assignment of copyright to the JSTCE, reproduction, posting, transmission, distribution or other use of the Work in whole or in part in any medium by the Author requires a full citation to the Journal, suitable in form and content as follows: title of article, authors’ names, journal title, volume, issue, year, copyright owner as specified in the Journal, DOI number. Links to the final article published on the website of the Journal are encouraged.
3. The Author and the company/employer agree that any and all copies of the final published version of the Work or any part thereof distributed or posted by them in print or electronic format as permitted herein will include the notice of copyright as stipulated in the Journal and a full citation to the Journal as published on the website.