Next Article in Journal
Handling Data Structure Issues with Machine Learning in a Connected and Autonomous Vehicle Communication System
Previous Article in Journal
Mix Controller Design for Active Suspension of Trucks Integrated with Online Estimation of Vehicle Mass
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Object-Based Efficient Traffic Signal Optimization Framework via Traffic Flow Analysis and Intensity Estimation Using UCB-MRL-CSFL

by
Zainab Saadoon Naser
1,*,
Hend Marouane
2 and
Ahmed Fakhfakh
1,3
1
National School of Electronics and Telecommunications (ENET’COM), University of Sfax, Sfax 3021, Tunisia
2
National School of Electronics and Telecommunications (ENET’COM), NTS’COM Laboratory, University of Sfax, Sfax 3029, Tunisia
3
Laboratory of Signals, Systems, Artificial Intelligence and Networks (SM@RTS), Digital Research Center of Sfax (CRNS), Sfax 3021, Tunisia
*
Author to whom correspondence should be addressed.
Vehicles 2025, 7(3), 72; https://doi.org/10.3390/vehicles7030072
Submission received: 17 May 2025 / Revised: 20 June 2025 / Accepted: 8 July 2025 / Published: 11 July 2025

Abstract

Traffic congestion has increased significantly in today’s rapidly urbanizing world, influencing people’s daily lives. Traffic signal control systems (TSCSs) play an important role in alleviating congestion by optimizing traffic light timings and improving road efficiency. Yet traditional TSCSs neglected pedestrians, cyclists, and other non-monitored road users, degrading traffic signal optimization (TSO). Therefore, this framework proposes a multi-object-based traffic flow analysis and intensity estimation model for efficient TSO using Upper Confidence Bound Multi-agent Reinforcement Learning Cubic Spline Fuzzy Logic (UCB-MRL-CSFL). Initially, the real-time traffic videos undergo frame conversion and redundant frame removal, followed by preprocessing. Then, the lanes are detected; further, the objects are detected using Temporal Context You Only Look Once (TC-YOLO). Now, the object counting in each lane is carried out using the Cumulative Vehicle Motion Kalman Filter (CVMKF), followed by queue detection using Vehicle Density Mapping (VDM). Next, the traffic flow is analyzed by Feature Variant Optical Flow (FVOF), followed by traffic intensity estimation. Now, based on the siren flashlight colors, emergency vehicles are separated. Lastly, UCB-MRL-CSFL optimizes the Traffic Signals (TSs) based on the separated emergency vehicle, pedestrian information, and traffic intensity. Therefore, the proposed framework outperforms the other conventional methodologies for TSO by considering pedestrians, cyclists, and so on, with higher computational efficiency (94.45%).

1. Introduction

Recently, traffic congestion has become a major concern in urban areas due to rapid urbanization, population growth, and increased vehicle use [1,2]. With the rapid expansion of cities, fuel consumption, air pollution, and travel times are exponentially increasing in the existing transportation infrastructure. Traffic Signal Control (TSC) systems are considered effective solutions as they optimize traffic light timings and improve road efficiency to alleviate congestion [3,4]. The use of TS controllers is one of the most widely adopted methods for managing traffic at intersections [5].
These controllers typically fall into four main categories, namely Fixed Traffic Signal Control (FTSC), coordinated signal control, Traffic Actuated Signal Control (TASC), and Adaptive Traffic Signal Control (ATSC) [6,7]. However, many traffic control studies primarily depend on traffic volume and flow data. Similarly, the behavioral characteristics of drivers at intersections play an important role in traffic signal control strategy. Behaviors like acceleration patterns, reaction times, and queue discharge dynamics mainly influence intersection performance. The prior study [8] developed a back-of-queue model of a signal-controlled intersection scheme based on driver behavior. The above-mentioned scheme effectively demonstrated how driver behavior features aid in improving the accuracy and responsiveness of traffic control models. Therefore, significant traffic signal control systems should consider quantitative traffic data as well as qualitative behavioral insights, thereby handling real-world traffic dynamics effectively. Yet, they require regular updates to adapt to changing traffic demands [9]. These systems may become ineffective without timely updates, contributing to approximately 5–10% of total traffic congestion and delays [10,11]. Furthermore, the existing methods employed a fixed-time-based fuzzy controller to diminish the total delay and average queue length in urban intersections [12]. But the fixed-time traffic signal controller had high maintenance costs and low coverage [13].
Therefore, Reinforcement Learning (RL) has emerged as a promising technique in recent years due to its ability to learn optimal policies through interaction with the traffic environment [14,15]. RL dynamically adapts to changing conditions by receiving feedback in the form of rewards, unlike rule-based systems, enabling more flexible and responsive traffic management [16,17]. Likewise, to enhance signal optimization, some conventional works incorporated Machine Learning (ML) and Deep Learning (DL)-based methodologies. Some of the prevailing methods combined graph convolutional networks and deep reinforcement learning to improve the efficiency of dynamic traffic control [18]. However, these methods still face challenges related to real-time adaptability and flexibility [19]. Among traditional traffic signal control methods, the Time-of-Day (TOD) approach gained immense popularity owing to its flexibility and cost-effectiveness. TOD strategies involve switching between pre-set signal timing plans according to the predictable traffic demand patterns throughout the day. Moreover, the Time-of-Day (TOD) control strategy predefines signal timings based on expected traffic volumes at different times. TOD is more effective at reducing congestion under stable and predictable conditions. But TOD was not generalized well enough to manage dynamic and non-recurrent traffic patterns (fluctuating pedestrian flows or incidents). The TOD control strategies failed to adapt to the dynamic traffic conditions, thus resulting in restricted signal usage. In addition, none of the conventional traffic control strategy works focused on pedestrians, cyclists, and other non-motorized road users, reducing TSO effectiveness. Therefore, adaptive and multi-objective optimization approaches are essential to handle the varying traffic intensities and multiple intersections [20,21]. Thus, this research is motivated by the need to facilitate responsive and real-time intelligent traffic analytics using a multi-object-based framework. This paper proposes a multi-object-based efficient TSO framework via traffic flow analysis and intensity estimation using UCB-MRL-CSFL.

1.1. Problem Statement

The limitations of several conventional methodologies are demonstrated as follows.
  • None of the conventional approaches concentrated on pedestrians, cyclists, or other non-motorized road users, limiting TSO performance.
  • The prevailing traffic control framework increased vehicle waiting time, leading to longer queues and congestion at intersections [22].
  • The conventional framework used a fixed green light duration, causing delays and reducing system efficiency [23].
  • The prior methodology led to uneven traffic flow due to the high-density connected vehicle areas [24].
  • Some prevailing works failed to facilitate the smooth flow of emergency vehicles, impacting response efficiency.
  • Due to the highly variable traffic patterns, the real-time prediction and dynamic adjustment of TSs are challenging.

1.2. Objectives

To surpass the limitations, the proposed framework’s objective is depicted as follows.
  • The TC-YOLO is applied to detect pedestrians, cyclists, and other non-motorized users.
  • The traffic intensity is estimated to reduce the waiting time of the vehicles and longer queues at intersections.
  • The UCB-MRL-CSFL is employed to adjust TSs in real-time traffic conditions.
  • The CVMKF is used to handle the uneven distribution of traffic flow and congestion with fewer connected devices.
  • The emergency vehicles are separated based on color segmentation.
  • The FVOF is applied to analyze the highly dynamic and changing traffic patterns for traffic flow analysis.
The paper’s structure is demonstrated as follows: Section 2 indicates the literature survey, Section 3 establishes the proposed methodology, Section 4 illustrates the results and discussion, and Section 5 depicts the conclusion with future scope.

2. Literature Survey

