Vision-Based Density Estimation for Adaptive Traffic Control

Mohammad Usaid, Deepak Silaych, Hrithik Mhatre, Archak MittalarXiv 2026 · arXiv

This paper presents a robust three-stage framework for adaptive traffic signal control (ATSC) specifically designed for the "chaotic" and heterogeneous traffic environments typical of developing nations. By shifting from discrete vehicle tracking to continuous spatial density estimation, the authors provide a modular architecture that combines deep learning perception, spatiotemporal forecasting, and multi-agent reinforcement learning (MARL).

TL;DR

The authors propose a decoupled pipeline that replaces brittle vehicle-tracking methods with a CNN-based spatial density estimator to manage chaotic, non-lane-bound traffic. This perception layer feeds into a spatiotemporal forecasting module and a hierarchical Graph-Transformer RL controller to optimize signal phases across complex urban networks.

What Problem Does This Paper Address?

Traditional traffic management relies on two things that often don't exist in cities like Jaipur or Mumbai: strict lane discipline and reliable point-sensors (like inductive loops). In these environments, traffic is "fluid"—vehicles of various sizes cluster opportunistically, creating extreme occlusion that causes standard object detectors like YOLO to fail spectacularly.

As shown in the paper, a state-of-the-art detector might only catch a fraction of the vehicles in a dense cluster or, worse, misclassify a distant car as a "boat" due to visual domain shifts.

Figure 2: Comparison of raw imagery (A), the proposed density map (B), and the failure of standard YOLO detection (C) in chaotic traffic.

The core challenge is mapping high-dimensional, noisy visual streams into stable control actions without losing the rich spatial context of the traffic queue.

Methods

The authors propose a structurally decoupled three-stage pipeline:

  1. Perception (Vehicle Density Estimation): Instead of bounding boxes, the system uses a Residual CNN to regress RGB frames into 18x18 spatial density maps. A key innovation here is the use of an adaptive k-nearest-neighbor (k-NN) Gaussian kernel. By calculating the distance to the three nearest vehicles, the system adjusts the "spread" of the density map to accurately represent congestion levels.
  2. Forecasting (Predictive Dynamics): Using an ST3DNet architecture, the system forecasts future density maps. It processes two historical streams: "closeness" (immediate past frames) and "weekly" (periodic trends), which are then fused to predict the traffic state at a future horizon.
  3. Control (Policy Optimization): The final stage is HierarchicalSignalNet, a MARL controller. It uses a Graph Attention Network (GATv2) to allow neighboring intersections to "talk" to each other, ensuring that signal changes at one junction don't cause a cascade of congestion at the next.
Figure 1: Three-stage pipeline. Current density and forecast density enter the controller state; the controller selects traffic-signal phases.

Datasets

The perception component was evaluated on a new, targeted dataset:

  • Rambagh 4 Dataset: 40 high-resolution RGB frames from a major intersection in Jaipur, India.
  • Annotation: Unlike standard datasets, these use "dotting" annotations (a single 2D point at the center of every vehicle), which bypasses the issues of overlapping bounding boxes.
  • Context: The work references the TRANCOS benchmark for overlapping vehicles as a methodological precedent.

Key Insights and Ideas

  • Density > Detection: In high-occlusion environments, trying to identify every individual vehicle is a losing battle. Estimating the "mass" of traffic (density) is more robust and provides a better state representation for RL controllers.
  • Adaptive Smoothing: The use of k-NN to determine Gaussian bandwidth is a clever way to handle varying scales. In dense clusters, the kernels are tight; in sparse traffic, they spread out, ensuring the total "count" (the integral of the density map) remains accurate.
  • Sim-to-Real Bridge: To train the RL agent without causing real-world gridlock, the authors developed a VirtualCamera module for the SUMO simulator. This projects simulated 3D vehicle coordinates into the same 2D density grid format used by the real-world CNN, allowing for seamless transfer.

Key Results

The empirical evaluation focused on the Stage 1 perception model:

  • Accuracy: The model achieved a mean absolute error (MAE) of 3.32 ± 0.95 vehicles on the Jaipur dataset.
  • Relative Error: The mean absolute percentage error (MAPE) was 14.5%.
  • Adaptive vs. Fixed: Moving from a fixed Gaussian kernel to an adaptive one reduced the maximum error from 8.7 to 5.1 vehicles, demonstrating the importance of local context in density estimation.
Figure 3: The CNN architecture for density estimation, featuring a convolutional stem and residual blocks.

Limitations and Future Work

The primary limitation is the dataset size; 40 images is a small sample for deep learning, leading to some mean-regression bias in low-count scenarios.

Furthermore, while the architectures for Stage 2 (Forecasting) and Stage 3 (Control) are detailed, their empirical validation on real-world traffic sequences remains future work. The authors also highlight the need to expand the model to include multi-modal traffic, specifically pedestrians and two-wheelers, which are critical components of urban mobility in developing nations.

Summary updated

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 \pm 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.
BibTeX
@misc{usaid2026vision,
  author = {Mohammad Usaid and Deepak Silaych and Hrithik Mhatre and Archak Mittal},
  title = {{Vision-Based Density Estimation for Adaptive Traffic Control}},
  year = {2026},
  eprint = {2610.38497},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.38497},
}
Figure