Giter Site home page Giter Site logo

ihusnainaali / traffic-net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olafenwamoses/traffic-net

0.0 0.0 0.0 5.9 MB

A dataset of traffic, fire and accident images for training deep learning models.

Home Page: https://DeepQuestAI.com

License: MIT License

Python 100.00%

traffic-net's Introduction

Traffic-Net

Traffic-Net is a dataset containing images of dense traffic, sparse traffic, accidents and burning vehicles.


Traffic-Net is a dataset of traffic images, collected in order to ensure that machine learning systems can be trained to detect traffic conditions and provide real-time monitoring, analytics and alerts. This is part of DeepQuest AI's to train machine learning systems to perceive, understand and act accordingly in solving problems in any environment they are deployed.

This is the first release of the Traffic-Net dataset. It contains 4,400 images that span cover 4 classes. The classes included in this release are:

  • Accident
  • Dense Traffic
  • Fire
  • Sparse Traffic

There are 1,100 images for each category, with 900 images for trainings and 200 images for testing . We are working on adding more categories in the future and will continue to improve the dataset.



>>> DOWNLOAD, TRAINING AND PREDICTION:

The Traffic-Net dataset is provided for download in the release section of this repository. You can download the dataset via the link below.

https://github.com/OlafenwaMoses/Traffic-Net/releases/tag/1.0

We have also provided a python codebase to download the images, train ResNet50 on the images and perform prediction using a pretrained model (also using ResNet50) provided in the release section of this repository. The python codebase is contained in the traffic_net.py file and the model class labels for prediction is also provided the model_class.json. The pretrained ResNet50 model is available for download via the link below.

https://github.com/OlafenwaMoses/Traffic-Net/releases/download/1.0/trafficnet_resnet_model_ex-055_acc-0.913750.h5

This pre-trained model was trained for 60 epochs only, but it achieved over 91% accuracy on 800 test images. You can see the prediction results on new images that were not part of the dataset in the Prediction Results section below. More experiments will enhance the accuracy of the model.
Running the experiment or prediction requires that you have Tensorflow, and Keras, OpenCV and ImageAI installed. You can install this dependencies via the commands below.


- Tensorflow 1.4.0 (and later versions) Install or install via pip

 pip3 install --upgrade tensorflow 

- OpenCV Install or install via pip

 pip3 install opencv-python 

- Keras 2.x Install or install via pip

 pip3 install keras 

- ImageAI 2.0.3

pip3 install imageai 



>>> Video & Prediction Results

Click below to watch the video demonstration of the trained model at work.




Sparse_Traffic  :  99.98759031295776
Accident  :  0.006892996316310018
Dense_Traffic  :  0.0031178133212961257
Fire  :  0.0023975149815669283


Dense_Traffic  :  100.0
Accident  :  9.411973422857045e-07
Fire  :  2.656607822615342e-07
Sparse_Traffic  :  4.631924704900925e-09


Accident  :  99.94832277297974
Sparse_Traffic  :  0.04670554480981082
Fire  :  0.004610423275153153
Dense_Traffic  :  0.00035401615150476573


Fire  :  100.0
Accident  :  1.9869084979303675e-22
Dense_Traffic  :  3.262699368229192e-23
Sparse_Traffic  :  6.003136426033551e-28

References

  1. Kaiming H. et al, Deep Residual Learning for Image Recognition
    https://arxiv.org/abs/1512.03385

traffic-net's People

Contributors

olafenwamoses 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.