Inspiration

The inspiration behind making of this project is to save the lives of thousands and lakhs of people who die in road accident because of late medical services provided to them because either people leave them dying on spot, or no one gets the information about the injured person.

What it does

It scans the speed of the vehicle every millisecond through GPS and speedometer and the algorithm is designed in such a way that if the speed of the vehicle changes at instantaneous rate, we can inform the relatives of the person driving the vehicle who might fallen into some accident, and alert the nearest police and hospital. It only alerts when the speed suddenly changes for more then 40 KMPS in 1-2 seconds, any changes less then 40kmps and more then 30kmps will be reported to driver to confirm if he needs any help or not, if driver didn't responds it will send the emergency signals to hospital and police.

How we built it

Install Dependencies: First, you need to install the necessary Python libraries using pip, the Python package manager. You need to install the Twilio library (twilio) for sending SMS notifications . You can install these libraries by running the following commands in your terminal or command prompt:

Copy code pip install twilio Create a Twilio Account: Visit the Twilio website (https://www.twilio.com/) and sign up for an account if you haven't already. Once logged in, you need to obtain your Twilio account SID and authentication token from the Twilio console.

Obtain a Twilio Phone Number: In the Twilio console, navigate to the phone numbers section and purchase or use an existing phone number to send SMS messages.

Write the Python Script: You can use any text editor or integrated development environment (IDE) to write the Python script. The script provided in your question is a good starting point. Make sure to replace the placeholder values for the Twilio account SID, authentication token, and phone numbers with your own obtained from the Twilio console.

Test the Script: After writing the script, you can test it by running it in your Python environment. Make sure to provide the initial speed when prompted, and you can also simulate speed changes during testing by entering different speeds when prompted.

Handling Errors and Improvements: Ensure that you handle errors gracefully in your script, such as network errors or invalid input. You can also add more features or improvements, such as implementing a more sophisticated speed monitoring algorithm or integrating with a GPS module for accurate location tracking.

Deploy and Use: Once you are satisfied with the functionality of your script, you can deploy it to your desired environment, such as a Raspberry Pi or a server, to run continuously. Make sure to keep your Twilio credentials secure and adhere to any usage limits or regulations when sending SMS messages. Setting up Dependencies: First, I installed the necessary Python libraries using pip, the Python package manager. I installed the Twilio library (twilio) for sending SMS notifications for geocoding services by executing the following commands in my terminal:

Copy code pip install twilio Creating a Twilio Account: I visited the Twilio website (https://www.twilio.com/) and signed up for an account. Once logged in, I obtained my Twilio account SID and authentication token from the Twilio console.

Obtaining a Twilio Phone Number: In the Twilio console, I navigated to the phone numbers section and either purchased or used an existing phone number to send SMS messages.

Writing the Python Script: I used my preferred text editor to write the Python script. The script provided in my question served as a good starting point. I made sure to replace the placeholder values for the Twilio account SID, authentication token, and phone numbers with my own obtained from the Twilio console.

Testing the Script: After writing the script, I tested it in my Python environment. I provided the initial speed when prompted and simulated speed changes during testing by entering different speeds when prompted.

Handling Errors and Improvements: I ensured that I handled errors gracefully in my script, such as network errors or invalid input. Additionally, I brainstormed and implemented potential improvements, such as a more sophisticated speed monitoring algorithm or integration with a GPS module for accurate location tracking.

Deployment and Usage: Once satisfied with the functionality of my script, I deployed it to my desired environment, such as a Raspberry Pi or a server, to run continuously. I made sure to keep my Twilio credentials secure and adhere to any usage limits or regulations when sending SMS messages.

By following these steps, I successfully built and deployed the provided Python script for monitoring car speed and sending warning SMS notifications.

Challenges we ran into

Few challenges we ran into is to gain the coordinates and network system for emergency reporting system for the accident, security of data base of all the contacts of relatives, If suddenly speedometer broke down or somehow our algo fail to read the speed for instance, getting the perfect result to know weather it is an accident or driver just braked very strongly.

Accomplishments that we're proud of

We have accomplished the result of our algorithm as it is working pretty good and it sends emergency messages very fast to relatives and police and hospital department, our algorithm is working perfectly fine, without bugs making it very safe to implement and use in real life.

What we learned

We learned how we can design algorithms that can help us in real time, implementation of it, helping to make life easy with help of coding and programming.

What's next for Road Accident Detection

The next big feature we are trying to achieve is to implement it on a large scale in four-wheel and two-wheel vehicles, we are working to achieve the perfectly correct result by training our result data for some certainly special region which are accident prone areas and where the algo can miss any cases, we can train it to work perfectly with the help of AI in future.

Built With

Share this project:

Updates