Научная статья на тему 'COUNTING THE NUMBER OF ENTERING AND EXITING PASSENGERS ON BUSES USING YOLOv8'

COUNTING THE NUMBER OF ENTERING AND EXITING PASSENGERS ON BUSES USING YOLOv8 Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
18
0
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
computer vision / YOLO / head detection / people counting / custom dataset

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Shaukenov M.

this article demonstrates the application of the YOLOv8 and ByteTrack real-time object identification algorithms to accurately determine the number of individuals boarding and exiting buses. This study aims to determine the prevalence of stowaways on buses in Kazakhstan by employing automatic real-time calculations to accurately count the number of stowaways without the need for manual inspections. While low-density buses have performed well, there is still room for improvement in crowded buses.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «COUNTING THE NUMBER OF ENTERING AND EXITING PASSENGERS ON BUSES USING YOLOv8»

УДК 004

Shaukenov M.

Kazakh-British Technical University (Almaty, Kazakhstan)

COUNTING THE NUMBER OF ENTERING AND EXITING PASSENGERS ON BUSES USING YOLOv8

Аннотация: this article demonstrates the application of the YOLOv8 and ByteTrack realtime object identification algorithms to accurately determine the number of individuals boarding and exiting buses. This study aims to determine the prevalence of stowaways on buses in Kazakhstan by employing automatic real-time calculations to accurately count the number of stowaways without the need for manual inspections. While low-density buses have performed well, there is still room for improvement in crowded buses.

Ключевые слова: computer vision, YOLO, head detection, people counting, custom dataset.

In Kazakhstan, the frequency of fare evasion has increased significantly over the last few years. Based on the statistics [1, 2], the annual incidence of fare evasion in Astana, Kazakhstan, exceeds 120,000 cases, leading to considerable revenue losses for the bus fleets. Furthermore, the precise quantity of fare evasions occurring daily remains unknown. Therefore, there is a need for an automated solution that can effectively address this issue. This study presents a method for precisely calculating the number of stowaways by utilizing the YOLOv8 real-time detection algorithm [3].|sEpjWe selected human hair, hats, and hoods for detection because they are the most frequently seen objects in the video recordings provided by Avtobys [4] company. Following that, we started building our custom dataset by using the Roboflow [5] software. We divided the dataset into three sets: train, validation, and test, with proportions of 70%, 20%, and 10%, respectively. Subsequently, we completed the

training process for our custom model. Figures 1 and 2 illustrate the confusion matrix and F1 confidence curve.

Figure 1. Confusion matrix of the trained model.

Fl-Confidence Curve

/ 1

M

w

hat

hood

all classes 0.51 at 0.818

0.4 0.6

Confidence

0.8 1.0

Figure 2. F1 confidence curve of the trained model.

Based on the confusion matrix, the detection performance tends to be good in crowded environments like buses. After the model training, we applied the ByteTrack tracking method, developed by Ultralytics [6], to track humans using YOLOv8. Following that, we executed our initial experiments. Figure 3 displays the results.

27 fps

Figure 3. Detecting people's heads using YOLOv8 and ByteTrack.

After successfully recognizing the heads of passengers, we proceeded to draw a horizontal line to serve as a separation between people approaching the bus and those stepping off. The provided information aids in identifying whether a passenger is entering or exiting the bus. Consequently, we have determined that we will classify a person as entering if they cross the line in a downward direction, and as exiting if they cross the line in an upward direction. Furthermore, in the lower-left corner, we present the count of people who have arrived and exited. Furthermore, we have chosen to render the detection box in a shade of green when an individual is located at the lowermost point of a horizontal line for better comprehension. Positioning an individual above a horizontal line will fill their enclosure with a red box, meaning that the passenger standing outside a bus. Figures 4 and 5 display the results.

Figure 4. Two passengers are out of the bus.

г»

Figure 5. One passenger enters the bus.

Based on the findings, YOLOv8 performs effectively in real-time detection and computation of persons entering and exiting the low-density buses. Moreover, it is suitable for practical applications in real-world scenarios. Nevertheless, an obstacle arises when there is a high concentration of passengers on a bus. Such circumstances compromise the precision of calculation and detection. We will now concentrate our future efforts on enhancing the accuracy of detection and calculation in buses with high passenger density.

СПИСОК ЛИТЕРАТУРЫ:

A. Seisembek. 84. % of in Kazakhstan are from Astana. // Informburo.kz, news website [electronic resource]. URL: https://informburo.kz/novosti/stolica-zaicev-84-bezbiletnikov-v-kazaxstane-iz-astany (date of application: 20.04.2024); S. Rakhimbay, et. al. The number of "stowaways" in the capital's buses has increased. // 24.kz, news website [electronic resource]. URL: https://24.kz/ru/news/social/item/617394-kolichestvo-zajtsev-v-stolichnykh-avtobusakh-uvelichilos (date of application: 20.04.2024);

Joker, G., Chaurasia, A., & Qui, J. (2023). // Ultralytics SOLO (Version 8.0) [Computer software]. URL: https://github.com/ultralytics/ultralytics; Avtobys, official website [Electronic resource] // URL: https://avtobys.kz; Dwyer, B., Nelson, J., Hansen, T., et. al. (2024). // Roboflow (Version 1.0) [Software]. URL: https://roboflow.com. computer vision;

Jocher, G., Chaurasia, A., & Qiu, J. (2023). // Ultralytics YOLO (Version 8.0.0) [Computer software]. // URL: https://github.com/ultralytics/ultralytics

i Надоели баннеры? Вы всегда можете отключить рекламу.