Road accident avoiding system

The National Highway Traffic Safety Administration estimates that in 2017 drowsy driving was responsible for 91,000 crashes, resulting in 50,000 injuries and nearly 800 deaths. These numbers are underestimated, and up to 6,000 fatal crashes, each year may be caused by drowsy drivers. But besides dro

2025-06-28 16:28:58 - Adil Khan

Project Title

Road accident avoiding system

Project Area of Specialization Artificial IntelligenceProject Summary

The National Highway Traffic Safety Administration estimates that in 2017 drowsy driving was responsible for 91,000 crashes, resulting in 50,000 injuries and nearly 800 deaths. These numbers are underestimated, and up to 6,000 fatal crashes, each year may be caused by drowsy drivers. But besides drowsiness, the driver could be fatigued, distracted, intoxicated, in need of special assistance, etcetera. The system in place will use facial recognition, body language analysis, and traffic density to assess the risk of accident at any point during travel. A camera will be installed over the dash that will send a live feed to the system which in turn will use Machine Learning Algorithms to compare facial expressions and check for signs of fatigue and intoxication. It will also take an overall assessment of the driver’s body language using three cameras to note if they are distracted by any devices or other factors and make them aware of the risks via a paired application. The driver will be given instructions as to how to proceed and if the advised measures are taken by the driver, it greatly improves the chances of prevention. In case of unavoidable accidents, the system also acts as a black box of sorts to provide data in court proceedings (if need be) post-accident.

Project Objectives

The project is meant to save lives by warning the driver of the risk they're putting themselves in at any point if they are in a state that does not deem them fit to drive. Moreover, we hope that this project will encourage people to take their safety seriously. It could benefit the following groups of people:

New/Amateur Drivers

The system could assist new drivers to get used to better accident avoiding measures and gain confidence in their driving skills.

Traffic Police

The system’s camera feed could be offered as a black box of the accident for the police in their investigations to help them rule out any foul play.

Forensic Scientists/Engineers

The data from the system could help forensic scientists and engineers collect more information in the events of a crime such as homicide, carjacking etcetera and to better analyze system failures in vehicles.

Health And Safety Advisors

The system would greatly ease the jobs of health and safety advisors if they recommend it to their clients.

Overall, RAAS hopes to bite off a considerable chunk of the number of annual vehicle crashes, enforce healthy and safe driving habits and help law enforcement with their jobs as well.

Project Implementation Method

The general workings

The Inner workings

programing language: 

Python3

Libraries:

  1. Tkinter - for GUI
  2. NumPy – for Scientific Computing
  3. SciPy – for Technical Computing
  4. Pygame – for Sound
  5. Dlib – for machine learning
  6. OpenCV – for image processing and performing computer vision tasks

Hardware deployment:

Using Raspberry pi 3 or 4 as a medium that can be coded and deployed quite easily into the dashboard of any car using the car's speakers for sound and the attached screen on the pi as a visual medium for login and other details/notifications.

Benefits of the Project

As already stated the project will have a significant impact on driver safety. Given that the environment it is deployed in is Pakistan where the dense population greatly contributes to the risk of driving in a state that is distracted/sleep-deprived/drowsy/intoxicated/without safety gears like seatbelts, it serves as a barrier between the person behind the wheel and disaster. To reiterate, it will benefit other parties as well, namely:

  1. New/Amateur Drivers or even young drivers
  2. Traffic Police
  3. Forensic Scientists/Engineers 
  4. Health And Safety Advisors
  5. and even people at home concerned for their children/elderly on the road 
Technical Details of Final Deliverable

The following features can be expected in the final deliverable:

Sign Up

  1. The user opens the application
  2. The application displays a login and sign-up button.
  3. The user clicks the sign-up button
  4. A prompt is displayed to input sign-up information including an image of their normal state
  5. The user enters information and clicks the sign-up button.
  6. The user is signed up for the application and information is stored in the database server. The avatar screen is displayed.

Login

  1. The user opens the application.
  2. Application displays login and register button.
  3. The user clicks the login button
  4. A prompt is displayed to input login credentials.
  5. The user enters their username and password and clicks the login button.
  6. If credentials are correct, the newsfeed page will be rendered, else an error message is displayed.

Drowsiness Detection

  1. The system takes a new image
  2. The system will detect face
  3. The system will detect the eye region
  4. The system will detect eye features and check drowsiness and with a comparison of their state with that of the calibration image
  5. The system will alarm if the driver will be drowsy

Distraction Detection

  1. The system takes a new image
  2. The system will detect face
  3. The system will detect the frontal position
  4. The system will check the distracted condition i.e the change in distance from their original position/posture/the direction of their face
  5. The system will alarm if the driver is in a distracted state

Intoxication Detection

  1. The system takes a new image
  2. The system will detect face
  3. The system will detect the frontal position
  4. The system will check the intoxicated condition through pupils and a comparison of their state with that of the calibration image
  5. The system will alarm if the driver will be in an intoxicated state

Violating Safety Gears Detection

  1. The system takes a new image
  2. The system will detect the body
  3. The system will detect body posture
  4. The system will detect seat belt
  5. The system will alarm if the driver is not using a seat belt
Final Deliverable of the Project HW/SW integrated systemCore Industry TransportationOther Industries Security Core Technology Artificial Intelligence(AI)Other TechnologiesSustainable Development Goals Good Health and Well-Being for PeopleRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 60000
Raspberry Pi 3/4 Model B+ Starter Kit Equipment13550035500
raspberry-pi-7-inch-hdmi-lcd-usb-touch Equipment11050010500
Raspberry Pi Camera V2 8 mega pixels Equipment190009000
Outliers Miscellaneous 510005000

More Posts