LUCAS LIEBE[ 01 // SYSTEMS ][ 02 // KITCHEN ]
[ POTSDAM: --:-- CET ⇄ DAEJEON: --:-- KST ]
DATE: 2023-09⚡ Real-Time 30 FPS / 12.22 km/h MAE on CCTV

FARSEC: A Reproducible Framework for Automatic Real-Time Vehicle Speed Estimation Using Traffic Cameras

PythonOpenCVYOLOv4PixelformerMonocular DepthRTP / HLS Streams
[ ⬇ DOWNLOAD PDF ]

01 // Overview & Core Contribution

Preprint on arXiv (cs.CV, September 2023) — Joint project with Hasso Plattner Institute (HPI), University of Potsdam, Porsche Digital, and Porsche AG.

Estimating vehicle speeds from uncalibrated monocular traffic cameras typically relies on manual road measurements, ground-truth lane masks, or non-real-time 3D reprojection pipelines that fail to generalize across live CCTV feeds.

FARSEC provides a fully automatic, reproducible, and modular end-to-end pipeline capable of ingesting live public traffic streams (RTP / HLS), calibrating camera scale without intrinsics or extrinsics, and outputting real-time directional speed estimates at 30 FPS.

02 // Calibration-Free Vision Pipeline

  • Monocular Depth & Least-Squares Scaling (s_M): Predicts relative scene depth via Pixelformer and solves a least-squares estimator mapping tracked vehicle bounding-box intersections against mean vehicle lengths (6 m) to recover real-world metric scale without manual calibration.
  • Centroid Tracking & Live FPS Estimation: Detects vehicles with YOLOv4 (608×608), links trajectories via Euclidean centroid matching, separates opposing lanes by vertical image motion, and dynamically measures inter-frame arrival times when stream metadata is absent.
  • Automatic Camera-Move Re-Calibration: Monitors rolling 100-frame pixel-delta spikes to detect PTZ camera viewpoint shifts and automatically trigger pipeline re-calibration.
  • Sliding-Window Speed Aggregation: Outputs directional average speeds (km/h) over a configurable 60 s rolling window.

03 // Key Evaluation Highlights

Evaluated against SOTA baselines (Learned+RANSAC, FullACC, OptScaleVP2) across BrnoCompSpeed (including synthetic blur and noise degradations), real-world CCTV footage, and live OpenTrafficCamMap streams (32,221 cameras):

  • Real-World CCTV Robustness: Achieves 12.22 km/h MAE on realistic urban CCTV benchmarks—outperforming Learned+RANSAC (12.80 km/h) and FullACC++ (32.60 km/h) while sustaining real-time 30 FPS throughput.
  • Degradation Resilience: Maintains stable error under heavy image blur (20.16 km/h vs. 21.24 km/h unaugmented) and pixel noise without scene-specific overfitting.