A framework for predicting traffic and intelligent signal control in smart cities was presented in [22]. Primarily, the IoT-enabled traffic data was collected from a relevant dataset, followed by feature extraction. These features were then given to the Optimized Weight Elman Neural Network (OWENN) classifier, which identified areas with higher traffic density. This model achieved a superior F-score of 96.69%, outperforming existing methods. Yet this model increased the vehicles’ waiting time, leading to longer queues at intersections.
A Deep Reinforcement Learning (DRL) approach for TS control was demonstrated in [23]. This methodology involved designing consistent state and reward pairs of queue length, number of vehicles, and waiting time. By interacting with synthetic traffic scenarios, the agent learned optimal TS phases. The presented approach achieved faster training convergence and stability. As this model fixed the green light duration, the overall efficiency was reduced.
An efficient framework for adaptive TS control using decentralized learning was established in [24]. This framework utilized an Asymmetric Advantage Actor–Critic (Asym-A2C) algorithm for TSO, followed by coordinated multi-agent control facilitation. As per the experimental analysis, the presented method outperformed existing methods across various traffic demands, penetration rates, and network sizes. This model caused an uneven distribution of traffic flow due to the high density of connected vehicles.
A human-centric DRL model for decentralized adaptive TS control to incentivize ridesharing was presented in [25]. To prioritize High-Occupancy Vehicles (HOVs), person-level pressure was employed, followed by model enhancement based on Reinforcement Learning and Planning (RLAP). As per the results, the HumanLight model achieved up to a 55% reduction in person delays and queues. Yet excluding the pedestrian waiting time from the reward function might result in increased delays for pedestrians at intersections.
A model for Connected Autonomous Vehicles (CAVs) and cooperative control of traffic light signals using DRL was investigated in [26]. Initially, to enable decentralized cooperation, action-independent Multi-Agent Reinforcement Learning (MARL) was employed, followed by agent training using Proximal Policy Optimization (PPO). Then, lightweight state information was exchanged, achieving a 30% reduction in travel time and emissions while improving traffic safety. Yet, this model was sensitive to tuning of the hyperparameters, which affected training stability and performance consistency.
A framework for traffic flow detection employing ML methods and camera images in Intelligent Transportation Systems (ITSs) was established in [27]. A Raspberry Pi-mounted camera captured traffic video, and a sound meter measured ambient noise. Next, You Only Look Once version-2 (YOLOv2) detected and classified vehicles. To estimate noise levels and vehicle counts, traffic flow data were used. Also, the ML improved vehicle classification and traffic data generated noise maps. Therefore, the ITS supported targeted noise mitigation. Yet YOLOv2 struggled with detecting objects of different sizes.
A methodology for analyzing the traffic flow using video image recognition based on DL was discussed in [28]. Primarily, by using the multi-target tracking algorithm, the vehicles were detected and tracked. Next, to recognize spatiotemporal counting features, an improved Long Short-Term Memory (LSTM) was introduced, attaining 97.62% accuracy. Yet, this model failed to consider some inference factors like overtaking, speeding, mixed traffic flow of motor vehicles, etc., thus limiting overall performance.
A controlling method to optimize TSs centered on the Attention Mechanism, Updated Weights Double Deep Q Network (AMUW-DDQN), was described in [29]. Initially, by using Discrete Traffic State Encoding (DTSE), this model captured real-time traffic data, followed by agent selection and traffic flow efficiency optimization. Lastly, to enhance the model’s ability, the Squeeze and Excitation Networks (SENets) attention mechanism was incorporated, improving action evaluation accuracy. This model had high computational complexity owing to the utilization of a large number of intersections.
A framework for TS optimization at urban intersections via controlling TS coordination was exhibited in [30]. Here, to maximize intersection capacity, minimize vehicle delay, and reduce congestion, the multi-objective traffic optimization model was developed. Moreover, by using fuzzy logic, the TSs were dynamically adjusted, followed by parameter fine-tuning using the Differential Evolution Algorithm (DEA). As per the results, this framework attained a 55.4% promotion rate. Yet this model failed to incorporate interdisciplinary collaboration with traffic control and guidance systems, limiting traffic efficiency.
An adaptive–predictive controller for TS optimization in larger-scale urban road networks was utilized in [31]. Initially, the vehicle information was collected from the traffic system, followed by future traffic condition prediction and optimization problem formulation. Then, near-optimal solutions were found for TS control using quantum annealing and other Ising solvers. As per the results, this model predicted traffic conditions effectively while reducing the waiting vehicle ratio to 60%. This model was inaccurate in TSO due to the reliance on a constant flow rate.
The application of fuzzy logic for the evaluation of Stone Mastic Asphalt (SMA) was investigated in [32]. SMA served as a resilient module during heavy traffic conditions on the roadside. Here, the fuzzy logic utilized weighted average operations to evaluate performance characteristics like air voids, bulk density, and the permeability coefficient. This framework had higher prominence in controlling road traffic. But this model was specifically designed to support small-scale networks.
An effective traffic control prediction framework using fuzzy logic was implemented in [33]. Here, a stable Takagi–Sugeno (TS) fuzzy controller was employed to maintain urban traffic. State-space dynamics was used to decide the vehicle’s average waiting time at an isolated intersection. Moreover, the Lyapunov theorem was utilized to ensure the stability of the system. This approach prominently improved the performance of the road intersection. However, this methodology required a considerable amount of processing time.
Freeway traffic control with adjacent arterial traffic analysis based on Q-learning was proposed in [34]. The Q-learning-based freeway traffic control strategy was designed by considering factors like variable speed limit, lane change control, and ramp metering. Here, the signal timing and demands of adjacent arterial intersections were assumed as state variables. This approach significantly stabilized the vehicle density and reduced the travel time. Nevertheless, this framework had a maximum risk of suboptimal signal timing.
Lane priority-aware multi-agent approach-based diverse traffic environment maintenance was implemented in [35]. This suggested model enabled fair utilization of priority lanes by considering factors like driving comfort, traffic efficiency, and safety. This methodology had an impressive performance in traffic monitoring. However, this model failed to mitigate the formation of long queues, thus affecting the model’s resilience.
Emergence-aware optimal communication infrastructure for traffic congestion control using reinforcement learning and a non-dominated sorting genetic algorithm was employed in [36]. An adaptive Q-learning strategy was employed to improve the traffic maintenance via an emergency-aware module. The emergency-aware module utilized real-time data to prioritize emergency vehicles and adjust traffic signals in an effective way. Nevertheless, this approach had scalability issues due to the large urban environments.
An effective freeway traffic control scheme based on model predictive control and deep reinforcement learning was introduced in [37]. The hierarchical structure included a high-level control component and a low-level control component to handle the dynamic traffic conditions. This approach proficiently improved the traffic control strategies. Yet this framework had a considerable computational cost owing to its hierarchical control components.
The above-mentioned section investigated the numerous traffic control strategy frameworks in terms of their major goal, methodology, findings, and limitations. Basically, the traditional You Only Look Once version-2 (YOLOv2) [27] was utilized to perform vehicle detection. To effectively track the vehicles in real time, a multi-target tracking algorithm was employed in the conventional approach [28]. However, the vehicle detection frameworks struggled to detect objects of different sizes. Additionally, in the existing work, OWENN was employed to identify the higher traffic density with a 96.69% F-score [22]. Furthermore, an improved LSTM was utilized in the existing work to analyze the traffic flow through image recognition. Nevertheless, the aforementioned scheme did not pay direct attention to important factors, such as speed, overtaking, and mixed traffic flow, reducing the overall efficiency. To enable adaptive traffic control, a MARL was introduced in the prevailing schemes [26]. In the same manner, ref. [31] established quantum annealing and various Ising solvers to obtain optimal solutions for traffic strategy control. Some of the existing methods utilize fuzzy logic to dynamically adjust the traffic flow. Likewise, ref. [36] established a reinforcement learning and non-dominated sorting genetic algorithm to handle dynamic traffic conditions. In the same way, ref. [37] employed adaptive reinforcement learning to ensure freeway traffic control. But the existing studies had limited traffic efficiency due to the lack of collaboration with traffic control and guidance systems. Overall, the existing methods improved the efficiency and stability of the traffic control strategies. However, the traditional frameworks faced several challenges related to the optimal traffic control strategy design. Most of the existing work had considerable vehicle waiting time, thus resulting in vehicle congestion at intersections. Owing to the fixed or static green light duration, the prior frameworks had maximum delay and minimum efficiency. Moreover, the prevailing approaches did not focus on pedestrians, cyclists, or other non-motorized road users, thus affecting the performance and consistency of the traffic strategy optimization. Thus, the research gaps identified in the existing studies are discussed further.
Traditional methods like fixed-time signal plans and TOD control failed to adapt to real-time traffic fluctuations, thus causing suboptimal performance during dynamic conditions. Further, many of the traditional machine learning-based approaches primarily depend on vehicle flow rather than concentrating on the fundamental road users, such as pedestrians, cyclists, and emergency vehicles. Also, an integrated framework that combined object detection, traffic flow analysis, and intensity estimation to offer data-driven decisions was rarely concentrated in the prevailing approaches. Moreover, the computational complexity and scalability are the major concerns for some of the AI-based traffic control systems. Hence, a multi-object-aware and computationally efficient traffic signal optimization framework is required to handle heterogeneous and unpredictable traffic patterns.
Accordingly, the proposed work is designed well enough to mitigate the problems faced in the existing works. In the proposed work, a multi-objective-based effective TSO scheme is implemented through traffic flow analysis and intensity estimation using UCB-MRL-CSFL. The proposed UCB-MRL-CSFL approach integrates multi-agent reinforcement learning, fuzzy logic, and advanced vision-based analysis for real-time and adaptive traffic control. Here, the proposed methodology encompasses fundamental innovations like multi-object detection, real-time traffic flow analysis, intensity estimation, and adaptive traffic signal optimization. Thus, the fusion of optical flow analysis and multi-agent reinforcement learning with fuzzy logic ensures high computational efficiency and adaptability to real-world traffic conditions.

3. Proposed Methodology for the Efficient Multi-Object-Based Traffic Flow Analysis and Intensity Estimation Model for TSO

Here, the proposed methodology for the effective TSO model based on multi-object via traffic flow analysis and intensity estimation using UCB-MRL-CSFL is demonstrated. This framework mainly concentrates on enhancing TSO by focusing not only on the traffic flow but also on pedestrians, cyclists, and other non-motorized road users. The research methodology employs a reinforcement learning-based framework, which supports varying traffic conditions, including free-flow, moderate, and congested scenarios. In Figure 1, the proposed framework’s structural diagram is illustrated.

3.1. Real-Time Traffic Video Collection

Primarily, the real-time traffic video samples are collected from publicly accessible sources for efficient TSO.
a = 1 ,     2 ,     2 ,     ,     a         ; a = 1 a
Here, a demonstrates the maximum number of collected video samples a . Now, a are transferred to the cloud for real-time TSO.

3.2. Frame Conversion

Then, the frame conversion is involved to decompose a into a sequence of frames for accurate traffic flow analysis and object detection, leading to faster convergence. Here, each a is divided into a continuous set of image frames F b .
F b = F 1 ,     F 2 ,     F 3 ,     ,     F b         ; b = 1 b
Here, b represents the maximum number of F b .

3.3. Redundant Frame Removal

Now, the redundant frames are removed from F b to ensure efficient processing and reduce computational overhead. Redundant frames F r e d are duplicate frames of the original frame that have minimal or no changes.
F ^ b = F b F r e d
where F ^ b portrays the redundant frames removed frame set.

3.4. Preprocessing

Now, F ^ b often contains various imperfections, such as noise, lighting variations, and motion blur, affecting the accuracy of object detection for efficient TSO. Thus, preprocessing steps like noise removal, contrast enhancement, and sharpening are carried out for each F ^ b , enhancing the image quality for better signal optimization.
Noise removal: Initially, the quality of each F ^ b is enhanced by removing the unwanted random variations in image pixels a ^ , b ^ using a Median Filter (MF). The MF replaces each a ^ , b ^ of F ^ b with the median value ϑ m e d in its neighborhood, removing noise while maintaining the original sharpness of the edges.
F n o i = ϑ m e d F ^ b a ^ m ^ , b ^ n ^
Here, F n o i and m ^ , n ^ show the noise-removed frames and coordinates of F ^ b , respectively.
Contrast Enhancement: Then, the Adaptive Gaussian Histogram Smoothing Equalization (AGHSE) is used to improve the visibility of each F n o i for accurate object detection and tracking in video analysis. Conventional Adaptive Histogram Equalization (AHE) enhances the contrast of video frames by focusing mainly on the local region of the image instead of the entire frame, improving the contrast in areas that are too dark or too light while preserving the natural appearance of other areas. Yet it adjusts pixel intensities in local regions and abrupt transitions between regions, causing unnatural visual effects like halos around bright objects. Thus, to address the above-mentioned limitation, Gaussian Smoothing of Local Contrast Map (GSLCM) is introduced. The GSLCM helps to reduce the likelihood of harsh transitions or halos around high-contrast edges by smoothing the contrast difference between adjacent regions.
  • Primarily, F n o i are partitioned into a c number of grids g c , followed by grayscale conversion.
g c   F n o i g ^ c
where g ^ c demonstrates the grayscale-converted grids.
  • Now, the histogram ƛ h i s is calculated for each g ^ c , reflecting the intensity distribution values l .
ƛ h i s g ^ c = d l d ; 0 l c 1
Here, d portrays the maximum number of pixels p ^ .
  • The GSLCM is applied based on ƛ h i s to redistribute p ^ with each g ^ c , reducing the halos effect and smoothing edges.
    I m a p = 1 2 π σ s d exp ƛ h i s 2 2 σ s d 2
where I m a p and σ s d specify the mapped grids and standard deviation, respectively.
  • Lastly, by combining all I m a p , the contrast-enhanced frame F c o n is obtained.
Therefore, AGHSE enhances the contrast for each F n o i while preserving important information for effective TSO and object detection.
Sharpening: lastly, sharpening is applied to enhance the fine details in each F c o n , increasing edge clarity and obtaining preprocessed frames Ρ e .
Ρ e = Ρ 1 ,     Ρ 2 ,     Ρ 3 ,     ,     Ρ e         ; e = 1 e
Here, e establishes the maximum number of Ρ e . Therefore, the proposed framework improves the frame quality for accurate detection of vehicles, pedestrians, and cyclists during traffic flow analysis by using enhanced preprocessing approaches.

3.5. Lane Detection

Now, the lanes are detected from Ρ e to accurately identify the driving lanes on the road using the Hough Transform (HT) for structured traffic flow analysis and TSO. The HT is a powerful technique used to identify lines, which represent lane marking in road images. Also, it can detect lanes accurately even in challenging conditions like low lighting or varying road textures.
Initially, the edges c ^ , d ^ of each Ρ e are detected; also, the parameter space is defined in terms of polar coordinates r , θ to detect lines. Here, r , θ are defined by the perpendicular distance from the origin to the line in Ρ e and an angle, respectively. Then, the equation for the detected line is depicted as
r = c ^ cos θ + d ^ sin θ
Then, the corresponding value of r r is calculated for a range of θ , resulting in a curve in the parameter space for c ^ , d ^ .
Now, the accumulator array φ a c c is updated based on r , θ to vote possible lines in Ρ e , followed by local maxima calculation to find the peak parameter pair r ˜ , θ ˜ of the detected line.
r ˜ , θ ˜ = arg max φ a c c r , θ
Lastly, the lanes are detected by reconstructing r ˜ , θ ˜ in the image space using inverse polar transformation.
d ^ = cos θ ˜ sin θ ˜ c ^ + r ˜ sin θ ˜
L f = L 1 ,     L 2 ,     L 3 ,     ,     L f         ; f = 1 f
Here, f represents the maximum number of lanes detected in images L f . Therefore, the proposed framework effectively detects the lanes for accurate object detection in estimating efficient TSO.

3.6. Object Detection

Object detection is employed to identify and locate various road users, such as vehicles, pedestrians, cyclists, and other non-motorized entities from L f for efficient TSO once the lanes are detected. For this purpose, the proposed framework uses TC-YOLO. Traditional You Only Look Once (YOLO) processes the whole image in a single pass, enabling real-time object detection and overlapping objects [38]. Likewise, it employs a regression-centric approach to improve the accuracy of bounding box predictions, resulting in precise object localization. However, YOLO struggles to detect small objects in images or video frames, particularly when they are located in crowded scenes. Therefore, the Temporal Context Attention (TCA) mechanism is introduced to detect smaller objects. TCA helps YOLO to identify small objects even if they are occluded or difficult to detect in single frames by focusing on regions in which small objects are moving over time. In Figure 2, the TC-YOLO classifier’s diagram is depicted.
  • Primarily, to obtain bounding boxes ξ b o x , L f is decomposed into a g number of grids g .
L f g = 1 ,     2 ,     3 ,     ,     g         ; g = 1 g
  • Now, the class probabilities γ C P are calculated for each g to detect the objects in lanes.
γ C P g = 1
  • Then, the TCA Δ t c a is applied from γ C P to accurately detect small objects by eliminating overlapping ξ b o x using non-max suppression Δ N M S .
Δ t c a γ C P = ω w e γ C P
Δ N M S = Δ t c a γ C P ϕ I o U
where ϕ I o U and ω w e represent the intersection over the union operation and the weight value of TCA, correspondingly.
  • Lastly, the objects in the lanes like vehicles, pedestrians, cyclists, and other non-motorized entities are detected accurately based on Δ N M S . Next, the detected objects are indicated as O ˜ .
The pseudo-code for the TC-YOLO is depicted as follows.
Pseudo-code for the proposed TC-YOLO
Input:   Lanes   detected   frames   L f
Output: Object detected frames
Begin
Initialize   g , ξ b o x , ϕ I o U ,   iteration Π ,   and   maximum   iteration Π max
Set Π = 1
While Π Π max
For   each   L f do
Decompose L f   into g
L f g = 1 ,     2 ,     3 ,     ,     g
Create   ξ b o x
Calculate class probabilities
γ C P g = 1
Detect small objects     #Using TCA
Δ t c a γ C P = ω w e γ C P
Eliminate   overlapping   ξ b o x         #using non-max suppression
Δ N M S = Δ t c a γ C P ϕ I o U
End For
End While
Return:  O ˜
End
Therefore, the TC-YOLO not only accurately detects objects in each lane but also detects small objects and partially occluded road users to estimate efficient TSO.

3.7. Object Counting

