We started the hackathon with the idea of waking up a student who is falling asleep at his computer. We soon realised that the market potential for this wouldn't be very big, and it would be more of a novelty product. We then thought, "Hey, this could work for drivers in cars.", did some research, and found out that driver drowsiness is a huge problem without many effective solutions right now.

What it does

SafeDrive uses modified OpenCV software to detect when a driver's eyes are closing. If it detects the driver's eyes are closed for more than two seconds, SafeDrive will make your phone vibrate, and will make a noise in order to wake the driver.

How we built it

Firstly, we researched different ways to detect eyes being open or closed. We found OpenCV, and then continued researching how we can incorporate OpenCV into our program so that we can make the user's phone buzz when the program detects that the eyes are closed. Second, we asked for the solution to simulate the sensors and have virtual data send to M2X. We don't have all sensors required for our solutions like a car to demo the speed, but we fix that with the hardwares built into our mobiles & laptops.

Challenges we ran into

The biggest challenge is that we had never dealt with OpenCV, or even heard of it, before the hackathon. The OpenCV library is huge, and official documentation is messed up with different languages & versions. It takes lots of time to make OpenCV compile and work with the iSight camera on our Macbook. It was also a struggle to get the eye detection to work correctly. Besides that, most other things were quite straightforward.

Accomplishments that we're proud of

We're proud of actually getting this program to work. The OpenCV software is not too accurate, so we're proud that we could get it to detect when the users eyes are closed, and then buzz the phone.

What we learned

M2X and OpenCV. Most of our time was spent on learning OpenCV. Without it, we probably couldn't have completed our application.

Future features


  • Plays different types of music depending on if you are feeling tired, upbeat, e.t.c.
  • Automatically alerts police if there has been an accident


  • Notifies you if a registered phone is not in the car while driving.

Built With

Share this project: