Inspiration
Pedestrian crossings are one of the most dangerous places in a city: pedestrians, cyclists and cars share the same space, and many accidents happen simply because someone notices the others *too late. We asked ourselves: what if the crossing itself could see what's coming and warn people *before a conflict happens?
That's how BeSafe was born.
What it does
BeSafe turns an ordinary crossing into a smart one. Using a camera and an Arduino UNO Q, it:
- detects pedestrians, cyclists and vehicles in real time
- estimates speed and trajectories to predict a possible conflict before it happens
- triggers light and sound alerts when the situation becomes dangerous
- counts crossings by direction, producing useful data for the city
All the AI runs locally on the board: no cloud and no video leaving the device, which is better for privacy and latency.
How we built it
- Arduino UNO Q: the Linux side runs the Python computer-vision pipeline, while the microcontroller drives LEDs, buzzer and display.
- Arduino App Lab: used to develop, connect and deploy both parts of the app.
- Danger rule: for each detected object we estimate its velocity $v$ and its distance $d$ from the crossing area, and compute the time needed to reach it:
$$ t = \frac{d}{v} $$
If a vehicle's $t$ falls below a threshold $\tau$ while a pedestrian is crossing, the system raises an alert.
- Real-time web dashboard (HTML, CSS, JavaScript, Socket.IO): it shows the live video with detections, the current danger state, adjustable thresholds and crossing counters.
We tested BeSafe on a real crossing in Turin.
Challenges we ran into
- Running AI on the edge: getting detection fast enough on a small board meant balancing accuracy and speed.
- From positions to predictions: turning noisy frame-by-frame detections into stable speed estimates was harder than expected.
- Two worlds on one board: making the Python side and the microcontroller talk reliably in real time.
- The real world: changing light, occlusions and unpredictable people behave very differently from a test video.
What we learned
- How to build an end-to-end edge-AI system, from sensors to alerts.
- How to design a simple but effective risk rule and tune its thresholds on real data.
- How to work fast as a team under hackathon pressure, splitting hardware, AI and interface work.
What's next
- Better trajectory prediction with tracking models
- Smarter thresholds that adapt to traffic and time of day
- A pilot installation on more crossings to collect long-term data
Log in or sign up for Devpost to join the conversation.