The proposed framework counts and tracks the number of objects from O ˜ in each lane for analyzing traffic flow and estimating traffic intensity efficiently using the CVMKF. The prevailing Kalman Filter (KF) helps to predict the next state of vehicles based on their current and past states, reducing the risk of misidentification or loss of track, particularly in high-traffic scenarios. The KF’s predictions may be biased and inaccurate owing to the reliance on accurate initial state estimates at the start of the tracking process. Therefore, the Cumulative Vehicle Motion (CVM) is applied over a short period for initial velocity estimation. The CVM results in better initial tracking and provides precise predictions about the vehicles’ position, improving the overall tracking process.
Chiefly, from O ˜ , initial velocity ν i n i over a short period T is estimated using the CVM, followed by system state ε h S E and system state error covariance ε cov i initialization. In basic, velocity is measured in meters per second (m/s).
ν i n i T = p = 1 T v m O ˜ p
ε h S E = ε 1 S E ,     ε 2 S E ,     ε 3 S E ,     ,     ε h S E     ; h = 1 h
ε cov i = ε cov 1 ,     ε cov 2 ,     ε cov 3 ,     ,     ε cov i   ; i = 1 i
Here, h and i portray the maximum number of ε h S E and ε cov i , respectively, and v m and p exemplify the transformation matrix and index of T , correspondingly. Now, ε h S E and ε cov i are predicted based on ν i n i to count and track objects.
ε ^ h S E T = M s t T ε h S E T 1 ν i n i + M c i n T ς c o n T
ε ^ cov i T = M s t T ε cov i T 1 M s t T t r a ν i n i + ς P N C T
where ε ^ h S E , ε ^ cov i signify the predicted ε h S E and ε cov i , respectively, M s t , M c i n illustrate the state transition matrix and control input matrix, correspondingly, t r a indicates the transpose function, and ς c o n , ς P N C depict the control vector and process noise covariance, respectively. Next, the Kalman gain K g a i n is calculated to minimize the estimation error for accurate object counting.
K g a i n = ε ^ cov i T M m e a t r a M m e a ε ^ cov i T M m e a t r a + M cov
where M m e a and M cov designate the measurement matrix and covariance matrix, correspondingly. Lastly, by estimating ε ^ h S E and ε ^ cov i , the objects counted and tracked frames O ¯ j are obtained based on K g a i n .
E S E = ε ^ h S E + K g a i n T m e a M m e a ε ^ h S E
E cov = ε ^ cov i K g a i n M m e a ε ^ cov i
O ¯ j = O ¯ 1 ,     O ¯ 2 ,     O ¯ 3 ,     ,     O ¯ j         ; j = 1 j
where E S E and E cov signify ε h S E and ε cov i estimated using K g a i n , respectively, and j illustrates the maximum number of O ¯ j . Thus, the proposed framework effectively counts and tracks the objects that are present in each lane based on E S E and E cov , thereby enabling accurate traffic flow analysis and intensity estimation of efficient TSO.

3.8. Queue Detection

Then, the formations of vehicle queues are identified from O ¯ j to analyze congestion levels and optimizing TSs dynamically using Vehicle Density Mapping (VDM). The VMD helps to accurately identify traffic congestion and queues in real time by providing a spatial representation of the vehicle concentration for each lane.
Initially, the Region of Interest (ROI) ζ r o i is defined for each O ¯ j to extract vehicle positions, followed by vehicle density υ d e n computation. Here, vehicle position is measured in meters (m), and vehicle density is quantified as vehicles per kilometer.
ζ r o i O ¯ j = m ^ min , n ^ min , m ^ max , n ^ max
υ d e n = j A ^ ζ r o i
Here, m ^ min , n ^ min and m ^ max , n ^ max represent the top-left corner and bottom-right corner coordinates of O ¯ j , respectively, and A ^ illustrates the area of ζ r o i . Essentially, the area is measured in square kilometers (km2). Now, based on υ d e n , the queue q ˜ ¨ is detected, followed by queue length q ˜ ¨ l e n estimation. Thus, the queue length is measured in meters (m).
q ˜ ¨ l e n = k × l e n q ˜ ¨
where k and l e n represent the maximum number of queued vehicles and the average length of vehicles in q ˜ ¨ , respectively. Lastly, by generating a spatial vehicle density map from q ˜ ¨ l e n , the queue-detected frames Q det are obtained, providing a real-time visualization of traffic congestion levels for efficient TSO.

3.9. Traffic Flow Analysis

Now, to understand the movement patterns of vehicles, pedestrians, cyclists, and other non-motorized road users across various lanes, the traffic flow is analyzed from Q det for effective TSO. For this purpose, the proposed framework uses FVOF. The conventional Optical Flow (OF) provides real-time updates on vehicle speeds and traffic density, enabling it to handle complex traffic scenarios like crowded scenes and varied vehicle types. However, if vehicles are blocked by another vehicle or an object, then they struggle with occlusions and may misinterpret motion or fail to track individual vehicles. Therefore, feature detectors like Harris corner detection, Scale-Invariant Feature Transform (SIFT), and Speeded Up Robust Features (SURF) are utilized to track key features of vehicles across frames, detecting potential occlusions based on the change in visual features between consecutive frames.
Primarily, the key features Ξ Fea like Harris corner detection, SIFT, and SURF are extracted from Q det , followed by the brightness constancy assumption for each Ξ Fea .
Q det Ξ Fea
ζ g r a h , v , o = ζ g r a h + ω x , v + ω y , o + T
where ζ g r a shows the o t h frame gradient at the Ξ Fea location, h , v exemplify the spatial coordinates of Ξ Fea , and ω x , ω y notate the displacement vectors (unit—meters) of Ξ Fea . Now, the optical flow constraint equation is obtained by using the first-order Taylor series expansion to estimate the dense motion field.
ζ g r a h ω x + ζ g r a v ω y + ζ g r a o = 0
Lastly, this constraint is applied to all Ξ Fea to compute their motion vector. The resulting dense motion field is used to generate traffic flow analyzed frames f l o . Thus, the proposed framework effectively analyzes the traffic flow, thereby allowing a better understanding of the movement patterns of vehicles, pedestrians, and other non-motorized road users.

3.10. Traffic Intensity Estimation

After analyzing the traffic flow, the traffic intensity is estimated for a dynamic and efficient TSO based on f l o . The traffic intensity represents the number of vehicles and other road users passing through each lane over a specific T . Here, the traffic intensity is quantified as vehicles per hour or time.
I e s t = l f l o T
Here, l portrays the number of objects in f l o and I e s t demonstrates the estimated traffic intensity. The proposed framework can assess the real-time traffic load in each lane by calculating the traffic intensity, thereby enabling dynamic adjustment of TSs to reduce congestion and optimize traffic flow. The integration of traffic intensity into the decision-making process enhances the adaptability of the traffic control system.

3.11. Emergency Vehicle Separation

Now, the emergency vehicles on the road are separated based on the siren flashlight colors from O ¯ j , enhancing public safety and system responsiveness. Thus, the proposed model uses the color segmentation-based approach to identify emergency vehicles, such as ambulances, fire trucks, and police vehicles, which typically use red and blue siren lights. Here, O ¯ j are transformed in Hue, Saturation, and Value (HSV) color space to extract red and blue regions.
O ¯ j H S V O h s v
Here, O h s v implies the HSV color-spaced frames. Next, to recognize the shape of a fire truck or ambulance, contour detection is applied. Now, ordinary vehicles v o r d with red or blue reflections are filtered out by analyzing the area, shape, and size (unit –square meters) of the vehicles. Lastly, the detected emergency vehicles are separated from O ¯ j .
V e m r = O h s v v o r d
where V e m r validates the emergency vehicles presented images. Therefore, the proposed framework efficiently separates emergency vehicles, contributing to safer and more responsive TS controls.

3.12. Traffic Signal Optimization

