Proof of Concept Integrated Traffic Management Semarang

Turning the cameras the city already has into a live map of the whole road network

Semarang runs 60+ traffic cameras and can read commercial probe data across every road. Neither, alone, tells you what traffic is doing citywide in real time. Calibrating one against the other does — and the first field data shows the two agree with reality.

Firman Hadi et al.
Universitas Diponegoro · Dept. of Geodetic Engineering · 2026
Prepared 18 Jul 2026 Status Working prototype Coverage ~5,000 road segments Field data 1,537 paired observations
The opportunity

Two data sources, each incomplete on its own

Commercial probe data (HERE) covers every major road, but reports an abstract 0–10 “jam factor” — not a count, and not calibrated to Semarang’s motorcycle-dense traffic. CCTV measures real vehicles, but only at a handful of intersections.

The prototype joins them on shared road segments: use the cameras to learn what HERE’s numbers mean in real Semarang traffic, then apply that translation to the ~750 road segments that have probe coverage but no camera.

Data sources

Pantau Semarang

livepantau · CCTV streams

The city's traffic cameras broadcast live video — real vehicles at intersections.

60+ cameras · 9 wired

HERE Traffic

commercial probe data

Jam factor & speed for every major road — broad coverage, abstract units.

~5,000 segments · every 15 min
video · on demand
HERE API · every 15 min
Mac Mini (M2 Pro)always on · supervised

Vehicle detection

YOLOv8 + DeepSORT → traffic.db

Counts and tracks vehicles per camera; yields real density & congestion level.

230,754 detection records

HERE collector

.gpkg snapshot every 15 min

Records citywide HERE conditions to a time-windowed snapshot archive.

~17,350 snapshots · 19 GB
joined on: OSM road segment + 15-min window (clocks aligned)

Integration pipeline

traffic-management · Python

Matches cameras to segments, joins both sources on a 15-minute grid, then learns HERE jam factor → real density.

1 Crosswalk→ 2 Paired join→ 3 Calibration
1,537 paired observations · 8 cameras
Output
● Running

Calibration model + validation report

The translation from HERE → real traffic, with its evidence. Strengthens automatically as data arrives.

CCTV (Pantau Semarang) Probe (HERE Traffic) Integration & output
The evidence · does HERE track real traffic?

At every camera, higher HERE jam factor means more real vehicles

The test: at each camera, does HERE’s jam factor move together with the density the camera actually measures? A positive rank correlation means yes. All eight cameras with enough data sit between +0.50 and +0.74 — a strong, consistent signal. (A ninth, newly added, is still gathering data and is held out until it stabilises.)

Agreement between HERE jam factor and measured density, by camera

Spearman rank correlation · higher is better · 1.00 = perfect
0.00.2 0.40.60.8 Tugumuda 0.74 Bukit Sari 0.71 Kalibanteng 2 0.69 Simpang Lima 1 0.68 Simpang Lima 2 0.67 Fly Over Jatingaleh 0.65 Indraprasta 0.64 Kaligarang 0.50

Eight cameras, one story: correcting the road-segment mapping (§ status note) made the per-camera agreement markedly more consistent — the three previously-weak cameras (Kaligarang, Tugumuda, Simpang Lima 2) roughly doubled to +0.50–0.74. A newly-added ninth camera (Ruas Kerapyak, ~60 observations) is collecting but held out of the fit until it accumulates enough data to characterise.

More jam factor → more density

Mean measured density within each HERE jam-factor band
012 34 0–11–22–3 3–44+ HERE jam factor →

The cameras reproduce textbook traffic physics

As roads fill, flow peaks at capacity, then collapses into gridlock
capacity FreeModerate CongestedSevere
bars — density (road fullness) line — flow (vehicles/min)

The right-hand chart is the decisive internal check: independent of HERE, the cameras recover the fundamental diagram of traffic flow — density climbs steadily while throughput peaks at capacity and then falls as the road jams. Reproducing this well-known signature is strong evidence the underlying measurements are real, not artefacts.

The numbers

Where the calibration stands today

+0.33
Citywide rank agreement (HERE ↔ measured congestion)
78%
Congestion band predicted correctly (vs 71% baseline)
8/9
Cameras in the calibration (9th held out, still collecting)
~5,000
Road segments reachable from these cameras
SignalFirst runLatestReading
Network coverage755~5,000~7× more of the city (remapped)
Cameras in the fit58Wider road-type coverage
Jam ↔ density (rank)+0.27+0.33Positive & stronger
Jam ↔ congestion band+0.32+0.33Positive & steady
— on primary roads+0.37+0.57Strong on major arterials
Congestion-band accuracy77%78%~7-pt lift over baseline

Coverage grew ~7× and the per-camera agreement became markedly more consistent once the road-segment mapping was corrected; the pooled figures held roughly steady as the network — and the honesty of it — expanded. The calibration firms up on its own as data arrives, with no additional work.

Why it matters for Semarang

Citywide, real-time, from infrastructure the city already owns

  • Coverage without new hardware. A handful of calibrated cameras extend a congestion estimate to all ~5,000 covered road segments — the ~750 with no camera included.
  • Real units, not an opaque index. Officials see estimated vehicle density and a familiar A–F congestion level, calibrated to local traffic — usable for signal timing, incident response, and planning.
  • Runs on existing feeds. The prototype uses the city’s own livepantau CCTV and standard probe data, on a single always-on computer. Adding cameras only sharpens it — the design scales toward the full 60+ fleet.
  • Continuously self-improving. Both feeds now run unattended; accuracy increases automatically as more paired data accrues.
Honest status

Proven in principle — not yet a validated citywide model

The concept is validated: HERE tracks real Semarang congestion in the right direction, at every camera, and the measurements reproduce known traffic physics. What remains is scale and time, not a question of whether the idea works.

A few days of overlap, not weeks. The 1,537 observations span a strong but short window. The fit should not yet be projected across the full network — that waits for a multi-week run.

Breadth is not the same as trust. The estimate reaches ~5,000 segments, but only ~1,400 (primary/trunk — the classes the cameras cover) rest on a fitted relationship; the rest use a cruder city-wide fallback and are flagged lower-confidence.

A ninth camera is held out. Ruas Kerapyak (~60 observations, added 19 Jul) does not yet track HERE and is excluded from the fit until it accumulates enough data — it keeps collecting and rejoins automatically once it stabilises.

The detector is off-the-shelf. It under-counts motorcycles in dense traffic; a locally-tuned model would tighten the calibration further.

Next: accumulate several weeks of paired data, expand toward the full camera fleet, then stand up the live citywide congestion map (the “nowcast”) and a unified operations dashboard.