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
Road accident avoiding system
Project Area of Specialization Artificial IntelligenceProject SummaryThe 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 ObjectivesThe 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 MethodThe general workings
- RAAS will use Facial detection using DIP and ML.
- Users will then be under observation during their drive while the camera focuses on their core features along with other indicators such as posture, blink rate, perspiration pupil size, and movement of all individual features and the body.
- The feed will be transmitted to the backend system where it will be analyzed and compared against existing data to check for anomalies.
- Based on the gathered data the computer will then follow the coded protocol as per the situation.
- The user will be alerted through sound and notifications along with instructions about what the statistics advise for a driver in their state to reduce the chances of putting them in danger.
The Inner workings
programing language:
Python3
Libraries:
- Tkinter - for GUI
- NumPy – for Scientific Computing
- SciPy – for Technical Computing
- Pygame – for Sound
- Dlib – for machine learning
- 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 ProjectAs 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:
- New/Amateur Drivers or even young drivers
- Traffic Police
- Forensic Scientists/Engineers
- Health And Safety Advisors
- and even people at home concerned for their children/elderly on the road
The following features can be expected in the final deliverable:
Sign Up
- The user opens the application
- The application displays a login and sign-up button.
- The user clicks the sign-up button
- A prompt is displayed to input sign-up information including an image of their normal state
- The user enters information and clicks the sign-up button.
- The user is signed up for the application and information is stored in the database server. The avatar screen is displayed.
Login
- The user opens the application.
- Application displays login and register button.
- The user clicks the login button
- A prompt is displayed to input login credentials.
- The user enters their username and password and clicks the login button.
- If credentials are correct, the newsfeed page will be rendered, else an error message is displayed.
Drowsiness Detection
- The system takes a new image
- The system will detect face
- The system will detect the eye region
- The system will detect eye features and check drowsiness and with a comparison of their state with that of the calibration image
- The system will alarm if the driver will be drowsy
Distraction Detection
- The system takes a new image
- The system will detect face
- The system will detect the frontal position
- The system will check the distracted condition i.e the change in distance from their original position/posture/the direction of their face
- The system will alarm if the driver is in a distracted state
Intoxication Detection
- The system takes a new image
- The system will detect face
- The system will detect the frontal position
- The system will check the intoxicated condition through pupils and a comparison of their state with that of the calibration image
- The system will alarm if the driver will be in an intoxicated state
Violating Safety Gears Detection
- The system takes a new image
- The system will detect the body
- The system will detect body posture
- The system will detect seat belt
- The system will alarm if the driver is not using a seat belt
| 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 | Equipment | 1 | 35500 | 35500 |
| raspberry-pi-7-inch-hdmi-lcd-usb-touch | Equipment | 1 | 10500 | 10500 |
| Raspberry Pi Camera V2 8 mega pixels | Equipment | 1 | 9000 | 9000 |
| Outliers | Miscellaneous | 5 | 1000 | 5000 |