Lastly, the proposed framework optimizes the TSs using the UCB-MRK-CSFL based on V e m r and I e s t and the pedestrian information ( P inf ) from O ¯ j . Conventional Fuzzy Logic (FL) effectively handles imprecise and uncertain information, allowing for smooth decision-making in ambiguous environments [39]. Yet it lacks adaptability in highly dynamic and distributed systems, where traffic conditions fluctuate rapidly. Thus, MARL is incorporated with the fuzzy logic system, which is a decision-making system that allows for smooth, continuous control of TSs and prevents abrupt changes [40]. It enables more nuanced actions and allows for more fine-grained control over signal timing, leading to better traffic flow and fewer disruptions. Yet, it is prone to non-stationary due to the interactions of multiple agents, making it difficult for agents to converge on an optimal solution, particularly when there is a high variability in traffic patterns. Therefore, the Upper Confidence Bound (UCB) strategy is applied to balance exploration and exploitation during the learning phase, adapting to the dynamic nature of the traffic system. Likewise, the Cubic Spline (CS) membership function is applied in fuzzy logic to accurately model complex, multimodal, or non-linear relationships between the input variables and membership grades.
The proposed UCB-MRL-CSFL approach incorporates the presence of non-motorized road users into the traffic optimization process. Also, the detected pedestrians and cyclists are included in the system’s state representation, allowing the agents to consider their density and wait times. Moreover, the reward function is designed to penalize excessive delays for non-motorized users, thereby allocating the fair signal timing across all user types. Furthermore, fuzzy logic rules are applied to dynamically prioritize the users based on real-time conditions, ensuring adaptive traffic signal control. The detailed modeling of the proposed UCB-MRL-CSFL is given below.
Primarily, the traffic network is modeled with the r number of agents Φ from V e m r , P inf , and I e s t using the Markov game. Here, each traffic signal is treated as an agent in a multi-agent environment. Each agent observes the current state and selects a suitable action. Then, the agent receives a reward based on traffic efficiency and non-motorized user satisfaction.
Φ = r , V e m r , P inf , I e s t , s a , F ¯ ¯ , R ¯ ¯
Here, s a , F ¯ ¯ , and R ¯ ¯ represent the action space, transition probability function, and reward function for Φ , respectively. Here, the action space includes changing signal phase, extending green time, prioritizing a specific lane, extending pedestrian crossing time, prioritizing walk signals, and allocating exclusive pedestrian phases. Therefore, the agent initiates targeted actions for non-motorized users. Now, Φ select the actions a c t using UBC, handling the non-stationary environment by balancing both exploration and exploitation.
a c t = μ R + t c ln s t
where μ R , t c , s , and t demonstrate the mean reward of R ¯ ¯ , tunable constant, number of selections across all actions by Φ , and the number of times that particular action is selected, correspondingly.
The state space includes traffic density, queue length, object count (vehicles, pedestrians, and cyclists), and emergency vehicle presence for each lane. Here, the state space ensures that the agent’s perception includes all types of road user.
The modeled network transitions to new states to receive corresponding rewards based on a c t . This reward is used to update each Φ . Thus, a reward signal aids in penalizing congestion, long queues, and non-motorized user delays. Agents learn a near-optimal policy over time for adaptive traffic signal control. Next, by using the CS membership function, the updated agents Φ u p are converted into fuzzy sets ϑ f u z .
Φ u p Ψ C S ϑ f u z
Ψ C S Φ u p = 0 ; Φ u p ψ p a r 1               2 Φ u p ψ p a r 1 ψ p a r 2 ψ p a r 1 3 ; ψ p a r 1 < Φ u p ψ p a r 2 1 2 ψ p a r 4 Φ u p ψ p a r 4 ψ p a r 3 3 ; ψ p a r 3 < Φ u p ψ p a r 4 1 ; ψ p a r 2 < Φ u p ψ p a r 3 0 ; Φ u p > ψ p a r 4
where ψ p a r 1 , ψ p a r 2 , ψ p a r 3 ,   ψ p a r 4 illustrate the parameters of Ψ C S .
Now, the fuzzy rules f u z are created from ϑ f u z to optimize TSs.
f u z = i f L = δ e v ; First   priority i f L = δ Ped ; Second   priority i f I e s t = h i g h ; Third   priority
where δ e v and δ Ped validate the emergency vehicles and pedestrians, correspondingly. L gets a green signal as the first priority if the lane L with δ e v is detected. The green signal is activated as the second priority if L with δ Ped is detected. Likewise, the green signal is activated as the third priority if L with high I e s t is detected.
Next, the inference system calculates the inferred data D inf based on f u z for efficient TSO.
D inf = ϑ f u z f u z
Lastly, the TS-optimized results are obtained by performing the defuzzification process ƛ d e f .
ƛ d e f = D inf Ψ C S D inf Ψ C S D inf
The TSs are effectively optimized Ω O p t by dynamically adjusting the green, yellow, and red timing centered on f u z by using the UCB-MRL-CSFL.
The pseudo-code for the UCB-MRL-CSFL is depicted as follows.
Pseudo-code for the proposed UCB-MRL-CSFL
Input: Pedestrian information P inf , estimated intensity I e s t , and emergency vehicle-separated images V e m r
Output: Optimized traffic signals
Begin
          Initialize μ R , t c , s , f u z , iteration Π , and maximum iteration Π max
          Set Π = 1
          While Π Π max
          For each I e s t , P inf and V e m r do
          Model traffic network      #with agents
           Φ = r , V e m r , P inf , I e s t , s a , F ¯ ¯ , R ¯ ¯
          Select actions                    #Using UBC
           a c t = μ R + t c ln s t
          Update Φ
          Use CS membership function
          Apply fuzzy rule
          If L = δ e v
          {
           First   priority
          }
          Else If L = δ Ped
          {
Second   priority
          }
          Else If I e s t = h i g h
          {
           Third   priority
          }
          Else
          {
           Least   priority
          }
          End If
          Calculate D inf = ϑ f u z f u z
Perform Defuzzification
           ƛ d e f = D inf Ψ C S D inf Ψ C S D inf
          End For
          End While
          Return: Ω O p t
End
Reinforcement learning enables agents to continuously learn and adapt their decisions based on the dynamic environment by observing real-time traffic states and receiving feedback through the reward function. This adaptability allows the system to optimize signal timings effectively across a wide range of traffic patterns, ensuring scalable performance.
Therefore, the proposed framework effectively ensures dynamic, real-time TS optimization based on both traffic intensity and the presence of emergency vehicles, thereby reducing congestion, minimizing vehicle waiting times, and enhancing the overall efficiency and safety of road networks.

4. Result and Discussion

Here, the proposed framework’s performance in TSO is discussed by comparing it with several conventional works. The proposed framework’s implementation is conducted in the working platform of PYTHON.

4.1. Dataset Description

The dataset used for the proposed framework is collected from publicly available traffic surveillance sources to optimize TSs. It consists of real-time video footage capturing various traffic scenarios at intersections. Also, it includes diverse road users, such as vehicles, pedestrians, cyclists, and emergency vehicles. In the proposed work, a total of 10 real-time traffic video samples are utilized for experimentation. These videos are collected from publicly accessible sources, such as YouTube, Open Traffic Camera repositories, and city-level traffic surveillance archives. The collected videos represent urban traffic scenarios from diverse geographical locations, including intersections in India, the United States, Vietnam, and Southeast Asia. Each video has a duration ranging from 2 to 5 min. The video resolutions range from 720p to 1080p, ensuring sufficient visual quality for object detection. The dataset includes a variety of traffic conditions, such as peak and off-peak hours, and varied road types (single-lane and multi-lane intersections). This diversity ensures the robustness and generalizability of the proposed framework under real-world operational settings. The traffic data used in the proposed work is collected from urban intersections under varying real-world conditions, including moderate and high traffic density. Due to the reinforcement learning approach, the model can adapt to different traffic scenarios, including free-flow and congested conditions.
The image results for the proposed framework that highlight its efficiency in effectively optimizing TSs by considering a single video are illustrated in Table 1. From this table, it is noted how the proposed framework optimizes the TSs effectively by processing the input real-time videos regarding frame conversion, noise removal, contrast enhancement, sharpening, lane detection, object detection, queue detection, and traffic flow analysis.
Table 2 exhibits processing sequences, including frame conversion, noise removal, contrast enhancement, object detection, queue detection, traffic flow analysis, and traffic intensity evaluation with respect to the two distinct traffic conditions, such as free-flow and congested traffic. Primarily, the frames are extracted from real-time traffic video footage. In free-flow conditions, vehicles are spaced apart and moved in a smooth manner. However, the frame shows a dense vehicle with minimal gaps in a congested scenario. After noise removal and contrast enhancement, lane detection is performed. In the proposed work, sharpening is performed to identify the smaller or fast-moving objects, improving the accuracy of intensity estimation. Regarding lane detection, lane boundaries are precisely recognized owing to the visible road surface between vehicles. In congestion, lane detection is more complex owing to overlapping lane markers. During object detection, fewer bounding boxes appear in free-flow. Likewise, numerous bounding boxes are detected in a congested scenario. Thus, the proposed system effectively distinguishes individual entities even under occlusion-heavy scenes. Furthermore, the proposed work accurately counts the objects per lane in both the free-flow and congested conditions. Moreover, the optical flow vectors are unidirectional in free-flow and chaotic in congested flow. Still, the proposed work proficiently differentiates the low- and high-traffic conditions due to the inclusion of traffic flow analysis and density estimation. The proposed model is validated across both low-density free-flow and high-density congested conditions. During the free flow, the agent initiates the short green signals due to a low queue. But the RL agent increases green time or prioritizes lanes owing to the long queue or the presence of emergency vehicles. Thus, the proposed work is more robust and adaptive when it comes to handling real-time free-flow and congested traffic patterns.

4.2. Performance Validation

Here, the proposed framework’s performance is validated by analyzing the proposed techniques’ effectiveness in object detection, TS optimization, object counting, contrast enhancement, and traffic flow analysis.

4.2.1. Efficiency Analysis for the Proposed TC-YOLO

Here, the TC-YOLO’s efficiency in object detection is depicted by comparing it with several prevailing techniques like YOLO, Faster Region-based Convolutional Neural Network (FR-CNN), Single Shot multi-box Detection (SSD), and EfficientDet (ED).
The TC-YOLO’s efficiency in detecting objects like emergency vehicles, pedestrians, and other non-motorized road users for traffic flow analysis and intensity estimation is exhibited in Figure 3a–c. To detect small objects, the proposed framework uses the TCA mechanism with YOLO, achieving higher intersection over union (IoU) (0.8693), lower inference time (7009 ms), and higher processing speed (135.0814 Frames Per Second (FPSs)). Yet, traditional approaches struggle to detect small objects in images or video frames in crowded scenes, leading to a weaker object detection performance. Therefore, TC-YOLO accurately detects objects by using the TCA approach, thereby paving the way for efficient traffic flow analysis and intensity estimation.

4.2.2. Performance Evaluation for the Proposed UCB-MRL-CSFL

The UCB-MRL-CSFL’s performance in efficient TSO is evaluated against several traditional methodologies like Fuzzy, Sigmoid fuzzy, Trapezoidal fuzzy, and Triangular fuzzy.
In Figure 4, the proposed framework’s performance is analyzed with regard to fuzzification, defuzzification, and rule generation times. As per the figure, the UCB-MRL-CSFL takes minimum fuzzification, defuzzification, and rule generation times of 2371ms, 2319ms, and 3361ms, correspondingly. This is because of the utilization of UBC and CS membership functions, which help with effective TSO by balancing exploration and exploitation of the learning process and modeling the complex, multimodal, or non-linear relationships between input variables. Therefore, the UCB-MRL-CSFL outperforms the other conventional methodologies.
UCB-MRL-CSFL’s efficiency in TSO with regard to the convergence rate and computational efficiency is depicted in Figure 5. As per the figure, the UCB-MRL-CSFL attains a higher convergence rate (91.26%) and computational efficiency (94.45%) than the other conventional methodologies. Yet the prevailing approaches face difficulty in converging optimal solutions due to the non-stationary environment and interactions between multiple agents, attaining lower convergence rates and computational efficiency. Therefore, the proposed framework outperforms the other conventional TSO methodologies.

