Paper 10
Paper 10
Abstract—Ensuring compliance with traffic regulations, within the city [2]. Motorcycles, known for their
such as wearing helmets and obeying traffic signals, is crucial maneuverability and agility in navigating congested urban
for enhancing road safety, particularly among motorcycle streets, have become an integral part of Marrakech's
riders. In this study, we propose an automated approach for transportation landscape. However, their presence also
detecting helmet wearing and traffic light violations using poses unique challenges, including increased vulnerability
computer vision techniques. Our methodology involves to accidents and violations of traffic regulations.
leveraging the YOLO-v8 object detection model pretrained on
the COCO dataset to identify motorcycles, persons, traffic One of the most pressing issues associated with the
lights, and helmets in video footage captured at intersections rising number of motorcycles in Marrakech is the problem
in Marrakech. We conducted manual counting as a of traffic violations, particularly concerning helmet usage
benchmark for evaluating the performance of our automated and adherence to traffic signals. Non-compliance with
system. Our results demonstrate a strong alignment between helmet-wearing regulations not only poses a risk to the
our automated approach and manual counting for both safety of motorcycle riders but also undermines efforts to
helmet detection and traffic light violations. However, improve road safety outcomes in the city. Additionally,
occasional discrepancies were observed, particularly during violations such as running red lights or disobeying traffic
specific time slots characterized by high motorcycle speeds. signals contribute to traffic congestion and disrupt the
Contextual factors such as traffic density and vehicle speed
smooth flow of traffic, further exacerbating the challenges
were identified as influencing factors. Despite these
challenges, our automated system shows promise as a valuable
of urban mobility in Marrakech [3].
tool for monitoring and enforcing traffic regulations. Ongoing The main contribution of this paper lies in the empirical
refinement and optimization are essential to address these analysis of motorcycle violations, focusing on helmet non-
challenges and enhance the accuracy and reliability of compliance and traffic light infractions, through the
automated detection systems. Our study highlights the application of computer vision technology using YOLO-v8.
potential of automated technologies in improving road safety By leveraging this approach, we provide accurate detection
measures and underscores the importance of considering and counting of violations, offering valuable insights into
contextual factors in interpreting detection results.
the prevalence and patterns of motorcycle-related traffic
Keywords— Traffic safety; Helmet detection; Traffic light violations. This research not only enhances our
violations; Automated detection; Computer vision. understanding of traffic safety issues but also presents a
scalable and efficient method for monitoring and enforcing
I. INTRODUCTION traffic regulations in urban environments.
This With the rapid urbanization and economic This paper is structured into five main sections to
development witnessed in Marrakech, Morocco, over recent provide a comprehensive analysis of motorcycle safety and
years, there has been a notable increase in the number of traffic management in urban environments, with a focus on
motorcycles on the city's roads. This surge in motorcycle Marrakech. The "Literature Review" section offers an
ownership and usage reflects not only the city's growing overview of existing research on motorcycle safety and
population but also the increasing demand for affordable helmet detection systems, setting the context for the
and convenient modes of transportation in urban areas. proposed approach. In "Data Collection," the methodology
However, along with the proliferation of motorcycles comes for gathering real-time data on motorcycle behavior,
a host of challenges, particularly concerning traffic safety including helmet usage, is outlined. The "Proposed
and congestion [1]. Approach" details the development and implementation of
The influx of motorcycles in Marrakech has brought a YOLO-v8-based framework for motorcycle detection and
about significant changes in the dynamics of traffic flow helmet classification, along with any enhancements made to
Authorized licensed use limited to: American International University Bangladesh. Downloaded on November 28,2024 at 04:32:28 UTC from IEEE Xplore. Restrictions apply.
Figure 1: Study Locations - Intersection Map of Marrakech [14].
Authorized licensed use limited to: American International University Bangladesh. Downloaded on November 28,2024 at 04:32:28 UTC from IEEE Xplore. Restrictions apply.
In the process of helmet detection, we initially employ The comparison between our automated approach and
YOLO to detect motorcycles and persons within the manual counting for helmet detection, as presented in
captured video frames. Once these objects are identified, Figure 5, illustrates a notable alignment between the two
bounding boxes are drawn around them to delineate their methods across various days and time slots. For example,
spatial extent accurately. Subsequently, we focus on the during the morning period on Monday (09:00 - 09:30), our
region within these bounding boxes, which represents both automated approach detected six instances of helmet
the motorcycles and their riders. Utilizing this cropped wearing, closely matching the manual count of five. This
image, we employ a secondary detection mechanism to consistency extends to different days and times, such as the
identify helmets specifically. This involves applying a morning slot on Thursday (09:00 - 09:30), where both
helmet detection algorithm to the extracted regions of methods recorded four instances of helmet usage.
interest, aiming to accurately discern whether motorcycle
riders are wearing helmets. By segmenting the image into
relevant subsets corresponding to motorcycles and their
riders and then specifically targeting the detection of
helmets within these subsets, our approach ensures a
focused and precise analysis of helmet compliance among
motorcycle riders figure 3.
B. Traffic signal infractions
In our approach to detecting traffic signal infractions, we
utilize YOLO to initially identify motorcycles and persons
within the captured video frames. Following this detection,
bounding boxes are applied around these objects to
precisely delineate their spatial extents. Concurrently, we
employ a separate module to detect and isolate the traffic
light within the video frame. Once the traffic light is
identified, its bounding box is sent to a color detector,
which discerns whether the signal is emitting a green, red,
or orange hue. If the detected color corresponds to red or Figure 5: Comparison between Automated Approach and Manual
orange, indicative of a stop signal, and a motorcycle fails Counting for Helmet Detection
to halt, this is flagged as a traffic light violation, indicating However, discrepancies were observed in certain
that the motorcycle has run the red light or disregarded the instances, notably during the afternoon period on Sunday
stop signal, thus constituting a violation figure 4. (12:00 - 12:30). Here, our approach detected 11 motorcycles
without helmets, while manual counting reported only 9
instances. A similar discrepancy arose during the 03:00 -
03:30 time slot. Upon scrutinizing the video footage, we
identified a contributing factor to these differences:
motorcycles tended to accelerate during these time slots due
to reduced traffic volume, making it more challenging for
our automated system to accurately detect helmet usage.
These findings underscore the importance of
considering contextual factors, such as traffic density and
vehicle speed, when interpreting automated detection
results. While our approach generally exhibits strong
alignment with manual counting, occasional discrepancies
may occur due to such factors. Thus, ongoing refinement
and optimization of our automated system remains crucial
for ensuring reliable and precise detection of helmet
compliance among motorcycle riders.
Figure 4: Example of Traffic Light Violation (Running Red or Orange
Light)
Authorized licensed use limited to: American International University Bangladesh. Downloaded on November 28,2024 at 04:32:28 UTC from IEEE Xplore. Restrictions apply.
of our system are essential to address challenges such as
variations in lighting conditions and vehicle speed.
Overall, our study underscores the importance of
considering contextual factors when interpreting automated
detection results. By leveraging advanced technologies and
methodologies, we can continue to improve the accuracy
and reliability of automated systems for monitoring and
enforcing traffic regulations, ultimately contributing to safer
road environments for all road users.
REFERENCE
[1] A. Charef, Z. Jarir, and M. Quafafou, “Optimizing Traffic Flow and
Pedestrian Safety: The Role of Crosswalk Distance in Roundabout
Design,” 2024 International Conference on Global Aeronautical
Engineering and Satellite Technology (GAST), pp. 1–6, Apr. 2024,
doi: 10.1109/GAST60528.2024.10520741.
[2] R. George, Pikala Bikes, Marrakesh, Morocco: a social
entrepreneurship company. Edward Elgar Publishing, 2024.
Figure 6: Comparison between Automated Approach and Manual Accessed: Feb. 15, 2024. [Online]. Available:
Counting for Traffic Light Violations (Running) https://www.elgaronline.com/edcollchap/book/9781803923857/boo
k-part-9781803923857-20.xml
The figure 6 provides a comparison between our
[3] A. Charef, Z. Jarir, and M. Quafafou, “Smart System for Emergency
automated approach and manual counting for traffic light Traffic Recommendations : Urban Ambulance Mobility,” IJACSA)
violations (running) across different intersections and times International Journal of Advanced Computer Science and
of the day. The figures indicate the number of traffic signal Applications, vol. 13, no. 10, p. 2022, Accessed: Dec. 19, 2023.
infractions detected by both methods for each time slot on DOI: 10.14569/IJACSA.2022.0131005
Monday, Thursday, and Sunday. [4] R. Ferdian and T. P. Sari, “Identification of Motorcycle Traffic
Violations with Deep Learning Method,” Proceeding - 2022
Upon analysis, it's evident that there is a close alignment International Symposium on Information Technology and Digital
between the results obtained through our automated Innovation: Technology Innovation During Pandemic, ISITDI 2022,
pp. 146–149, 2022, doi: 10.1109/ISITDI55734.2022.9944502.
approach and those derived from manual counting. For [5] A. Afzal, H. U. Draz, M. Z. Khan, and M. U. G. Khan, “Automatic
instance, during the morning time slot (09:00 - 09:30) on Helmet Violation Detection of Motorcyclists from Surveillance
Monday, both methods detected five instances of traffic Videos using Deep Learning Approaches of Computer Vision,”
light violations. Similarly, for the same time slot on 2021 International Conference on Artificial Intelligence, ICAI 2021,
Thursday and Sunday, the counts obtained through our pp. 252–257, Apr. 2021, doi: 10.1109/ICAI52203.2021.9445206.
[6] A. Goyal, D. Agarwal, A. Subramanian, C. V. Jawahar, R. K.
approach closely matched those from manual counting. Sarvadevabhatla, and R. Saluja, “Detecting, Tracking and Counting
Overall, the comparison demonstrates the reliability and Motorcycle Rider Traffic Violations on Unconstrained Roads.” pp.
4303–4312, 2022. Accessed: Feb. 15, 2024. [Online]. Available:
accuracy of our automated approach in detecting traffic light https://github.com/iHubData-Mobility/public-motorcycle-
violations. The minor discrepancies observed between the violations
two methods can be attributed to factors such as variations [7] M. M. Bachtiar, A. R. Mawardi, and A. R. A. Besari, “Vehicle
in lighting conditions, occlusion of traffic signals by other Classification and Violation Detection on Traffic Light Area using
objects, or differences in the interpretation of video footage BLOB and Mean-Shift Tracking Method,” 3rd International
Conference on Applied Science and Technology, iCAST 2020, pp.
between automated and manual analyses. However, these 94–98, 2020, doi: 10.1109/ICAST51016.2020.9557628.
differences are relatively small and do not significantly [8] M. M. Bachtiar, A. R. Mawardi, and A. R. A. Besari, “Vehicle
affect the overall agreement between the two methods. Classification and Violation Detection on Traffic Light Area using
BLOB and Mean-Shift Tracking Method,” 3rd International
VI. CONCLUSION Conference on Applied Science and Technology, iCAST 2020, pp.
94–98, 2020, doi: 10.1109/ICAST51016.2020.9557628.
Our study demonstrates the effectiveness and [9] A. Charef, Z. Jarir, and M. Quafafou, “The Impact of Motorcycle
reliability of our proposed automated approach for detecting Positioning on Start-Up Lost Time: The Empirical Case Study of
helmet wearing and traffic light violations among Signalized Intersections in Marrakech using VISSIM,” Engineering,
motorcycle riders. Through manual counting, we Technology & Applied Science Research, vol. 14, no. 3, pp. 14313–
established benchmarks against which we compared the 14318, Jun. 2024, doi: 10.48084/ETASR.7141.
[10] D. A. Naik, P. Naik, and S. O. Reddy, “Traffic Rule Violation
results obtained from our automated detection system. Detection System using Surveillance Videos in real-time,” Ann Rom
While our approach generally showed strong alignment Soc Cell Biol, vol. 25, no. 6, pp. 17865–17873, Jul. 2021, Accessed:
with manual counting, occasional discrepancies were Feb. 15, 2024. [Online]. Available:
observed, particularly during specific time slots where https://www.annalsofrscb.ro/index.php/journal/article/view/9150
motorcycles tended to accelerate due to reduced traffic [11] M. Dasgupta, O. Bandyopadhyay, and S. Chatterji, “Automated
volume. helmet detection for multiple motorcycle riders using CNN,” 2019
IEEE Conference on Information and Communication Technology,
Despite these minor discrepancies, our automated CICT 2019, Dec. 2019, doi: 10.1109/CICT48419.2019.9066191.
[12] T. Waris et al., “CNN-Based Automatic Helmet Violation Detection
system proved to be a valuable tool for monitoring and of Motorcyclists for an Intelligent Transportation System,” Math
enforcing helmet compliance and traffic regulations at Probl Eng, vol. 2022, 2022, doi: 10.1155/2022/8246776.
intersections. The close alignment between our automated [13] N.-N. Duong et al., “Robust Automatic Motorcycle Helmet
approach and manual counting highlights the potential of Violation Detection for an Intelligent Transportation System.” pp.
automated detection systems in enhancing road safety 5341–5349, 2023.
measures. However, ongoing refinement and optimization [14] A. Charef, Z. Jarir, and M. Quafafou, “Assessing the driving
behaviour of motorcyclists to improve road safety,” JUCS - Journal
Authorized licensed use limited to: American International University Bangladesh. Downloaded on November 28,2024 at 04:32:28 UTC from IEEE Xplore. Restrictions apply.
of Universal Computer Science 30(5): 617-644, vol. 30, no. 5, pp.
617–644, May 2024, doi: 10.3897/JUCS.108550.
[15] J. Terven, D.-M. Córdova-Esparza, and J.-A. Romero-González, “A
Comprehensive Review of YOLO Architectures in Computer
Vision: From YOLOv1 to YOLOv8 and YOLO-NAS,” Machine
Learning and Knowledge Extraction 2023, Vol. 5, Pages 1680-1716,
vol. 5, no. 4, pp. 1680–1716, Nov. 2023, doi:
10.3390/MAKE5040083.
[16] Z. Ge, S. Liu, F. Wang, Z. Li, and J. Sun, “YOLOX: Exceeding
YOLO Series in 2021,” vol. 5, p. 12, Jul. 2021, Accessed: Feb. 15,
2024. [Online]. Available: https://arxiv.org/abs/2107.08430v2
[17] A. Charef, Z. Jarir, and M. Quafafou, “Impact of Motorcycle
Placement on Travel Time and Traffic Dynamics at Urban
Intersections,” pp. 1–5, Jun. 2024, doi:
10.1109/IRASET60544.2024.10549511.
Authorized licensed use limited to: American International University Bangladesh. Downloaded on November 28,2024 at 04:32:28 UTC from IEEE Xplore. Restrictions apply.