Integrasi Algoritma YOLOv8 dan Streamlit untuk Visualisasi Real-Time dan Akurat dalam Penghitungan Kerumunan di Kawasan Stasiun Bekasi
Keywords:
Crowd Counting, Object Detection, Public Transportation, Streamlit, YOLOv8Abstract
Crowd management in public transportation areas has become a critical challenge with the rise of urban populations. This study develops a real-time web-based people detection and counting system by integrating the YOLOv8 algorithm with the Streamlit framework. A case study was conducted at the entrance of Bekasi Station. The model was developed using the AI Project Life Cycle approach, and the system was built following the Waterfall methodology. Data were obtained from video recordings, which were extracted into images, annotated, and processed into training and testing datasets. The YOLOv8 model was trained for 50 epochs, yielding strong performance with an mAP@0.5 of 91.7%, a maximum precision of 93.6%, and an F1-score of 87%. Tests on 15 images showed an average accuracy of 80.37% and an error rate of 19.63%. The model's performance declined on out-of-dataset images due to variations in lighting and extreme crowd density. The system was tested using black-box testing and demonstrated that all main features—image upload, object detection, visualization, and result download—functioned correctly. The system has been successfully deployed on Streamlit Cloud. These results indicate that the system offers a practical, lightweight, and responsive solution to support crowd monitoring in public areas. In future development phases, the system can be extended to support real-time video stream processing and integrated with an object tracking and classification module to accurately identify and differentiate the ingress and egress flow of individuals within a defined surveillance area.
References
Darmadi, & Doni, H. N. (2024). Traffic Counting using YOLO Version-5 (A case study of Jakarta-Cikampek Toll Road). IOP Conference Series: Earth and Environmental Science, 1321(1), 012015. https://doi.org/10.1088/1755-1315/1321/1/012015
Gündüz, M. Ş., & Işık, G. (2023). A new YOLO-based method for real-time crowd detection from video and performance analysis of YOLO models. Journal of Real-Time Image Processing, 20(1), 5. https://doi.org/10.1007/s11554-023-01276-w
Hassan, M., Hussain, F., Khan, S. D., Ullah, M., Yamin, M., & Ullah, H. (2023). Crowd counting using deep learning-based head detection. Electronic Imaging, 35(9), 293--1-293–296. https://doi.org/10.2352/EI.2023.35.9.IPAS-293
Khan, M. A., Menouar, H., & Hamila, R. (2022). Revisiting Crowd Counting: State-of-the-art, Trends, and Future Perspectives.
Kusuma, T. A. A. H., Usman, K., & Saidah, S. (2021). People Counting for Public Transportations Using You Only Look Once Method. Jurnal Teknik Informatika (Jutif), 2(1), 57–66. https://doi.org/10.20884/1.jutif.2021.2.2.77
Lee, J., & Marinov, M. (2022). Analysis of Rail Passenger Flow in a Rail Station Concourse Prior to and During the COVID-19 Pandemic Using Event-Based Simulation Models and Scenarios. Urban Rail Transit, 8(2), 99–120. https://doi.org/10.1007/s40864-022-00167-w
Mhadhbi, S. (2021). Streamlit for machine learning and data science projects. Streamlit Documentation.
Redmon, J., Divvala, S., Girshick, R., & Farhadi, A. (2016). You Only Look Once: Unified, Real-Time Object Detection. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 779–788. https://doi.org/10.1109/CVPR.2016.91
Shyaa, T. A. R., & Hashim, A. A. (2024). Enhancing real human detection and people counting using YOLOv8. BIO Web of Conferences, 97, 00061. https://doi.org/10.1051/bioconf/20249700061
Sohan, M., Sai Ram, T., & Rami Reddy, Ch. V. (2024). A Review on YOLOv8 and Its Advancements (pp. 529–545). https://doi.org/10.1007/978-981-99-7962-2_39
Zhang, J., Liu, J., & Wang, Z. (2021). Convolutional Neural Network for Crowd Counting on Metro Platforms. Symmetry, 13(4), 703. https://doi.org/10.3390/sym13040703
Zhu, Y., Ni, K., Li, X., Zaman, A., Liu, X., & Bai, Y. (2024). Artificial Intelligence Aided Crowd Analytics in Rail Transit Station. Transportation Research Record: Journal of the Transportation Research Board, 2678(2), 481–492. https://doi.org/10.1177/03611981231175156
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Prihandoko Prihandoko, Sri Agustina Rumapea, Abdul Hanif Pratama

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.