4.2.3. Efficacy Validation for the Proposed CVMKF

Here, the CVMKF’s efficacy in object counting for each lane is validated with several prevailing techniques like KF, Particle Filter (PF), Simple Online and Real-time Tracking (SORT), and Gaussian Sum Filter (GSF). The performance of the proposed CVMKF is validated with regard to metrics like RMSE and MAE. MAE measures the average magnitude of errors between predicted and actual values. In general, RMSE measures the square root of the average squared differences between actual and predicted values. The corresponding formulas of the metrics, namely RMSE and MAE, are shown in Table 3.
In Table 3, z denotes the total number of samples, x g indicates the predicted outcome, and x g demonstrates the actual outcome.
In Figure 6, CVMKF’s efficiency in object counting in each detected lane for efficient TSO with regard to Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) is illustrated. As shown in this figure, CVMKF outperforms the other conventional methodologies by attaining a lower RMSE (2.8787) and MSE (7.109). This is because of the integration of CVM for initial velocity estimation, which helps to track and count the objects accurately, thereby reducing the error rate in TSO. Yet traditional methodologies like KF, PF, SOR, and GSF have higher RMSE and MAE due to the reliance on accurate initial state estimates, leading to bias and inaccurate prediction.

4.2.4. Performance Analysis for the Proposed AGHSE

Here, AGHSE’s effectiveness in enhancing the video frames for efficient TSO is analyzed and compared with several conventional approaches, such as AHE, Contrast Limited Adaptive Histogram Equalization (CLAHE), Double Plateau Histogram Equalization (DPHE), and Histogram Equalization (HE).
The AGHSE’s performance in enhancing the contrast of the traffic video frames to optimize TSs with regard to the Peak Signal-to-Noise Ratio (PSNR) and Contrast Improvement Index (CII) is depicted in Table 4. This table proves that the proposed framework efficiently improves the image contrast while preserving the important details to detect objects. As per the table, AGHSE attains a higher PSNR and CII of 38.7625dB and 1.7404, respectively. Yet the conventional approaches fail to achieve a better performance in terms of contrast enhancement, leading to a lower TSO performance. Consequently, by incorporating GSLCM, AGHSE outperforms the other prevailing techniques to eliminate the abrupt transitions between regions, thereby reducing halo effects.
In Figure 7, AGHSE’s effectiveness in contrast enhancement is depicted. Here, the proposed framework incorporates GSLCM with AHE, enhancing the image quality without hiding important information. Yet conventional AHE, CLAHE, DPHE, and HE attain lower Structural Similarity Index Measurements (SSIMs) of 0.8972, 0.8269, 0.7722, and 0.7511, and Edge Preservation Indexes (EPIs) of 0.884, 0.8592, 0.8289, and 0.7798, correspondingly, leading to reduced image quality. Therefore, compared to other prevailing techniques, AGHSE performs better with SSIMs and EPIs of 0.9273 and 0.924, respectively.

4.2.5. Effectiveness Validation for the Proposed FVOF

Here, the effectiveness of the FVOF is validated to highlight its efficacy in traffic flow analysis against several traditional techniques like OF, Block-Matching Algorithm (BMA), Lucas–Kanade (LK), and Horn–Schunck (HS).
The Signal-to-Noise Ratio (SNR) of the FVOF in traffic flow analysis is depicted in Table 5. Here, the FVOF achieves the highest SNR of 34.48 dB, reflecting its enhanced ability to detect meaningful motion features, even in noisy or occluded conditions. Traditional methodologies like OF, MA, LK, and HS suffer from lower SNRs of 28.02 dB, 24.06 dB, 20.97 dB, and 17.89 dB, correspondingly, due to their limited ability to handle visual occlusions and dynamic traffic scenarios. Therefore, the proposed framework outperforms other traditional methodologies in traffic flow analysis for efficient TSO.

4.3. Comprehensive Analysis

To highlight the proposed framework’s effectiveness in efficient TSO, a comparative analysis is carried out.
To demonstrate the proposed framework’s efficiency in TSO, a comparative analysis of the proposed framework and some conventional works is performed, as shown in Table 6. As per the above table, the proposed framework effectively optimizes the TS in real time by efficiently analyzing the traffic flow, estimating intensity, and considering emergency vehicles and pedestrians. The conventional approaches face several limitations, although they achieve high accuracy and a low RMSE, MSE, and delay time, reducing the TSO performance. Therefore, the proposed framework outperforms the other prevailing methodologies by effectively performing TSO.

5. Conclusions

Here, a multi-object-based efficient TSO framework was proposed via an analysis of traffic flow and intensity using UCB-MRL-CSFL. This model effectively optimized the TSs not only by considering the traffic flow and intensity, but also by focusing on emergency vehicles, pedestrians, cyclists, and other non-motorized road users. Likewise, this framework accurately processed the real-time traffic surveillance video with regard to frame conversion, redundant frame removal, and preprocessing. The lanes were accurately detected, followed by object detection using TC-YOLO, which accurately detected objects like vehicles, emergency vehicles, pedestrians, cyclists, and non-motorized users with 135.081476 FPS processing time. In addition, CVMKF counted the objects in each lane, and VDM detected queues. Based on the queue, the proposed framework analyzed the traffic flow using FVOF, attaining 34.48dB SNR. Also, traffic intensity was estimated, and emergency vehicles were separated to perform TSO. Lastly, the proposed framework effectively optimized the signals based on estimated intensity, emergency vehicles, and pedestrian information using UCB-MRL-CSRL, attaining a 91.26% convergence rate. Therefore, the proposed framework provided a real-time TSO solution capable of handling complex, multimodal urban traffic scenarios.
Limitations: The proposed UCB-MRL-CSFL approach demonstrates enhanced efficiency in traffic signal optimization by integrating multi-agent reinforcement learning and fuzzy logic. However, the proposed methodology faces several constraints compared to traditional fuzzy logic systems and AI-based approaches. The proposed approach faces deployment challenges during the integration of multiple components, such as TC-YOLO-based object detection, CVMKF-based tracking, and UCB-MRL-CSFL-based decision-making. Contrarily, standard fuzzy logic systems require simple maintenance. In general, traditional AI-based systems had lightweight computations in low-resource environments. However, the reinforcement learning component requires substantial training time and high-quality data to converge to optimal policies. In real time, extending the proposed work to large-scale traffic networks with multiple intersections causes scalability issues.
Future scope: Our proposed framework overlooked environmental factors, although it performed TSO effectively by focusing on pedestrians, non-motorized road users, etc. Thus, in the future, we will present a multi-objective model that considers environmental factors like rain, snow, fog, and changes in daylight hours to enhance safety, efficiency, and sustainability in signal control strategies. Furthermore, the proposed framework will be extended to support multi-intersection coordination across smart cities. Moreover, edge computing will be integrated with the proposed work to ensure real-time scalability.

Author Contributions

Conceptualization, Z.S.N.; methodology, Z.S.N.; software, Z.S.N.; validation, Z.S.N.; formal analysis, Z.S.N.; investigation, Z.S.N.; resources, Z.S.N.; data curation, Z.S.N.; writing—original draft preparation, Z.S.N.; writing—review and editing, Z.S.N.; visualization, Z.S.N.; supervision, H.M. and A.F.; project administration, H.M. and A.F.; All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data is contained within the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Gu, G.; Sun, X.; Lou, B.; Wang, X.; Yang, B.; Chen, J.; Zhou, D.; Huang, S.; Hu, Q.; Bao, C. A study of Mixed Non-Motorized Traffic Flow Characteristics and Capacity based on Multi-Source Video data. Sensors 2024, 24, 7045. [Google Scholar] [CrossRef] [PubMed]
  2. Hashmi, H.T.; Ud-Din, S.; Khan, M.A.; Khan, J.A.; Arshad, M.; Hassan, M.U. Traffic flow optimization at Toll Plaza using proactive deep learning strategies. Infrastructures 2024, 9, 87. [Google Scholar] [CrossRef]
  3. Zhong, L.; Chen, Y. A novel Real-Time Traffic Signal Control Strategy for Emergency vehicles. IEEE Access 2022, 10, 19481–19492. [Google Scholar] [CrossRef]
  4. Alruwaili, M.; Ali, A.; Almutairi, M.; Alsahyan, A.; Mohamed, M. LSTM and ResNet18 for optimized ambulance routing and traffic signal control in emergency situations. Sci. Rep. 2025, 15, 6011. [Google Scholar] [CrossRef]
  5. Tajalli, M.; Hajbabaie, A. Traffic signal timing and trajectory optimization in a mixed autonomy traffic stream. IEEE Trans. Intell. Transp. Syst. 2021, 23, 6525–6538. [Google Scholar] [CrossRef]
  6. Gupta, M.; Miglani, H.; Deo, P.; Barhatte, A. Real-time traffic control and monitoring. e-Prime Adv. Electr. Eng. Electron. Energy 2023, 5, 100211. [Google Scholar] [CrossRef]
  7. Ali, M.E.M.; Durdu, A.; Celtek, S.A.; Yilmaz, A. An Adaptive Method for Traffic Signal Control Based on Fuzzy Logic with Webster and Modified Webster Formula Using SUMO Traffic Simulator. IEEE Access 2021, 9, 102985–102997. [Google Scholar] [CrossRef]
  8. Macioszek, E.; Iwanowicz, D. A back-of-queue model of a signal-controlled intersection approach developed based on analysis of vehicle driver behavior. Energies 2021, 14, 1204. [Google Scholar] [CrossRef]
  9. Zinebi, K.; Souissi, N.; Tikito, K. Selecting qualitative features of driver behavior via Pareto analysis. Int. J. Mod. Educ. Comput. Sci. 2018, 10, 1–10. [Google Scholar] [CrossRef]
  10. Wang, P.; Ni, W. An enhanced dueling double deep Q-Network with convolutional block attention module for traffic signal optimization in deep reinforcement learning. IEEE Access 2024, 12, 44224–44232. [Google Scholar] [CrossRef]
  11. Quang, P.H.; Thanh, P.P.; Van Anh, T.N.; Phi, S.V.; Nhat, B.L.; Trong, H.N. Vietnamese vehicles speed detection with video-based and deep learning for real-time traffic flow analysis system. In Proceedings of the 2021 15th International Conference on Advanced Computing and Applications (ACOMP, IEEE 2021), Ho Chi Minh City, Vietnam, 24–26 November 2021; Volume 193, pp. 62–69. [Google Scholar] [CrossRef]
  12. Shirmohammadi, H.; Hadadi, F. Optimizing total delay and average queue length based on the fuzzy logic controller in urban intersections. Int. J. Supply Oper. Manag. 2019, 6, 142–158. [Google Scholar]
  13. Ma, W.; Wan, L.; Yu, C.; Zou, L.; Zheng, J. Multi-objective optimization of traffic signals based on vehicle trajectory data at isolated intersections. Transp. Res. Part C Emerg. Technol. 2020, 120, 1–27. [Google Scholar] [CrossRef]
  14. Alsubai, S.; Dutta, A.K.; Sait, A.R.W. Hybrid deep learning-based traffic congestion control in IoT environment using enhanced arithmetic optimization technique. Alex. Eng. J. 2024, 105, 331–340. [Google Scholar] [CrossRef]
  15. Hurtado-Gómez, J.; Romo, J.D.; Salazar-Cabrera, R.; De La Cruz, Á.P.; Molina, J.M.M. Traffic signal control system based on intelligent transportation system and reinforcement learning. Electronics 2021, 10, 2363. [Google Scholar] [CrossRef]
  16. Li, W.; Zhang, H.; Huang, Z.; Li, C. Human-Vehicle Intersection Traffic Lights Timing Optimization research. J. Adv. Transp. 2022, 2022, 5549454. [Google Scholar] [CrossRef]
  17. Zhao, X.; Flocco, D.; Azarm, S.; Balachandran, B. Deep reinforcement learning for the Co-Optimization of vehicular flow direction design and signal control policy for a road network. IEEE Access 2023, 11, 7247–7261. [Google Scholar] [CrossRef]
  18. Tang, D.; Duan, Y. Traffic Signal Control Optimization Based on Neural Network in the Framework of Model Predictive Control. Actuators 2024, 13, 251. [Google Scholar] [CrossRef]
  19. Ning, X.; Tian, H.; Lin, Y.; Yao, X.; Hu, F.; Yin, Y. Research on Multi-Objective Optimization Models for intersection crossing of connected autonomous vehicles with traffic signals. IEEE Access 2024, 12, 36825–36840. [Google Scholar] [CrossRef]
  20. Ahmed, M.; Liaquat, F.; Naz, M.A.; Ahmed, M.; Ahmed, A. Traffic Signal Optimization Using Matrix Algorithm: A Blockchain Technology and AI Approach. Open Access Libr. J. 2024, 11, 1–27. [Google Scholar] [CrossRef]
  21. Jafari, S.; Shahbazi, Z.; Byun, Y.C. Improving the road and traffic control prediction based on fuzzy logic approach in multiple intersections. Mathematics 2022, 10, 2832. [Google Scholar] [CrossRef]
  22. Neelakandan, S.; Berlin, M.A.; Tripathi, S.; Devi, V.B.; Bhardwaj, I.; Arulkumar, N. IoT-based traffic prediction and traffic signal control system for smart city. Soft Comput. 2021, 25, 12241–12248. [Google Scholar] [CrossRef]
  23. Bouktif, S.; Cheniki, A.; Ouni, A.; El-Sayed, H. Deep reinforcement learning for traffic signal control with consistent state and reward design approach. Knowl.-Based Syst. 2023, 267, 110440. [Google Scholar] [CrossRef]
  24. Mo, Z.; Li, W.; Fu, Y.; Ruan, K.; Di, X. CVLight: Decentralized learning for adaptive traffic signal control with connected vehicles. Transp. Res. Part C Emerg. Technol. 2022, 141, 103728. [Google Scholar] [CrossRef]
  25. Vlachogiannis, D.M.; Wei, H.; Moura, S.; Macfarlane, J. HumanLight: Incentivizing Ridesharing via Human-Centric Deep Reinforcement Learning in Traffic Signal Control. Transp. Res. Part C Emerg. Technol. 2024, 162, 104593. [Google Scholar] [CrossRef]
  26. Guo, J.; Cheng, L.; Wang, S. COTV: Cooperative control for traffic light signals and connected autonomous vehicles using deep reinforcement learning. IEEE Trans. Intell. Transp. Syst. 2023, 24, 10501–10512. [Google Scholar] [CrossRef]
  27. Fredianelli, L.; Carpita, S.; Bernardini, M.; Del Pizzo, L.G.; Brocchi, F.; Bianco, F.; Licitra, G. Traffic flow detection using camera images and machine learning methods in ITS for noise map and action plan optimization. Sensors 2022, 22, 1929. [Google Scholar] [CrossRef]
  28. Zou, S.; Chen, H.; Feng, H.; Xiao, G.; Qin, Z.; Cai, W. Traffic flow video image recognition and analysis based on Multi-Target Tracking algorithm and deep learning. IEEE Trans. Intell. Transp. Syst. 2022, 24, 8762–8775. [Google Scholar] [CrossRef]
  29. Zhang, H.; Fang, Z.; Chen, Y.; Dai, H.; Jiang, Q.; Zeng, X. Traffic signal optimization control method based on attention mechanism updated weights double deep Q network. Complex Intell. Syst. 2025, 11, 217. [Google Scholar] [CrossRef]
  30. Lin, H.; Han, Y.; Cai, W.; Jin, B. Traffic signal optimization based on fuzzy control and differential evolution algorithm. IEEE Trans. Intell. Transp. Syst. 2022, 24, 8555–8566. [Google Scholar] [CrossRef]
  31. Inoue, D.; Yamashita, H.; Aihara, K.; Yoshida, H. Traffic signal optimization in large-scale urban road networks: An adaptive-predictive controller using Ising models. IEEE Access 2024, 1, 188739–188754. [Google Scholar] [CrossRef]
  32. Shirmohammadi, H.; Hadadi, F. Application of Fuzzy Logic for Evaluation of Resilient Modulus Performance of Stone Mastic Asphalt. J. Theor. Appl. Inf. Technol. 2017, 95, 1–13. [Google Scholar]
  33. Jafari, S.; Shahbazi, Z.; Byun, Y.C. Traffic control prediction design based on fuzzy logic and lyapunov approaches to improve the performance of road intersection. Processes 2021, 9, 2205. [Google Scholar] [CrossRef]
  34. Yuan, T.; Ioannou, P.A. Integrated Freeway Traffic Control Using Q-Learning with Adjacent Arterial Traffic Considerations. IEEE Trans. Intell. Transp. Syst. 2025, 26, 1–12. [Google Scholar] [CrossRef]
  35. Dubey, R.K.; Dailisan, D.; Sánchez–Vaquerizo, J.A.; Helbing, D. FAIRLANE: A multi-agent approach to priority lane management in diverse traffic composition. Transp. Res. Part C Emerg. Technol. 2025, 171, 1–14. [Google Scholar] [CrossRef]
  36. Al-Heety, O.S.; Zakaria, Z.; Abu-Khadrah, A.; Ismail, M.; Shakir, M.M.; Alani, S.; Alsariera, H. Traffic Congestion Control with Emergency Awareness and Optimized Communication Infrastructure using Reinforcement Learning and Non-Dominated Sorting Genetic Algorithm. IEEE Access 2025, 1–22. [Google Scholar] [CrossRef]
  37. Sun, D.; Jamshidnejad, A.; De Schutter, B. A novel framework combining MPC and deep reinforcement learning with application to freeway traffic control. IEEE Trans. Intell. Transp. Syst. 2024, 25, 6756–6769. [Google Scholar] [CrossRef]
  38. Zarei, N.; Moallem, P.; Shams, M. Fast-Yolo-rec: Incorporating Yolo-base detection and recurrent-base prediction networks for fast vehicle detection in consecutive images. IEEE Access 2022, 10, 120592–120605. [Google Scholar] [CrossRef]
  39. Xu, M.; Chai, J.; Yan, Y.; Qu, X. Multi-agent fuzzy-based transit signal priority control for traffic network considering conflicting priority requests. IEEE Trans. Intell. Transp. Syst. 2021, 23, 1554–1564. [Google Scholar] [CrossRef]
  40. Li, Z.; Yu, H.; Zhang, G.; Dong, S.; Xu, C.Z. Network-wide traffic signal control optimization using a multi-agent deep reinforcement learning. Transp. Res. Part C Emerg. Technol. 2021, 125, 1–36. [Google Scholar] [CrossRef]
  41. Benjdira, B.; Koubaa, A.; Azar, A.T.; Khan, Z.; Ammar, A.; Boulila, W. TAU: A framework for video-based traffic analytics leveraging artificial intelligence and unmanned aerial systems. Eng. Appl. Artif. Intell. 2022, 114, 105095. [Google Scholar] [CrossRef]
  42. Ragavan, K.; Venkatalakshmi, K.; Vijayalakshmi, K. Traffic video-based intelligent traffic control system for smart cities using modified ant colony optimizer. Comput. Intell. 2020, 37, 538–558. [Google Scholar] [CrossRef]
  43. Umair, M.; Farooq, M.U.; Raza, R.H.; Chen, Q.; Abdulhai, B. Efficient Video-based Vehicle Queue Length Estimation using Computer Vision and Deep Learning for an Urban Traffic Scenario. Processes 2021, 9, 1786. [Google Scholar] [CrossRef]
  44. Cheng, R.; Qiao, Z.; Li, J.; Huang, J. Traffic Signal Timing Optimization model based on video surveillance data and snake optimization Algorithm. Sensors 2023, 23, 5157. [Google Scholar] [CrossRef] [PubMed]
  45. Mrudula, S.T.; Meenakshi, N.; Ritonga, M.; Sivakumar, S.; Jawarneh, M.; Sammy, F.; Keerthika, T.; Rane, K.P.; Roy, B. Internet of things and optimized knn based intelligent transportation system for traffic flow prediction in smart cities. Meas. Sens. 2024, 35, 101297. [Google Scholar] [CrossRef]
