Manuscript Offprint
arXiv:2610.38497Vision-Based Density Estimation for Adaptive Traffic Control
Abstract
Traffic congestion is becoming a critical challenge in rapidly growing urban centers, particularly in developing nations where rapid urbanization and inadequate transport infrastructure place increasing strain on transport networks. In highly heterogeneous and chaotic traffic flows, camera-based traffic-state estimation is limited by severe vehicle occlusion and overlap. In this paper, we propose a framework to optimize traffic flow directly from stochastic visual observations. The architecture is structurally decoupled into three primary components: (a) vehicle density estimation, (b) predictive dynamics modeling, and (c) policy optimization. The proposed methodology introduces a convolutional neural network (CNN) that learns the mapping from camera feeds to spatial density maps, utilizing an adaptive k-nearest-neighbor (k-NN) Gaussian kernel to handle varying congestion levels. This feeds into an ST3DNet predictive module for spatiotemporal forecasting, followed by a hierarchical Graph-Transformer Multi-Agent Reinforcement Learning (MARL) algorithm to optimize signal phases. The density estimation stage was evaluated on 40 annotated intersection images from Rambagh 4, Jaipur, India, with a reported five-fold validation mean absolute error (MAE) of 3.32±0.95 vehicles and a mean absolute percentage error (MAPE) of 14.5%. These results pertain to the perception component; empirical training and evaluation of the forecasting and control stages remain future work.
1 Introduction
Rapid global urbanization has placed unprecedented strain on metropolitan transport networks, making the development of ITS a critical priority. This challenge is acutely pronounced in developing countries like India, where urban centers experience extreme traffic congestion. Standard adaptive traffic signal control (ATSC) paradigms, often designed for highly structured, lane-bound, and homogeneous traffic environments typical of Western cities, fail significantly when deployed under chaotic conditions. Indian urban traffic is characterized by extreme heterogeneity. Managing this non-stationary and fluid traffic state requires control systems capable of perceiving spatial density dynamically rather than relying on structured vehicle tracking.
Traditional traffic management architectures fail to capture this complexity due to their reliance on localized point-sensor telemetry or idealized probe-vehicle trajectories. Inductive loops are fundamentally constrained by their static placement and their underlying assumption that vehicles occupy discrete, lane-aligned positions. In chaotic traffic flows, vehicles cluster opportunistically, rendering point-sensors highly inaccurate or blind to the true queue dynamics. While high-resolution traffic cameras offer a ubiquitous and non-intrusive alternative filled with rich spatial context, mapping raw, high-dimensional visual streams directly to stable control actions introduces severe optimization challenges, sample inefficiencies, and vulnerability to visual domain shifts.
2.1 Vision-Based Vehicle Counting and Density Estimation
Estimating the number and spatial arrangement of vehicles from images is a long-standing problem in traffic monitoring. Guerrero-Gómez-Olmedo et al. [8] introduced the TRANCOS benchmark for extremely overlapping vehicles, providing point annotations and a spatial counting evaluation protocol.
Mhatre et al. [18] counted moving vehicles by subtracting a background reconstructed through pixel-wise temporal averaging of camera frames, then clustering the foreground into individual vehicles with DBSCAN.
Zhang et al. [26] proposed a multi-column convolutional neural network (CNN) that maps an image to a density map, using geometry-adaptive Gaussian targets derived from point annotations. This formulation allows a network to be trained on point labels rather than bounding boxes. Although developed for crowd counting, these geometry-adaptive targets provide a methodological precedent for point-supervised density estimation.
Density-based convolutional architectures were subsequently extended to traffic. Li et al. [17] used dilated convolutions to produce high-quality density maps, evaluating on crowd datasets and extending the approach to the TRANCOS vehicle benchmark. Zhang et al. [25] combined fully convolutional density estimation with recurrent residual count estimation for vehicle counting in low-quality city-camera videos, incorporating temporal information to improve counts. More recently, Jian et al. [11] proposed a scale-aware network that produces vehicle density maps and uses optical-flow-based motion for congestion assessment; this work addresses congestion detection rather than signal control.
It is useful to distinguish image-plane count density from physical road density. Hu et al. [10] combine vehicle detection with camera calibration to estimate physical density in vehicles per kilometer per lane. Image-plane density maps of the kind produced by the CNN in the proposed framework are count densities: their spatial integral yields a vehicle count, and converting them to physical road density would require geometric calibration.
2.2 Adaptive Traffic Control and Multi-Agent Coordination
Deep reinforcement learning has been applied to signal timing, with Li et al. [16] demonstrating that a deep neural network could learn a Q-function for signal timing. Subsequent work has refined the learning procedure: Bouktif et al. [2] examined consistent state and reward design with double deep Q-learning and prioritized replay in Simulation of Urban Mobility (SUMO) simulations. Single-agent formulations can be limited in accounting for cascading effects from adjacent intersections, which motivates coordination across multiple nodes.
To address network effects, researchers have adopted Multi-Agent Reinforcement Learning (MARL). Wu et al. [23] proposed a framework using centralized training with decentralized execution, enabling agents to account for neighboring intersections under partial observability. Graph-based architectures have been used to capture spatial dependencies: CoLight [22] employs graph attention for communication among neighboring intersections, and Jiang et al. [12] introduced a distributed MARL framework using graph decomposition for large-scale signal control. These studies address coordination across intersections, complementing the problem of acquiring traffic-state information from images.
2.3 Connecting Visual Traffic-State Estimation to Control
A central question for vision-based control is how visual observations should be converted into the state representation used by a controller. Genders and Razavi [7] compared three state resolutions in simulation and found that occupancy and average-speed states performed similarly to individual-vehicle high-resolution states under their setup. This finding cautions against assuming that richer state representations automatically yield better control.
Garg et al. [6] proposed an image-based traffic signal controller trained in simulation with domain randomization, and reported simulated control evaluation together with attention visualizations. The real-image experiment examined attention on London traffic-camera images without actuating traffic signals.
The present study investigates spatial vehicle-count density estimation from heterogeneous, occluded intersection imagery, motivated by its potential use as a traffic-state representation for adaptive signal control.
3 Methodology
The proposed framework (Figure 1) presents a vision-based framework for ATSC. The controller state combines current and forecast density representations with signal-phase information and relevant masks. To support forecasting and signal-control decisions, the system architecture is structurally decoupled into three computational modules:
-
State Estimation, utilizing a convolutional neural network to regress raw RGB camera feeds into continuous spatial density distributions, with the architecture following Tian et al. [20]; overlapping-vehicle counting provides the motivating context [8].
-
Predictive Dynamics Modeling, employing a proposed ST3DNet-based module to forecast future spatial density maps from historical density sequences [9].
-
Policy Optimization, wherein a proposed hierarchical graph-based MARL controller uses these density representations to select joint signal phase configurations across the traffic network.

Figure 1: Three-stage pipeline. Current density and forecast density enter the controller state; the controller selects traffic-signal phases.
3.1 Dataset & Preprocessing
3.1.1 Data Acquisition and Point Annotation
The raw visual data was collected from the RAMBAGH 4 intersection in Jaipur, India. The dataset comprises 40 high-resolution (720 × 480 pixels) RGB frames captured by a standard traffic surveillance camera. To ensure the dataset captures statistically independent traffic states and a high variance of kinematic conditions, the frames were sampled at 30-second intervals.

Figure 2: Example camera frame (A), annotation-derived density map (B), and YOLO26 detections (C). This illustration is not a benchmark comparison.
Indian urban traffic is characterized by extreme heterogeneity, the absence of strict lane discipline, and the presence of non-standard vehicle classes, leading to vehicles occupying opportunistic, highly dense clusters. To validate the limitations of standard object detection paradigms in this domain, we applied a state-of-the-art bounding-box detector (YOLO) [13] to our dataset (Figure 2). The discrete detector struggled severely with the occlusion and low-resolution telemetry, failing to capture the true volume of the traffic (detecting merely 9 objects) while exhibiting catastrophic misclassifications, most notably identifying a distant vehicle as a “boat.” These failures definitively underscore why discrete bounding-box tracking is brittle and computationally prohibitive for Indian traffic monitoring.
Therefore, a dotting annotation strategy was employed using the VGG Image Annotator [5]. For each frame, a single 2D coordinate point () was manually annotated at the geometric center of every visible vehicle. This approach cleanly bypasses the limitations of bounding-box overlap and algorithmic misclassification, providing the exact ground-truth count and spatial topology required to generate density maps.
3.1.2 Adaptive k-NN Spatial Density Generation
Generating a vehicle-density map involves smoothing each annotated point with a 2D Gaussian kernel. A fixed bandwidth applies the same spread throughout the image, whereas geometry-adaptive kernels vary the spread with neighbouring-point spacing [26]. Here, an adaptive k-nearest-neighbour (k-NN) Gaussian kernel is used.
First, each annotated point is projected from the original image dimensions to the target density map dimensions :
The bandwidth of the Gaussian kernel for each vehicle is determined by its proximity to surrounding vehicles. A k-dimensional tree (KD-tree) is used to query the nearest neighbouring vehicles. Their average distance, denoted as , characterizes local point spacing. The bandwidth is set to half this average distance and clipped between 0.8 and 2.5 to limit excessively narrow or broad kernels:
For each projected coordinate , a unit impulse is placed on a zero-initialized discrete grid at the nearest integer index. A Gaussian filter with the corresponding bandwidth is then applied. To preserve each annotated vehicle's contribution despite any boundary truncation, its density map is normalized so that its spatial sum equals one within numerical precision:
The complete density map is constructed by summing these normalized maps for all annotated vehicles:
A final global scaling operation corrects residual numerical discrepancies by multiplying the density map by the ratio of the annotated vehicle count to its current sum:
The resulting map sums to the annotated count within numerical precision and approximately represents the annotated spatial locations. This description applies to the dataset frames, which contain 12–49 annotated vehicles.
3.2 Problem Formulation
The proposed multi-intersection traffic signal control task is formulated as a cooperative traffic-control problem under partial observability, modeled at the network level as a Partially Observable Markov Decision Process (POMDP). Let represent the set of controllable intersections in the road network. Decisions are taken at discrete index over a finite horizon of decisions, with a fixed control interval ; the physical time corresponding to decision index is .
3.2.1 Decision Variables
At each decision index , the controller selects or retains a green-phase index for each intersection , subject to the timing constraints below. Let denote the set of all valid green phases for intersection . The action is the phase index
The joint selected action tuple is , and the joint action space is the Cartesian product .
3.2.2 Objective Function
The objective is to reduce vehicle waiting at the controlled intersections. For the proposed reward, let denote the sum of accumulated waiting times of vehicles currently in the monitored approaches of intersection i at decision t. The base reward is defined as the negative difference in this quantity between consecutive decisions:
In the proposed Stage 3 design, this base reward is extended by fairness and coordination terms; the full reward is denoted . The optimization objective is to find a joint policy (parameterized by neural network weights ) that maximizes the expected cumulative discounted full reward:
where is the discount factor, is the hidden environment state, and represents the trajectory of the environment.
3.2.3 System Constraints
The proposed formulation includes operational constraints on green-phase timing.
3.2.3.1 Minimum Green Time Constraint
To limit rapid phase oscillation, an active green phase is held for a minimum green duration . When a green phase is active, let be the elapsed green duration since the current green phase began, excluding yellow clearance, and let be the currently active green phase index. The admissible action set is
During yellow clearance, the previously selected target green is retained and further phase changes are masked. When the selected green phase differs from , the environment inserts a yellow clearance interval y and then activates the target green. Minimum-green masking is proposed before action selection, while the physical transition is to be enforced by the environment.
3.2.3.2 State Transition Dynamics
The transition to the next hidden state follows the underlying kinematic models of the traffic simulator (car-following and lane-changing models):
3.2.3.3 State Observability Constraint
The hidden state is not directly observed. Instead, the policy uses local observations comprising current and historical estimated density maps, forecast density maps, phase information and relevant masks. Stage 1 supplies the estimated density maps, Stage 2 supplies the forecasts, and the signal controller supplies the phase and timing information used in the masks. The proposed graph-based controller also uses messages derived from observations at connected intersections.
3.3 Stage 1: Vehicle Density Estimation Model
To perceive the current traffic state from unstructured visual data, the vehicle density estimation task (Figure 3) is formulated as a supervised Empirical Risk Minimization (ERM) problem. Each camera frame is an RGB image of original resolution , resized to with pixel values divided by 255 to the range . Let the input be with . The objective is to learn a non-linear mapping function , where is the predicted discrete spatial density map with , and represents the learnable parameters of the convolutional neural network (CNN) within the parameter space .

