Inspiration

Forward-collision warning is one of the most useful safety features a car can have, but it mostly comes on newer cars. Drivers with older cars usually have to purchase a newer car or pay for a more expensive aftermarket system. We wanted to give those drivers an extra layer of safety with a small, affordable add-on.

What it does

COOPER is a dashcam that warns you before a collision. It mounts on the windshield or dash and runs on the car's power, with no wiring into the car's systems. It spots people and vehicles ahead, predicts where each one is going, and checks those paths against your own path.

A live dashboard is used to show each object's predicted path and the warning level, as well as for first time configuration. All processing happens on the device, and COOPER never records or stores video.

How we built it

A Raspberry Pi 5 running YOLO11n detects people and vehicles, creating rectangles around them while ByteTrack keeps a stable ID on each one. A Kalman filter for each object tracks where it touches the road and how big its box is, then predicts its path seconds ahead. Time until contact is calculated using the rate of growth of the box around an object. This catches a car braking directly ahead, which stays centered in the frame but keeps growing.

To avoid false alarms, COOPER ignores jumpy measurements from partly hidden cars and only warns the driveronce a warning holds for two frames in a row. A Flask server is used to stream the dashboard

Challenges we ran into

The main challenge we ran into was pivoting mid-hackathon. COOPER was originally COOP and included a motor to follow moving objects. When including the motor posed a serious engineering problem for our team, we reworked out project into a dashcam and repurposed our vision pipeline for collision warning.

Our hardware itself also became an issue. Even with a small like YOLO11n, the whole pipeline required serious optimization before it was able to run at acceptable speeds. In the end, we got it working, but an AI accelerator for the Pi would have made this project faster and more optimized.

Accomplishments that we're proud of

We are proudest of the work we put in and how well we were able to work as a team under pressure. Together, we got this entire pipeline running on a single Raspberry Pi, with detection at 12-13 fps on CPU alone.

What we learned

We all learned how Kalman filters turn noisy detections into smooth predictions and how small local models like YOLO are run on limited hardware like the Pi.

What's next for COOPER

Our top priority is a buzzer or speaker for the Pi to give drivers a sound warning without looking away from the road. After that, a hardware upgrade using an AI accelerator, automatic lane detection so drivers do not have to manually set a lane on first configuration and full road testing to optimize performance at night and in rain.

Built With

Share this project:

Updates

Submission history