Figure 1. Structural diagram for the proposed framework.
Figure 1. Structural diagram for the proposed framework.
Vehicles 07 00072 g001
Figure 2. Classifier diagram for TC-YOLO.
Figure 2. Classifier diagram for TC-YOLO.
Vehicles 07 00072 g002
Figure 3. (ac). IoU, inference time, and processing speed evaluation.
Figure 3. (ac). IoU, inference time, and processing speed evaluation.
Vehicles 07 00072 g003
Figure 4. Time analysis.
Figure 4. Time analysis.
Vehicles 07 00072 g004
Figure 5. Convergence rate and computational efficiency validation.
Figure 5. Convergence rate and computational efficiency validation.
Vehicles 07 00072 g005
Figure 6. RMSE and MAE evaluation.
Figure 6. RMSE and MAE evaluation.
Vehicles 07 00072 g006
Figure 7. SSIM and EPI evaluation.
Figure 7. SSIM and EPI evaluation.
Vehicles 07 00072 g007
Table 1. Image results.
Table 1. Image results.
StepsVideo Frame 1Video Frame 2Video Frame 3Video Frame 4Video Frame 5
Frame ConversionVehicles 07 00072 i001Vehicles 07 00072 i002Vehicles 07 00072 i003Vehicles 07 00072 i004Vehicles 07 00072 i005
Noise RemovalVehicles 07 00072 i006Vehicles 07 00072 i007Vehicles 07 00072 i008Vehicles 07 00072 i009Vehicles 07 00072 i010
Contrast EnhancementVehicles 07 00072 i011Vehicles 07 00072 i012Vehicles 07 00072 i013Vehicles 07 00072 i014Vehicles 07 00072 i015
SharpeningVehicles 07 00072 i016Vehicles 07 00072 i017Vehicles 07 00072 i018Vehicles 07 00072 i019Vehicles 07 00072 i020
Lane DetectionVehicles 07 00072 i021Vehicles 07 00072 i022Vehicles 07 00072 i023Vehicles 07 00072 i024Vehicles 07 00072 i025
Object DetectionVehicles 07 00072 i026Vehicles 07 00072 i027Vehicles 07 00072 i028Vehicles 07 00072 i029Vehicles 07 00072 i030
Queue DetectionVehicles 07 00072 i031Vehicles 07 00072 i032Vehicles 07 00072 i033Vehicles 07 00072 i034Vehicles 07 00072 i035
Traffic Flow AnalysisVehicles 07 00072 i036Vehicles 07 00072 i037Vehicles 07 00072 i038Vehicles 07 00072 i039Vehicles 07 00072 i040
Table 2. Image results regarding the varying traffic conditions.
Table 2. Image results regarding the varying traffic conditions.
ProcessFree Flow TrafficCongested Scenario
Frame conversionVehicles 07 00072 i041Vehicles 07 00072 i042
Noise removal Vehicles 07 00072 i043Vehicles 07 00072 i044
Contrast enhancementVehicles 07 00072 i045Vehicles 07 00072 i046
SharpeningVehicles 07 00072 i047Vehicles 07 00072 i048
Lane detectionVehicles 07 00072 i049Vehicles 07 00072 i050
Object detectionVehicles 07 00072 i051Vehicles 07 00072 i052
Queue detectionVehicles 07 00072 i053Vehicles 07 00072 i054
Traffic flow analysisVehicles 07 00072 i055Vehicles 07 00072 i056
Traffic intensity estimationVehicles 07 00072 i057Vehicles 07 00072 i058
Table 3. Performance metrics.
Table 3. Performance metrics.
MetricsFormulae
RMSE 1 z g = 1 z x g x g 2
MAE 1 z g = 1 z x g x g
Table 4. PSNR and CII analysis.
Table 4. PSNR and CII analysis.
TechniquesPSNR (dB)CII
Proposed AGHSE38.762460261.740444
AHE33.027150.964847
CLAHE28.317920.816992
DPHE23.172160.754805
HE19.160920.384135
Table 5. SNR analysis.
Table 5. SNR analysis.
TechniquesSNR
Proposed FVOF34.48025116
OF28.02073
BMA24.05944
LK20.97305
HS17.89505
Table 6. Comparative evaluation.
Table 6. Comparative evaluation.
Authors’ NameObjectivesMethodologiesMeritsLimitations
Proposed frameworkMulti-object-based TSO via traffic flow analysis and intensity estimationUCB-MRL-CSFLImproved convergence rate and computational efficiency.This framework did not focus on environmental factors for TSO.
[41]Video-based traffic analysis frameworkTraffic Analysis from UAVs (TAU)Ensured high-resolution Unmanned Aerial Vehicle (UAV) images and improved accuracy.Due to the discontinuity of metrics, this model introduced artifacts at the boundaries of processed frames.
[42] Traffic control system for smart cities based on traffic videosAnt Colony Optimization (ACO)Performed better in finding the optimal route.This model took more time to control traffic, increasing traffic density.
[43] Vehicle queue length estimation model based on computer vision and DLYOLO-version4Estimated queue length without the need for on-site camera calibration.This model attained lower accuracy in counting the vehicles.
[44]Surveillance data-based TS timing optimization modelSnake Optimization (SO)Reduced delay time.This model failed to consider human flow, special lanes, and so on, thus resulting in inaccurate performance.
[45] Intelligent transportation system for traffic flow predictionParticle Swarm Optimization-based K-Nearest Neighbor (PSO-KNN)Increased accuracy and reduced RMSE and MSE.This model was not suitable for real-time applications due to its computational complexity.
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.

Share and Cite

MDPI and ACS Style

Naser, Z.S.; Marouane, H.; Fakhfakh, A. Multi-Object-Based Efficient Traffic Signal Optimization Framework via Traffic Flow Analysis and Intensity Estimation Using UCB-MRL-CSFL. Vehicles 2025, 7, 72. https://doi.org/10.3390/vehicles7030072

AMA Style

Naser ZS, Marouane H, Fakhfakh A. Multi-Object-Based Efficient Traffic Signal Optimization Framework via Traffic Flow Analysis and Intensity Estimation Using UCB-MRL-CSFL. Vehicles. 2025; 7(3):72. https://doi.org/10.3390/vehicles7030072

Chicago/Turabian Style

Naser, Zainab Saadoon, Hend Marouane, and Ahmed Fakhfakh. 2025. "Multi-Object-Based Efficient Traffic Signal Optimization Framework via Traffic Flow Analysis and Intensity Estimation Using UCB-MRL-CSFL" Vehicles 7, no. 3: 72. https://doi.org/10.3390/vehicles7030072

APA Style

Naser, Z. S., Marouane, H., & Fakhfakh, A. (2025). Multi-Object-Based Efficient Traffic Signal Optimization Framework via Traffic Flow Analysis and Intensity Estimation Using UCB-MRL-CSFL. Vehicles, 7(3), 72. https://doi.org/10.3390/vehicles7030072

Article Metrics

Back to TopTop