A crosswalk seen from a pole-mounted camera in CARLA, with a pedestrian crossing and a cyclist approaching

bikeped

Real-time collision warnings for pedestrians and cyclists at urban intersections, from one fisheye camera and one edge device.

The conformance scenario Bike Approaches Ped, rendered in CARLA from the pole camera.

A warning light for the crosswalk

Few systems try to warn unequipped road users in real time on commodity hardware. bikeped is a prototype that does. A fisheye camera on a pole 12 ft above the kerb watches the crossing, a Jetson Orin detects and tracks pedestrians and cyclists, places them on the ground plane and decides 30 times a second whether a cyclist is closing on someone who is crossing. When one is, a light and a sound at the crosswalk say so. Under conformance testing with fisheye localization error, the selected configuration reaches 93.3% sensitivity and 92.3% specificity with a mean warning budget of 3.3 s.

Try it

The simulator runs the decision logic in your browser on every scenario, with the camera model, detection failures and latency under your control.

Nothing to install. The page is a single HTML file and also runs from a local copy of the repository.

Three stages on every frame

The decision layer runs after tracking and takes ground-plane positions as its input. With no pedestrian in view the state is idle. With a pedestrian and no cyclist seen in the last 58 frames it is safe. Otherwise every cyclist and pedestrian between 1.9 m and 24.8 m apart is tested as a pair: if they are closer than they were two frames earlier and the cyclist is moving, the state is alert, and if no pair is closing it is warning. The upper bound grows with speed to the cyclist's stopping distance, computed from a reaction time of 0.84 s and a deceleration of 1.96 m/s², the 85th-percentile field values for conventional bicycles.

tracks yes yes yes no no no 01 Pedestrian presence Is anyone in the crossing area? 02 Cyclist memory Any cyclist in the last 58 frames? 03 Pairwise closing check Is a pair in range and closing? IDLE SAFE WARNING ALERT

A cyclist is moving and closing on a pedestrian inside the distance bounds.

The same module, decision_pipeline.py, runs on the device and in the testbench. The decision reference covers the parameters, how they were selected and the three baseline decision rules that the pairwise check is compared against.

One lens over the whole intersection

The camera is a 197.9° fisheye, so a single view covers the crossing and both approaches. Corner detection and standard optimizers fail at that field of view, so the lens is calibrated by remapping to perspective views and fitting an equidistant model, r = f·θ, with direct bundle adjustment. Each detection is located by sending the bottom centre of its box through a lookup table computed once from the calibration, which makes ground-plane localization one array read per object.

The crosswalk seen through the simulated fisheye lens
// camera_calibration.json
{
  "model": "equidistant",
  "cx": 1752.69,
  "cy": 1804.54,
  "focal_length": 1013.31,
  "fov_deg": 197.9,
  "radius_px": 1750.0,
  "k1": 0.0,
  "k2": 0.0,
  "rms_error_px": 4.6334,
  "num_frames": 42,
  "num_points": 1470
}

The CARLA renderer reads the same file. It captures cube faces at the camera position and remaps them through this model, so a simulated frame has the geometry of a deployed one. Perception reference

Scenarios with ground truth on every frame

The conformance suite is 24 scripted scenarios: safe crossings, standard and high-speed approaches, accessibility cases, multi-agent scenes, edge cases and non-linear trajectories. Each one is a set of timed waypoints on the ground plane, and a kinematic safety model labels every frame. A frame is dangerous when the cyclist is closing, the closest point of approach is within 5 m, and either the stopping distance exceeds 80% of the remaining gap or the time to collision is under 3 s.

Pedestrian pathCyclist path

The same scenarios in CARLA

Every scenario can be rendered in CARLA from the waypoints that define it. Actors stay on their scripted positions, so the ground-truth labels of the testbench apply to the rendered frames, and each run writes video, per-frame 2D and 3D boxes and a manifest. The renderer drives CARLA 0.9.14 to 0.9.16 on Unreal Engine 4 and has a code path for CARLA 0.10 on Unreal Engine 5, whose current limits are listed in the UE5 notes.

The crosswalk in low evening sun The same view at noon The same view in rain The same view at night on wet asphalt
One camera and one scenario under four weather presets, CARLA 0.9.16.

Six camera rigs share one scenario: the pole camera, the calibrated fisheye, a chase camera behind the first cyclist, a slow orbit around the conflict point, a kerbside tripod and a plan view. The overlay draws 3D boxes, trails, the closest pair, the decision state and a timeline that puts the ground-truth danger intervals next to the system's alerts.

Bike Approaches Ped: pole, fisheye and chase views with the plan view
A chase camera following a cyclist through an intersection
Chase, Multi-Speed Converging
A kerbside camera at eye level
Street, Multi-Speed Converging
An orbiting camera around the conflict point
Orbit, Bike Approaches Ped
A wheelchair user on the crosswalk seen from the pole
Pole, Wheelchair User

Run it

The testbench needs Python 3.10 or newer and four packages. The CARLA renderer needs a CARLA server and its Python client, and nothing else in the repository depends on them.

Reproduce the tables and figures of the paper

pip install -r requirements.txt

# every experiment, without the optimizer
python run_experiments.py --skip-optimizer

# the pipeline comparison on its own
python decision_testbench.py --compare

Render a scenario in CARLA

# start a server, then render two views with the overlay
python -m bikeped.sim server --engine ue4 --root /opt/carla

python -m bikeped.sim render \
    --scenario bike-approaches-ped \
    --rig pole,fisheye \
    --weather golden_hour \
    --layout split

Citation

@misc{turkcan2026realtimebikepedestriansafetywideangle,
  title         = {A Real-Time Bike-Pedestrian Safety System with Wide-Angle Perception and Evaluation Testbed for Urban Intersections},
  author        = {Mehmet Kerem Turkcan},
  year          = {2026},
  eprint        = {2604.17046},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2604.17046}
}