Raspberry Pi Traffic Analysis
← Project Index Raspberry Pi Traffic Analysis

Raspberry Pi Traffic Analysis

Real-time vehicle detection and tracking on a Pi 5 + Hailo-8 (26 TOPS) -; YOLO/MobileNet SSD at 30+ fps, speed and acceleration from pixel kinematics, and audio analysis to correlate engine noise with how people actually drive.

Archived Started: Summer 2025 Updated: Summer 2025

Overview

A street-facing edge-vision rig built to answer a petty but genuine question: why are some cars so loud? Is it speed, acceleration on entry, the vehicle type, or a modified exhaust? The plan was to point a camera and a microphone at the road and let a Pi 5 with a 26-TOPS Hailo-8 do the detective work -; detect and track vehicles, compute their speed and acceleration, and line that up against the sound they make.

Background

This is the more ambitious sibling of the engagement-monitoring work -; same edge hardware, pointed outward instead of at a room. The 26-TOPS Hailo-8 was specifically an upgrade from the 13-TOPS part to leave headroom for running detection and license-plate models alongside tracking. Privacy was still a design concern: license plates, if read at all, were to be hashed and stored locally only.

A secondary use case got sketched alongside the main one -; a school-pickup matching system using the same stack to validate which student belongs to which car at dismissal.

How It Works

The intended pipeline: YOLOv8m (or a lighter MobileNet SSD) for detection running on the Hailo NPU, with ByteTrack or SORT handling multi-object tracking on the CPU so the accelerator stays free for inference. Speed comes from pixel-to-world calibration and perspective correction against known road references, targeting 30+ fps.

The audio half is the novel bit: FFT-based frequency analysis to read engine RPM, Doppler shift to cross-check the calculated speed, and signature matching to flag modified exhausts. A planned stereo-vision stage (StereoSGBM with WLS filtering) would have added true 3D positioning. Everything was scoped as a six-phase build, from basic detection up to a pattern-mining dashboard.

Current Status

Archived as a Summer 2025 design. This one stayed mostly on the whiteboard -; an extensive technical plan, a six-phase rollout, and Python skeleton code, with the Hailo-8 and Pi Camera 3 ordered -; but it never got past the design-and-skeleton stage into a running system.

  • Six-phase architecture: detection → tracking/speed → stereo → plates → audio → dashboard.
  • Hardware acquired (Hailo-8 26 TOPS, Pi Camera 3); core code remained skeleton-stage.
  • Shelved before a live deployment; preserved as a thorough design study.