Research on Lightweight Passenger Flow Target Detection and Statistics System Based on Raspberry Pi and YOLO
DOI: https://doi.org/10.62381/I265402
Author(s)
Qiongfei Wu1, Qubo Xie2, Zhaohui Zheng1, Shiyi Ge1
Affiliation(s)
1School of Intelligent Engineering, Wuhan Institute of Design and Science, Wuhan, Hubei, China
2School of Computer Science, Wuhan Donghu University, Wuhan, Hubei, China
Abstract
Traditional passenger flow statistics methods suffer from insufficient accuracy, poor real-time performance, and high hardware requirements in complex scenarios. This study proposes a lightweight passenger flow statistics system that integrates edge computing and deep learning. The objective of this research is to develop a low-cost, high-precision passenger flow counting system based on Raspberry Pi 5 platform, achieving real-time performance with minimal power consumption. The system employs YOLOv5s object detection model deployed on Raspberry Pi 5 platform via PyTorch framework, trained on COCO dataset for high-precision pedestrian recognition. OpenCV handles video stream processing, while PyQt5 provides dynamic interactive interface for real-time data visualization and multi-parameter monitoring. Experimental results demonstrate that the system maintains over 95% recognition accuracy under complex scenarios including lighting variations and crowd occlusion, with inference delay ≤200ms and power consumption below 15W. The system was deployed in a Wuhan shopping mall and operated continuously for 72 hours.The proposed solution provides a cost-effective edge intelligence solution for analyzing pedestrian hotspots and optimizing commercial operations in smart cities, with significant potential for application in urban management and commercial decision-making.
Keywords
Passenger Flow Statistics; Edge Computing; YOLOv5; Raspberry Pi; Lightweight Model.
References
[1]Diaz-Santos, S.; Caballero-Gil, P.; Caballero-Gil, C. Real-Time Passenger Flow Analysis in Tram Stations Using YOLO-Based Computer Vision and Edge AI on Jetson Nano. Computers.2025, 14, 476.
[2]Zheng, S., Chen, D., Qiu, B., et al. Pedestrian detection system design based on Raspberry Pi and YOLOv5-Lite model. Computer Era.2023, (09), 116-119.
[3]Prethi, K.N.A., Palanisamy, S., Nithya, S. et al. Edge Based Intelligent Secured Vehicle Filtering and Tracking System Using YOLO and EasyOCR. Int. J. ITS Res. 2025, 23, 330–353.
[4]M. M. H. Shuvo, S. K. Islam, J. Cheng, and B. I. Morshed. Efficient acceleration of deep learning inference on resource-constrained edge devices: A review. Proceedings of the IEEE. 2023, 11(1):42–91.
[5]Wang C G, Shi G, Chen T X, et al. Pedestrian Flow Monitoring System Based on OpenCV. Computer Knowledge and Technology. 2021; 17(07):235-236+241.
[6]Saini V, Kantipudi M V V P, Meduri P. Enhanced SSD Algorithm-Based Object Detection and Depth Estimation for Autonomous Vehicle Navigation. International Journal of Transport Development and Integration. 2023, 7(4):341-351.
[7]Fesalbon D. Forecasting Ferry Passenger Flow Using Long-Short Term Memory Neural Networks. Journal of Marine Science and Engineering. 2024, 12(3):456-468.
[8]Sajanraj TD, Mulerikkal J, Raghavendra S, Vinith R, Fábera V. Passenger flow prediction from AFC data using station memorizing LSTM for metro rail systems. NNW. 2021, 31(3):173–89.
[9]Keča D, Kunović I, Matić J, Sovic Krzic A. Ball Detection Using Deep Learning Implemented on an Educational Robot Based on Raspberry Pi. Sensors. 2023, 23(8):4071.
[10]Jaiswal, Sandeep Kumar, Rohit Agrawal. A comprehensive review of YOLOv5: advances in real-time object detection. Int. J. Innov. Res. Comput. Sci. Technol. 2024, 12.3:75-80.
[11]Ameen, S., Siriwardana, K., Theodoridis, T. Optimizing deep learning models for raspberry pi. arXiv preprint arXiv. 2023, 2304.13039.
[12]Xu, H., Chen, X., Wu, Y., Liao, B., Liu, L., Zhai, Z. Using channel pruning–based YOLOv5 deep learning algorithm for accurately counting fish fry in real time. Aquaculture International. 2024, 32(7):9179-9200.
[13]Zhou, P Y, Alimjan A, K U. Research on knowledge distillation algorithm based on Yolov5 attention mechanism. Expert Systems with Applications 240 (2024): 122553.
[14]Çakırgöz, Çağlayan C, Sefa B O, Cevahir Çığla. Milliseconds matter: pushing YOLO to the limit for real-time object detection. Artificial Intelligence for Security and Defence Applications III. SPIE. 2025, 13679.
[15]McNulty A, Elise A. An Improved YOLO V5-s Algorithm for Real-Time Pedestrian Detection in Crowded Public Scenes. Transactions on Computational and Scientific Methods. 2024, 4(10).
[16]Saleem M, Sheikh N, Rehman A, et al. Real-Time Object Identification Through Convolution Neural Network Based on YOLO Algorithm. Mathematics and Computer Science. 2023, 8(5):104-111.
[17]Kumar S, Singh S K, Varshney S, et al. Fusion of deep sort and Yolov5 for effective vehicle detection and tracking scheme in real-time traffic management sustainable system. Sustainability. 2023, 15(24): 16869.
[18]Nabi M M, Ebu A, Shah C, et al. Large-Scale Underwater Multi-Class Multi-Fish Tracking using OC-Sort Algorithm. Authorea Preprints, 2025.
[19]Sekharamantry P K, Melgani F, Malacarne J, et al. A seamless deep learning approach for apple detection, depth estimation, and tracking using YOLO models enhanced by multi-head attention mechanism. Computers. 2024, 13(3):83.
[20]Keawboontan T, Thammawichai M. Toward real-time uav multi-target tracking using joint detection and tracking. IEEE Access. 2023, 11:65238-65254.