Notation : channels and spatial dimensions.
Blue: standard Conv2D + batch normalization + ReLU Teal: depthwise Conv2D
Figure 3: Vehicle density estimator: convolutional stem, two residual blocks, and a 32 → 64 → 1000 → 400 → 1 regression head.
3.3.1 Optimization Objective
The optimal parameter set is obtained by minimizing a pixel-mean squared density error plus a weighted squared count error over training samples. Let be the predicted density map for sample , its target density map, and its annotated vehicle count:
with count weight .
3.3.2 Architectural Mapping and Structural Constraints
The architecture in Figure 3 follows Tian et al. [20] and consists of a convolutional stem, two residual blocks, and a regression head. The stem alternates two convolutions with max-pooling operations. The first pooling layer halves the spatial dimensions, while the second pooling layer uses stride 1 and preserves them; the stem outputs 32 channels. The first residual block downsamples by a further factor of two through its final convolution and a projection shortcut. The second residual block retains the reduced spatial resolution and uses an identity shortcut.
The residual blocks use depthwise convolutions with 32 groups and 32 input channels. For a given output channel , the depthwise convolution is computed over the singleton input-channel group :
Here, is the -th input feature map, represents the spatial convolution kernel mapping input to output , is the channel-specific bias, and denotes the 2D cross-correlation operator. Dropout2d with is applied after each residual block.
The regression head produces the density map through successive convolutional projections with channel dimensions and kernel sizes . Dropout2d with is applied after each of the first two head blocks, and a final rectified linear unit (ReLU) yields nonnegative density values.
The total estimated vehicle count within a given frame is computed as the spatial sum over the generated density map:
This sum estimates the annotated vehicle count. The spatial density map is retained as an intended input to the proposed Stage 2 predictive dynamics module.
3.4 Stage 2: Density Map Forecasting

