Skip to content

Final Year Project on Road Accident Prediction using user's Location,weather conditions by applying machine Learning concepts.

Notifications You must be signed in to change notification settings

theDefiBat/ROAD-ACCIDENTS-PREDICTION-AND-CLASSIFICATION

Repository files navigation

ROAD-ACCIDENTS-PREDICTION-AND-CLASSIFICATION

Final Year Project on Road Accident Prediction using user's Location,weather conditions by applying machine Learning concepts.

DataSet

https://github.com/abdulwahed786/final-yr-projectqA

To Run

python main.py

ML algorithms

VM

Fig 4.6 Azure VM page

Virtual Machine deployed on Azure.

We have chosen Random Forest as our model as it has the highest accuracy (86.86%).

Input taken from user is sent to the backend flask server which feeds the parameters to the ML model and returns the result. It also sends a message to the police to take preventive measures.

RESULTS AND DISCUSSIONS

Figure 4.1 User page

The above figure 4.1 shows the home page of the web app. The web domain is secured with HTTPS wich has been obtained from the certificate authority for secure data transfer and to be able to use the Geolocation API. Displays the data owner login web page, which allows data owner to login and also to register, if the user does not have existing account.

Figure 4.2 User Location by GPS

shows that when user clicks on update coordinates button, the web page requests the browser to take user coordinates. In the backend flask module, GeoLocation API is used to get location of the user. Ajax is used to update the latitude and longitude of the user in the web page.

The coordinates are sent to the OpenWeatherMap Api in the backend for the weather details. From the response we extract the details we require such as weather , road and light conditions.

Day of the week is updated with the getDate function of javascript.

Figure 4.9 User input for other parameters

Figure 4.9shows the input for parameters taken from users. These include the vehicle type, age gender and speed limit.

Figure 4.10 Output Predicted

Figure 4.10shows all the data of the user. When the user clicks on Predict, that data is sent to the backend from where it is feeded into our chosen machine learning algorithm which is Random Forest. The output predicted is on the following basis of severity as 1- Fatal, 2- Severe, 3-Slight.

Figure 4.11 Click on sms button

In this Figure 4.11 an sms is sent to the police with location details and severity. The TextLocal Api gives us 10 free messages to be sent every day.

Figure 4.12 Map

In the Figure 4.12 This web page displays an interactive heat map for users. Darker points mean greater severity. The gmaps api is used to plot on google maps.

About

Final Year Project on Road Accident Prediction using user's Location,weather conditions by applying machine Learning concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages