Coder Social home page Coder Social logo

thedefibat / road-accidents-prediction-and-classification Goto Github PK

View Code? Open in Web Editor NEW
53.0 0.0 30.0 8.36 MB

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

Python 0.01% CSS 0.01% HTML 99.54% Jupyter Notebook 0.44%
decision-tree-classifier random-forest-classifier scikitlearn-machine-learning

road-accidents-prediction-and-classification's Introduction

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.

road-accidents-prediction-and-classification's People

Contributors

thedefibat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

road-accidents-prediction-and-classification's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.