Figure 4: ST3DNet-based forecasting architecture with closeness and weekly branches, spatial recalibration, and parametric fusion.
Traffic patterns exhibit strong periodic and trend-based temporal dependencies. We formulate the density-map forecasting task (Figure 4) as an optimization problem designed to map historical density maps into future spatial distributions. The inputs are single-channel density maps produced by Stage 1, with and ; in Figure 4 these are processed in batches of size . Let denote the sampling interval between consecutive maps and a positive integer horizon in steps. For normalization, we propose a fixed positive density scale , with shared across all input and target maps and fixed at inference, chosen from training data only: , where , denotes physical count-density, and denotes normalized values. The input consists of two historical sequences of normalized density maps, both available at sampling index : a “closeness” sequence stacking the normalized maps of the last consecutive sampling indices through , and a “weekly” sequence stacking normalized maps aligned with the target time from previous weeks and available by , with and . The target index is , corresponding to physical time . The objective is to learn an optimal parameterization for the predictive mapping that minimizes the empirical forecasting risk over training examples:
where is the normalized target and the forecast loss is the mean squared pixel error over :
The architectural mapping uses a 3D Spatio-Temporal Network (ST3DNet) [9] that processes the temporal streams independently before executing a parametric fusion.
To capture immediate kinematic dependencies, is subjected to a 3D convolution with 32 filters and a kernel with spatial padding . Zero-padding is omitted from the temporal dimension, shrinking the temporal depth from to , giving a tensor of shape . The tensor is subsequently reshaped by merging the temporal and channel axes into a 2D spatial representation , where . This representation is refined via a stack of Residual Units. The first unit maps to 32 channels with a matching projection shortcut when needed, and the remaining units preserve 32 channels, yielding . The batch dimension is omitted in these per-example tensors.
To model macro-level recurrent patterns, undergoes a temporal-collapsing 3D convolution with 32 filters and a kernel, producing a tensor of shape that is reshaped into .
Because intersection topologies are heterogeneous, we use a Recalibration Block to reweight spatial importance. Both intermediate tensors and are independently recalibrated using separate learned weight matrices and , fixed at inference, by computing the Hadamard product () and integrating across the feature channels :
This squashes the multi-channel feature maps into single-channel representations .
Finally, the future normalized density map is synthesized via a parametric fusion. We define fusion weight matrices and , learned and fixed at inference, that scale the closeness and weekly recalibrated representations. The output is bounded using a hyperbolic tangent activation:
The spatially varying learned branch contributions allow the model to weight closeness and weekly history differently across locations. The physical density estimate for generated at is then recovered as , which is nonnegative; the scale must cover the intended density range, and the hyperbolic tangent bounds recovered values to . Per-image normalization is avoided because it would remove count magnitude.
3.5 Stage 3: Multi-Agent Signal Optimization (RL Control)
The multi-intersection traffic signal control problem (Figure 5) is addressed by a proposed hierarchical graph-based MARL controller under the partial-observability formulation in Section 3.2.
Sim-to-Real Bridge via Virtual Projection:
To supply simulated density observations to the controller that are compatible in grid and representation with the Stage 1 output (Section 3.3), we propose a projection module (VirtualCamera) using Simulation of Urban Mobility (SUMO) [1]. Let a vehicle's 3D world coordinate be . We map this to a 2D camera pixel coordinate using standard pinhole camera intrinsics and an extrinsic transformation matrix defined by the camera's pitch and heading rotations and translation :
Here denotes homogeneous equality up to scale, and and form the world-to-camera transform under the selected coordinate convention. Projections are retained only when camera depth is positive and image coordinates fall within the image bounds. The image coordinates are then mapped onto the density grid using the image-to-grid scaling described in Section 3.1.2. Let be the number of retained projected vehicles, with scaled grid coordinates . A discrete Gaussian with bandwidth in grid pixels is normalized over the finite density grid :

Figure 5: Hierarchical signal controller with sub-node encoding, set-based aggregation, GATv2 and GRU processing, and phase-policy and state-value heads.
Before any perturbations, the spatial sum of equals within numerical precision; the map is zero when no vehicles are projected. This construction represents in-view projected vehicles without modeling occlusion or density-estimation errors.
Domain randomization is proposed for training, following the general idea of varying simulated conditions [21]. Perturbations to camera calibration and synthetic density maps would be used to explore robustness to projection and density-estimation errors.
Hierarchical State Representation: The local observation for each intersection combines current and historical Stage 1 estimated densities, Stage 2 forecast densities in physical scale after inverse normalization, and signal-phase and mask information supplied by the controller; messages derived from observations at connected intersections are also used. The proposed HierarchicalSignalNet builds representations at the approach, intersection, and network levels, with separate actor and critic heads.
3.5.1 Sub-Node (Patch) Level
Each intersection is represented by a single-channel density map per approach. For the proposed input interface, observed maps through decision are stacked with one Stage 2 forecast for , generated at from available history and converted back to physical count-density. Thus, is the temporal length in Figure 5, distinct from the control horizon in Section 3.2. No future ground truth is used. Here, is the batch size, the number of intersections, the number of padded approach slots, and the embedding width.
A patch convolution with kernel size and stride 3 yields a grid of 36 patch features per approach. Linear temporal scores are softmax-weighted and pooled per patch, and linear spatial scores reweight the 36 patches. This pooling has no explicit encoding of within-window order or observed-versus-forecast identity; the later recurrent unit tracks history across decision steps. A local Graph Convolutional Network (GCN) connects horizontal and vertical patch neighbors, using row-normalized neighborhood aggregation, a learned projection, and ReLU; graph convolution provides the general basis for this operation [14]. Nine patch regions are pooled into nine spatial tokens, and the whole grid into one interaction token. Sibling multi-head attention updates the interaction tokens across the approaches of an intersection, masking invalid approaches. The encoder output has shape .
3.5.2 Node (Intersection) Level
A Set Attention Block (SAB) is applied over valid approach tokens, followed by Pooling by Multihead Attention (PMA) with three learned seeds for spatial tokens and one for interaction tokens, following the Set Transformer formulation [15]. Padded approaches are masked in both attention and pooling. The output comprises four tokens per intersection, denoted , with batched shape ; its fourth token, , represents interactions.
3.5.3 Network Level
Inter-intersection coordination uses Graph Attention Network v2 (GATv2) [3] over the directed road graph , using the interaction tokens as inputs. Neighbor messages are exchanged during execution:
The Gated Recurrent Unit (GRU) [4] maintains recurrent memory across decision steps. Fusion combines the four intersection tokens and recurrent state using a linear projection, Gaussian Error Linear Unit (GELU), and layer normalization, as shown in Figure 5.
3.5.4 Policy Value Heads (Phase-Selection Actor-Critic)
The actor is a Multilayer Perceptron (MLP) that samples a phase action:
Here, is the signal-phase context and is a vector mask implementing the valid-phase and timing constraints of Section 3.2. Invalid logits are set to negative infinity before softmax, retaining at least one admissible action. During yellow clearance, the previously selected target green is retained.
The centralized critic uses SAB and an MLP to estimate a scalar expected discounted team return from the collection of intersection features:
The whole-network critic is used only during training; each actor uses its local features, phase and timing information, and neighbor messages. Advantages use Generalized Advantage Estimation (GAE) [19], with as a proposed setting.
3.5.5 Multi-Objective Reward Function
The base reward is augmented with fairness and coordination terms:
Here, is defined in Section 3.2, and is the variance of SUMO halting-vehicle counts across the valid approaches of intersection , used as a training-time reward signal. The nonnegative coefficients , and are fixed weights to be selected; remains the discount factor. The coordination term is a proposed downstream congestion proxy:
The inverse-scaled Stage 2 forecast is summed over the receiving-road region on a single camera grid for link . The threshold is a congestion threshold in vehicle counts for that same region. Region masks and thresholds require calibration. Density represents vehicle presence, so this proxy does not directly measure queued vehicles, spillback, or delay.
3.5.6 Training Algorithm and Operational Constraints
The proposed training procedure uses Proximal Policy Optimization (PPO) with a clipped surrogate objective and entropy bonus in a Multi-Agent Proximal Policy Optimization (MAPPO) framework [24], with actor neighbor communication and a centralized critic. The phase-only minimum-green mask follows Section 3.2: elapsed green time excludes yellow, the environment inserts yellow clearance, and additional phase changes are blocked during clearance.
4 Results & Discussion
4.1 Stage 1: Vehicle Density Estimation
Given the limited dataset size (40 samples), we employ a rigorous 5-fold cross-validation strategy with ensemble averaging to maximize generalization. Each fold trains with oversampling via stochastic augmentation (horizontal flip, brightness/contrast jitter, saturation perturbation, Gaussian noise injection, random blur, and random crop-resize). Training uses AdamW (, weight decay ) with cosine annealing over 600 epochs and early stopping (patience=120) based on validation MAE. The composite loss combines pixel-level MSE with a count regularization term ():
where is the ground-truth vehicle count. Gradient clipping at 5.0 stabilizes training on the small dataset.
Table 1: 5-fold cross-validation results across three training rounds on 40 real-world intersection images (vehicle counts 12–49). Mean Fold MAE is the mean validation MAE across five folds. The Ensemble columns are computed over the full 40-sample dataset, where four of the five ensemble members have seen each image during training, and are therefore in-sample rather than held-out.
| Configuration | Mean Fold MAE | Ensemble MAE | Ensemble MAPE | Max Error |
|---|---|---|---|---|
| Round 1 (single model, fixed ) | 2.84 | — | — | — |
| Round 2 (5-fold, fixed ) | 1.83 | 9.2% | 8.7 | |
| Round 3 (5-fold, adaptive ) | 1.44 | 6.7% | 5.1 |
Table 2: Per-fold breakdown for Round 3.
| Fold | Best MAE | Best MAPE | Early Stop Epoch |
|---|---|---|---|
| Fold 0 | 3.62 | 10.8% | 252 |
| Fold 1 | 2.00 | 7.7% | 158 |
| Fold 2 | 2.67 | 13.8% | 404 |
| Fold 3 | 3.48 | 18.5% | 251 |
| Fold 4 | 4.82 | 21.5% | 203 |
| Mean | 14.5% | — |
The mean fold validation MAE is vehicles (MAPE 14.5%). Reported scores use validation folds that also guide checkpoint selection.
We additionally report an ensemble score of 1.44 vehicles (MAPE 6.7%, maximum error 5.1), obtained by averaging the predicted density maps of all five fold models over the complete 40-sample dataset. This value must be interpreted with care. Under 5-fold cross-validation each image belongs to the training split of four of the five ensemble members, so this evaluation is predominantly in-sample. The apparent 57% reduction relative to the mean fold error therefore reflects memorization considerably more than genuine variance reduction, and 1.44 should not be read as a generalization result. A leakage-free ensemble estimate is not obtainable under this protocol, since only a single member is held out per image. The round-to-round comparisons drawn from the ensemble columns inherit the same bias and are reported for completeness rather than as evidence of improvement.
Residual errors concentrate on extremely low-count images (12 vehicles, errors of 4–5) due to mean-regression bias inherent to small datasets. The density map preserves the spatially resolved queue structure per approach, enabling downstream modules to distinguish congested from free-flowing lanes.
5 Future Work
Several critical avenues remain open for extending the proposed framework towards city-scale deployment:
Dataset Expansion and End-to-End Pipeline Training: The current evaluation is bottlenecked by a limited dataset, which restricts the full optimization of the vehicle density estimator (Stage 1). A primary immediate objective is to significantly scale the acquisition and annotation of high-resolution traffic frames across diverse intersection topologies, weather conditions, and times of day. Recorded traffic sequences are needed for Stage 2 forecasting, while simulation rollouts are needed for Stage 3 policy training and evaluation.
Domain Adaptation and Sim-to-Real Evaluation: The proposed VirtualCamera projection module and domain randomization require evaluation with calibrated real-world cameras. Future work will explore unsupervised domain adaptation to fine-tune the Stage 1 density regressor directly on target camera distributions. Future work will also evaluate transfer of the phase-only controller after training in SUMO.
City-Scale Signal Coordination: Future work will assess the computational scaling of the proposed graph-based controller (GATv2 with a GRU) on city-level networks comprising hundreds of nodes. One possible approach is to introduce an additional topological hierarchy: clustering junctions into localized traffic districts, and training a meta-agent to manage inter-district coordination while local agents handle intra-district signal coordination.
Multi-Modal Traffic Integration: The current Stage 1 model is optimized primarily for motorized vehicle density. To address the extreme heterogeneity of traffic in developing nations like India, the CNN could be expanded to output class-specific density estimates for pedestrians, two-wheelers, and heavy vehicles. Within the POMDP formulation, future work will investigate reward and constraint designs for pedestrian service and evaluate mixed-traffic safety.
6 Summary & Conclusion
This paper presents the design and partial validation of a three-stage vision-to-control pipeline for adaptive traffic signal control. The primary contributions are:
-
A compact CNN density estimator evaluated on a dataset of 40 real-world Indian intersection images, achieving a mean five-fold validation MAE of vehicles (MAPE 14.5%) using adaptive Gaussian kernel density maps. An in-sample five-fold ensemble score of 1.44 vehicles is additionally reported in Section 4.1, but it is not a generalization estimate and is not claimed as one.
-
A proposed spatio-temporal density-map forecasting module (ST3DNet) and a proposed hierarchical multi-agent RL controller (MAPPO with GATv2 and GRU), with training and evaluation left as future work.
-
A proposed VirtualCamera projection module with domain randomization, intended to connect simulated density observations to the controller; real-world transfer requires evaluation.
The Stage 1 results support the feasibility of vehicle counting from model input images on the evaluated dataset. Training and evaluating Stage 2 on real traffic sequences and Stage 3 on SUMO rollouts remain the next steps toward a deployable system.
References
[1] Alvarez Lopez, P., Behrisch, M., Bieker-Walz, L., Erdmann, J., Flötteröd, Y.-P., Hilbrich, R., Lücken, L., Rummel, J., Wagner, P., Wießner, E. (2018). Microscopic Traffic Simulation using SUMO. In 2018 21st International Conference on Intelligent Transportation Systems (ITSC) (pp. 2575–2582). https://doi.org/10.1109/ITSC.2018.8569938
[2] Bouktif, S., Cheniki, A., Ouni, A., El-Sayed, H. (2023). Deep reinforcement learning for traffic signal control with consistent state and reward design approach. Knowledge-Based Systems, 267, 110440.
[3] Brody, S., Alon, U., Yahav, E. (2022). How Attentive are Graph Attention Networks? International Conference on Learning Representations. https://arxiv.org/abs/2105.14491
[4] Cho, K., van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., Bengio, Y. (2014). Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. arXiv:1406.1078. https://arxiv.org/abs/1406.1078
[5] Dutta, A., & Zisserman, A. (2019). The VIA Annotation Software for Images, Audio and Video. In Proceedings of the 27th ACM International Conference on Multimedia (MM '19). ACM, New York, NY, USA. https://doi.org/10.1145/3343031.3350535
[6] Garg, D., Chli, M., Vogiatzis, G. (2022). Fully-Autonomous, Vision-based Traffic Signal Control: from Simulation to Reality. In Proceedings of the 21st International Conference on Autonomous Agents and Multiagent Systems (pp. 454–462). https://www.ifaamas.org/Proceedings/aamas2022/pdf/s/p454.pdf
[7] Genders, W., Razavi, S. (2018). Evaluating reinforcement learning state representations for adaptive traffic signal control. Procedia Computer Science, 130, 26-33.
[8] Guerrero-Gómez-Olmedo, R., Torre-Jiménez, B., López-Sastre, R., Maldonado-Bascón, S., Oñoro-Rubio, D. (2015). Extremely overlapping vehicle counting. In Iberian Conference on Pattern Recognition and Image Analysis (pp. 423-431). Springer.
[9] Guo, S., Lin, Y., Li, S., Chen, Z., Wan, H. (2019). Deep spatial-temporal 3D convolutional neural networks for traffic data forecasting. IEEE Transactions on Intelligent Transportation Systems, 20(10), 3913-3926.
[10] Hu, Z., Lam, W. H. K., Wong, S. C., Chow, A. H. F., Ma, W. (2023). Turning Traffic Surveillance Cameras into Intelligent Sensors for Traffic Density Estimation. Complex & Intelligent Systems, 9(6), 7171-7195. https://doi.org/10.1007/s40747-023-01117-0
[11] Jian, C., Lin, C., Hu, X., Lu, J. (2025). Selective Scale-Aware Network for Traffic Density Estimation and Congestion Detection in ITS. Sensors, 25(3), 766. https://doi.org/10.3390/s25030766
[12] Jiang, S., Huang, Y., Jafari, M., Jalayer, M. (2022). A Distributed Multi-agent Reinforcement Learning with Graph Decomposition Approach for Large-scale Adaptive Traffic Signal Control. IEEE Transactions on Intelligent Transportation Systems, 23(9), 14689–14701. https://doi.org/10.1109/TITS.2021.3131596
[13] Jocher, G., Qiu, J., Liu, M., Lyu, S., Akyon, F. C., Kalfaoglu, M. E. (2026). Ultralytics YOLO26: Unified Real-Time End-to-End Vision Models. arXiv:2606.03748. https://arxiv.org/abs/2606.03748
[14] Kipf, T. N., Welling, M. (2017). Semi-Supervised Classification with Graph Convolutional Networks. International Conference on Learning Representations. https://arxiv.org/abs/1609.02907
[15] Lee, J., Lee, Y., Kim, J., Kosiorek, A., Choi, S., Teh, Y. W. (2019). Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks. Proceedings of Machine Learning Research, 97, 3744–3753. https://proceedings.mlr.press/v97/lee19d.html
[16] Li, L., Lv, Y., Wang, F. Y. (2016). Traffic signal timing via deep reinforcement learning. IEEE/CAA Journal of Automatica Sinica, 3(3), 247-254.
[17] Li, Y., Zhang, X., Chen, D. (2018). CSRNet: Dilated convolutional neural networks for understanding the highly congested scenes. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 1091-1100).
[18] Mhatre, H., Vyas, M., Mittal, A. (2025). Pixels to Signals: A Real-Time Framework for Traffic Demand Estimation. arXiv:2510.24902. https://arxiv.org/abs/2510.24902
[19] Schulman, J., Moritz, P., Levine, S., Jordan, M., Abbeel, P. (2016). High-Dimensional Continuous Control Using Generalized Advantage Estimation. International Conference on Learning Representations. https://arxiv.org/abs/1506.02438
[20] Tian, M., Guo, H., Chen, H., Wang, Q., Long, C., Ma, Y. (2019). Automated pig counting using deep learning. Computers and Electronics in Agriculture, 163, 104840.
[21] Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W., Abbeel, P. (2017). Domain Randomization for Transferring Deep Neural Networks from Simulation to the Real World. arXiv:1703.06907. https://arxiv.org/abs/1703.06907
[22] Wei, H., Xu, N., Zhang, H., Zheng, G., Zang, X., Chen, C., ... Li, Z. (2019). CoLight: Learning network-level cooperation for traffic signal control. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management (pp. 1913-1922).
[23] Wu, T., Zhou, P., Liu, K., Yuan, Y., Wang, X., Huang, H., Wu, D. O. (2020). Multi-agent deep reinforcement learning for urban traffic light control in vehicular networks. IEEE Transactions on Vehicular Technology, 69(8), 8243-8256.
[24] Yu, C., Velu, A., Vinitsky, E., Gao, J., Wang, Y., Bayen, A., Wu, Y. (2022). The surprising effectiveness of ppo in cooperative multi-agent games. Advances in Neural Information Processing Systems, 35, 24611-24624.
[25] Zhang, S., Wu, G., Costeira, J. P., Moura, J. M. F. (2017). FCN-rLSTM: Deep Spatio-Temporal Neural Networks for Vehicle Counting in City Cameras. In Proceedings of the IEEE International Conference on Computer Vision (pp. 3667–3676). https://arxiv.org/abs/1707.09476
[26] Zhang, Y., Zhou, D., Chen, S., Gao, S., Ma, Y. (2016). Single-Image Crowd Counting via Multi-Column Convolutional Neural Network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 589–597). https://openaccess.thecvf.com/content_cvpr_2016/html/Zhang_Single-Image_Crowd_Counting_CVPR_2016_paper.html