Detection of Abnormal Pedestrian Flows with Automatic Contextualization Using Pre-Trained YOLO11n
Abstract
:1. Introduction
2. Materials and Methods
2.1. Detection Algorithm
2.2. Evaluation of the Tracking Method
2.3. Automatic Contextualization
3. Results
3.1. Pre-Trained YOLO Assessment
- Persist is a flag to the algorithm to enable the tracking method or simply to detect. If the value is set to false, the algorithm will assign a new ID on each detection. If true, the algorithm first tries to relocate the person to the immediate regions of the image, keeping the same ID.
- Verbose is another algorithm flag. If set to true, a summary of the data is displayed on the screen, which can slow down the process. A false value prevents this output.
- Tracker indicates the algorithm that will be used to track objects.
- Intersection Over Union (IOU) is a value that measures how accurately the predicted bounding boxes overlap with the actual boxes. Its value ranges from 0 to 1, where 1 indicates perfect overlap. In this study, reducing the IOU value resulted in overlap errors, but these were insignificant for the automatic contextualization calculation, as there are multiple possibilities for the person to be detected.
- Conf sets the degree of confidence the algorithm has in determining whether it has detected a person.
- Vid_stride allows you to skip frames in videos to speed up processing, at the expense of temporal resolution. A value of 1 processes all frames; higher values skip frames.
3.2. Pedestrian Flow Assessment
3.3. Automatic Contextualization Results
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- INEGI. Seguridad Pública y Justicia, INEGI, 30 Marzo 2024. Available online: https://www.inegi.org.mx/temas/delitos/ (accessed on 7 May 2024).
- Sistema Nacional de Seguridad Pública. Norma Técnica Para Estandarizar las Características Técnicas y de Interoperabilidad de los Sistemas de Vídeo Vigilancia Para la Seguridad Pública; Centro Nacional de Información: Mexico City, Mexico, 2018. [Google Scholar]
- Edwin, J.; Greeshma, M.; Mithun-Haridas, T.P.; Supriya, M.H. Face Recognition based Surveillance System Using FaceNet and MTCNN on Jetson TX2. In Proceedings of the 2019 International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 15–16 March 2019; pp. 608–613. [Google Scholar]
- Pritch, Y.; Ratovitch, S.; Hendel, A.; Peleg, S. Clustered Synopsis of Surveillance Video. In Proceedings of the 2009 Sixth IEEE International Conference on Advanced Video and Signal Based Surveillance, Genova, Italy, 2–4 September 2009. [Google Scholar]
- Ahmed, A.; Dogra, D.P.; Kar, S.; Roy, P.P. Trajectory-Based Surveillance Analysis: A Survey. IEEE Trans. Circuits Syst. Video Technol. 2019, 29, 1985–1997. [Google Scholar] [CrossRef]
- Ma, J.; Song, W. Automatic clustering method of abnormal crowd flow pattern detection. Procedia Eng. 2013, 62, 509–518. [Google Scholar] [CrossRef]
- Ullah, H.; Altamimi, A.B.; Uzair, M.; Ullah, M. Anomalous entities detection and localization in pedestrian flows. Neurocomputing 2018, 290, 74–86. [Google Scholar] [CrossRef]
- Valencia, D.; Muñoz, E.; Muñoz-Añasco, M. Impact of the Preprocessing Stage on the Performance of Offline Automatic Vehicle Counting using YOLO. IEEE Lat. Am. Trans. 2024, 22, 723–732. [Google Scholar] [CrossRef]
- Pustokhina, I.V.; Pustokhin, D.A.; Vaiyapuri, T.; Gupta, D.; Kumar, S.; Shankar, K. An automated deep learning-based anomaly detection in pedestrian walkways for vulnerable road users safety. Saf. Sci. 2021, 142, 105356. [Google Scholar] [CrossRef]
- Ramalingam, M.S.G. Towards detection of abnormal event and reporting for pedestrian video surveillance. Int. J. Health Sci. 2022, 6, 4440–4455. [Google Scholar] [CrossRef]
- Direkoglu, C. Abnormal Crowd Behavior Detection Using Motion Information Images and Convolutional Neural Networks. IEEE Access 2020, 8, 80408–80416. [Google Scholar] [CrossRef]
- Li, J.; Huang, L.; Liu, C. An efficient self-learning people counting system. In Proceedings of the The First Asian Conference on Pattern Recognition, Beijing, China, 28–28 November 2011. [Google Scholar]
- Kim, H.; Sohn, M.K.; Lee, S.H. Development of a Real-Time Automatic Passenger Counting System using Head Detection Based on Deep Learning. J. Inf. Process. Syst. 2022, 18, 428–442. [Google Scholar]
- Meli, W.; Lacy, F.; Ismail, Y. Video-Based Automated Pedestrians Counting Algorithms for Smart Cities. Int. J. Comput. Digit. Syst. 2020, 6, 1065–1078. [Google Scholar] [CrossRef] [PubMed]
- Wickramasinghe, K.S.; Ganegoda, G.U. Pedestrian Detection, Tracking, Counting, Waiting Time Calculation and Trajectory Detection for Pedestrian Crossings Traffic light systems. In Proceedings of the 2020 20th International Conference on Advances in ICT for Emerging Regions (ICTer), Colombo, Sri Lanka, 4–7 November 2020. [Google Scholar]
- Shahzad, A.R.; Jalal, A. A Smart Surveillance System for Pedestrian Tracking and Counting using Template Matching. In Proceedings of the 2021 International Conference on Robotics and Automation in Industry (ICRAI), Rawalpindi, Pakistan, 26–27 October 2021. [Google Scholar]
- Pervaiz, M.; Ghadi, Y.; Gochoo, M.; Jalal, A.; Kamal, S.; Kim, D.S. A Smart Surveillance System for People Counting and Tracking Using Particle Flow and Modified SOM. Sustainability 2021, 13, 5367. [Google Scholar] [CrossRef]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Jocher, G.; Chaurasia, A.; Munawar, M.R. Ultralytics YOLO Docs, 05 07 2024. Available online: https://docs.ultralytics.com (accessed on 8 August 2024).
- Inc, U. Ultralytics YOLO Docs, 07 01 2025. Available online: https://docs.ultralytics.com/es/models/ (accessed on 17 January 2025).
- Núñez-Vieyra, A.; Ferreira-Escutia, R.; Olivares-Rojas, J.; Méndez-Patiño, A.; Gutiérrez-Gnecchi, J.; Reyes-Archundia, E. Automatic Detection of Abnormal Pedestrian Flows, Using Classification and Tracking with Pre-trained YOLOv8. In Proceedings of the Advances in Computational Intelligence MICAI 2024 International Workshop, Tonanzintla, México, 21–25 October 2024; Springer: Cham, Switzerland, 2024; pp. 87–98. [Google Scholar]
- Zhang, H.; Xu, J.; Zhang, X. Pedestrian tracking and counting based on YOLOv4 and DeepSORT in Subway Stations. In Proceedings of the 2023 35th Chinese Control and Decision Conference (CCDC), Yichang, China, 20–22 May 2023; pp. 732–737. [Google Scholar] [CrossRef]
- Menon, A.; Omman, B.; Asha, S. Pedestrian Counting Using Yolo V3. In Proceedings of the 2021 International Conference on Innovative Trends in Information Technology (ICITIIT), Kottayam, India, 11–12 February 2021; pp. 1–9. [Google Scholar] [CrossRef]
- Deleu, E.; Elez, S.; Gadodia, A.; Macvaugh, K.; Zhao, G. Using Deep Learning for Urban Pedestrian Counting. In Proceedings of the 2021 IEEE MIT Undergraduate Research Technology Conference (URTC), Cambridge, MA, USA, 8–10 October 2021; pp. 1–5. [Google Scholar] [CrossRef]
Model | Processing Time (Seconds) |
---|---|
YOLO11n | 3.55 |
YOLOv8n | 3.64 |
YOLOv5nu | 4.06 |
YOLO11s | 4.58 |
YOLOv9t | 4.69 |
YOLOv10n | 5.76 |
YOLOv9s | 6.52 |
YOLO11m | 7.24 |
YOLO11l | 9.22 |
YOLOv10s | 9.27 |
YOLOv9c | 9.81 |
YOLOv10m | 9.90 |
YOLOv9m | 10.87 |
YOLOv10b | 11.80 |
YOLOv10l | 12.99 |
YOLO11x | 13.28 |
YOLOv10x | 15.20 |
YOLOv3u | 17.57 |
YOLOv9e | 17.80 |
Model | Pedestrian Flow | Precision | Recall | Specificity | F1 | Video Length with Processing | Actual Video Length |
---|---|---|---|---|---|---|---|
YOLO11n | high | 0.786 | 0.846 | 0.727 | 0.815 | 30.66 | 29 |
medium | 0.692 | 0.900 | 0.556 | 0.783 | 115.0 | 120 | |
low | 1.000 | 0.900 | 1.000 | 0.947 | 117.0 | 120 | |
YOLOv8n | high | 0.600 | 0.667 | 0.429 | 0.632 | 30.70 | 29 |
medium | 0.688 | 1.000 | 0.444 | 0.815 | 118.0 | 120 | |
low | 1.000 | 0.909 | 1.000 | 0.952 | 117.50 | 120 | |
YOLOv5nu | high | 0.583 | 0.778 | 0.167 | 0.667 | 31.33 | 29 |
medium | 0.643 | 0.900 | 0.545 | 0.750 | 116.0 | 120 | |
low | 0.889 | 0.889 | 0.889 | 0.889 | 117.30 | 120 | |
YOLO11s | high | 0.615 | 0.889 | 0.375 | 0.727 | 36.00 | 29 |
medium | 0.688 | 1.000 | 0.545 | 0.815 | 153.0 | 120 | |
low | 1.000 | 0.900 | 1.000 | 0.947 | 154.0 | 120 | |
YOLOv9t | high | 0.625 | 0.909 | 0.333 | 0.741 | 36.23 | 29 |
medium | 0.769 | 0.909 | 0.625 | 0.833 | 150.0 | 120 | |
low | 1.000 | 0.900 | 1.000 | 0.947 | 152.0 | 120 |
Research | Precision | Detection Model | Tracking Algorithm | Use ID to Precision | Real-Time Processing |
---|---|---|---|---|---|
[13] | 99.00% | Tiny-YOLOv3 | KCF | Not | Yes |
[14] | 83.00% | YOLOv3 | Deep SORT | yes | Not |
[15] | 72.00% | Haar-cascade | SORT | yes | Yes |
[16] | 82.11% | Haar-like features | Kalman Filter | yes | Yes |
[17] | 86.90% | HOG | Motion Trajectories | yes | Not |
[21] | 90.00% | YOLOv8n | Byte Track x | yes | Yes |
[22] | 90.61% | YOLOv4_I | DeepSORT | Yes | |
[23] | 96.1% | YOLOv3 | --- | Not | Not |
[24] | 83% | DeepLearning | --- | Not | Yes |
Our proposal 1 | 89.60% | YOLOv8n | BoT-SORT | yes | Yes |
Our proposal 2 | 90.30% | YOLO11n | BoT-SORT | yes | Yes |
Our proposal 3 | 82.60% | YOLO11n | BoT-SORT | yes | Yes |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Núñez-Vieyra, A.; Olivares-Rojas, J.C.; Ferreira-Escutia, R.; Méndez-Patiño, A.; Gutiérrez-Gnecchi, J.A.; Reyes-Archundia, E. Detection of Abnormal Pedestrian Flows with Automatic Contextualization Using Pre-Trained YOLO11n. Math. Comput. Appl. 2025, 30, 44. https://doi.org/10.3390/mca30020044
Núñez-Vieyra A, Olivares-Rojas JC, Ferreira-Escutia R, Méndez-Patiño A, Gutiérrez-Gnecchi JA, Reyes-Archundia E. Detection of Abnormal Pedestrian Flows with Automatic Contextualization Using Pre-Trained YOLO11n. Mathematical and Computational Applications. 2025; 30(2):44. https://doi.org/10.3390/mca30020044
Chicago/Turabian StyleNúñez-Vieyra, Adrián, Juan C. Olivares-Rojas, Rogelio Ferreira-Escutia, Arturo Méndez-Patiño, José A. Gutiérrez-Gnecchi, and Enrique Reyes-Archundia. 2025. "Detection of Abnormal Pedestrian Flows with Automatic Contextualization Using Pre-Trained YOLO11n" Mathematical and Computational Applications 30, no. 2: 44. https://doi.org/10.3390/mca30020044
APA StyleNúñez-Vieyra, A., Olivares-Rojas, J. C., Ferreira-Escutia, R., Méndez-Patiño, A., Gutiérrez-Gnecchi, J. A., & Reyes-Archundia, E. (2025). Detection of Abnormal Pedestrian Flows with Automatic Contextualization Using Pre-Trained YOLO11n. Mathematical and Computational Applications, 30(2), 44. https://doi.org/10.3390/mca30020044