Inspiration

Every year, more than 2 million people in America experience a life-altering injury as a result of car accidents, most of which could have been prevented, from DUI to texting while driving to driving while fatigued. While solutions to driver safety exist, most of them require a new car or expensive hardware and installation. With all of this in mind, wanted to produce a free mobile application that would provide safety features to any car, making safety income-agnostic.

What it does

Acci-don't is a mobile app made with the client's safety in mind. When the client is driving with Acci-don't open, it will act as a multi-purposed dashcam and help monitor their drive. Our algorithm will detect when the client is about to swerve and give them a gentle "watch out!" to help them stay safe.

How we built it

Acci-don't is a mobile app built with Expo and React Native in the front-end paired with a Flask server in the back-end. Acci-don't takes advantage of the client's camera to broadcast the drive to our lane detection algorithm which determines when the client appears to be swerving unintentionally. We used computer vision in order to detect the closest pair of lanes by selecting edge points which are used by a Hough Transform algorithm provided by OpenCV to detect straight lines. Once we find the equations of the lines of the two lanes, we can calculate their intersection which is the vanishing point. Because all co-parallel lines intersect at the same vanishing point, we realized that we could use vanishing points to determine whether or not the car is headed towards another lane. By applying a threshold to the amount of change in the actual and expected vanishing points, we were able to adjust the degree of sensitivity of our algorithm.

Challenges we ran into

While adjusting the Hough Transform algorithm for detecting lanes, we ran into problems with noise interference from the surroundings. To remedy this, we ended up having to use a bitmask to block out the noise so that our algorithm only considered relevant points within a given window. We also found that between tests our camera's perspective would change enough to impact the accuracy, so we implemented a calibration phase to more accurately assess the threshold between runs.

Accomplishments that we're proud of

Since this was our first time dealing with computer vision in a practical context, we were very proud of how accurately we were able to detect lane changes and we were able to detect swerves while driving in real-time.

What we learned

We learned how to tune hyperparameters to achieve accurate line prediction.

What's next for Acci-don't

Acci-don't has room to expand in the services it may provide examples include determining the distance between you and the car in front of you as well as if it is stepping on the brakes. Acci-don't would also benefit from hardware support with the cars to determine if the user had their turn signal on while doing a lane change thus promoting safe driving habits. Lastly, Acci-don't would like to connect with insurance companies to provide real incentives for driving safely.

Built With

Share this project:

Updates