Coder Social home page Coder Social logo

jailukanna / accident-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quirkyabhi/accident-detection

0.0 0.0 0.0 44.9 MB

Using deep learning and computer vision(pytorch) to detect accidents on dashcam and report it to nearby emergency services with valid accident images

License: MIT License

Python 75.91% PHP 2.22% CSS 7.66% Hack 6.55% HTML 7.66%

accident-detection's Introduction

Accident-Detection

made-with-python HitCount GitHub license Codacy Badge alt text

Overview

Our main goal of this project is to use deep learning and computer vision to detect accidents on dashcam and report it to nearby emergency services with valid accident images.

Challenges

  1. Our main challenge was to gather accident images and videos and manually categuorize images into accient and non-accident frames

  2. To design a deep convolutional neural networks model for this project.

  3. Limited hardware resorces like GPU's.

Team Members

1: Manoj Pawar Sj Github LinedLn

2: Manjunath Inti Github LinedLn

3.Bharat Kaushik Github LinedLn

4.DIkshita Basu Github LinkedLn

5.Bikash Singha Github LinkedLn

6.Rema Rose Toppo Github LinkedLn

Model Overview

1 . For this project we have tweaked Densenet-161 architecture

Dense Convolutional Network (DenseNet), connects each layer to every other layer in a feed-forward fashion. Whereas traditional convolutional networks with L layers have L connections - one between each layer and its subsequent layer - our network has L(L+1)/2 direct connections. For each layer, the feature-maps of all preceding layers are used as inputs, and its own feature-maps are used as inputs into all subsequent layers. DenseNets have several compelling advantages: they alleviate the vanishing-gradient problem, strengthen feature propagation, encourage feature reuse, and substantially reduce the number of parameters.

The 1-crop error rates on the imagenet dataset with the pretrained model are listed below.

Model structure Top-1 error Top-5 error

densenet121 : 25.35 : 7.83

densenet169 : 24.00 : 7.00

densenet201 : 22.80 : 6.43

densenet161 : 22.35 : 6.20

alt text

Prerequisite

Download anaconda from here https://www.anaconda.com/distribution/#download-section

  1. Pytorch

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

  1. OpenCV

conda install -c conda-forge opencv

  1. Dataset of accident/non-accident images

https://drive.google.com/open?id=1o0D7vnGUZHS72is6n1jV1ge2BDfObzVi

  1. Pretrained Model binary file

https://drive.google.com/open?id=1AnJSogx65iyfIG0cSm5D15xfTGJzst8d

  1. A proper php-language environment like xampp,remove htdocs folder and replace that with htdocs in this repo

  2. Clone or Download this repo

git clone https://github.com/manojpawarsj12/accident-detection.git

DEMO

1.accident

alt text

2.Non-accident

alt text

Train

Go to bash/cmd and type

python train.py

Tensorboard visual

1. Traning set alt text 2. Validation set alt text 3.Number of corercts v/s epochs alt text

Test/Accuracy

Go to bash/cmd and type

python test.py

Test on video

python evaluate.py

Test on Webcam

python livewebcam.py

Result

alt text

The model reaches a classification accuracy of 86.00% accuracy on a randomly sampled test set, composed of 20% of the total amount of video sequences from our dataset. Will re-train this model when we have a good GPU and somre data .

accident-detection's People

Contributors

manojpawarsj12 avatar

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.