Coder Social home page Coder Social logo

eshnil2000 / trafficlight_detection-tensorflowapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vatsl/trafficlight_detection-tensorflowapi

0.0 1.0 0.0 14.93 MB

Traffic Light Detection and Classification using TensorFlow Object Detection API

HTML 50.21% Jupyter Notebook 49.76% Python 0.03%

trafficlight_detection-tensorflowapi's Introduction

Traffic Light Detection and Classification with TensorFlow Object Detection API


A brief introduction to the project is available here


AWS AMI with all the software dependencies like TensorFlow and Anaconda (in the community AMIs) - udacity-carnd-advanced-deep-learning

Get the dataset

Drive location

Get the models

Do git clone https://github.com/tensorflow/models.git inside the tensorflow directory

Follow the instructions at this page for installing some simple dependencies.

All the files have to be kept inside the tensorflow/models/research/ directory - data/, config/, data_conversion python files, .record files and utilitites/ ,etc.

Location of pre-trained models:

pre-trained models zoo

Download the required model tar.gz files and untar them into /tensorflow/models/research/ directory with tar -xvzf name_of_tar_file.

Creating TFRecord files:

python data_conversion_udacity_sim.py --output_path sim_data.record

python data_conversion_udacity_real.py --output_path real_data.record


Commands for training the models and saving the weights for inference.

Using Faster-RCNN model

For Simulator Data

Training

python object_detection/train.py --pipeline_config_path=config/faster_rcnn-traffic-udacity_sim.config --train_dir=data/sim_training_data/sim_data_capture

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/faster_rcnn-traffic-udacity_sim.config --trained_checkpoint_prefix=data/sim_training_data/sim_data_capture/model.ckpt-5000 --output_directory=frozen_sim/

For Real Data

Training

python object_detection/train.py --pipeline_config_path=config/faster_rcnn-traffic_udacity_real.config --train_dir=data/real_training_data

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/faster_rcnn-traffic_udacity_real.config --trained_checkpoint_prefix=data/real_training_data/model.ckpt-10000 --output_directory=frozen_real/


Using Inception SSD v2

For Simulator Data

Training

python object_detection/train.py --pipeline_config_path=config/ssd_inception-traffic-udacity_sim.config --train_dir=data/sim_training_data/sim_data_capture

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/ssd_inception-traffic-udacity_sim.config --trained_checkpoint_prefix=data/sim_training_data/sim_data_capture/model.ckpt-5000 --output_directory=frozen_models/frozen_sim_inception/

For Real Data

Training

python object_detection/train.py --pipeline_config_path=config/ssd_inception-traffic_udacity_real.config --train_dir=data/real_training_data

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/ssd_inception-traffic_udacity_real.config --trained_checkpoint_prefix=data/real_training_data/model.ckpt-10000 --output_directory=frozen_models/frozen_real_inception/


Using MobileNet SSD v1

(Due to some unknown reasons the model gets trained but does not save for inference. Ignoring this for now.)

For Simulator Data

Training

python object_detection/train.py --pipeline_config_path=config/ssd_mobilenet-traffic-udacity_sim.config --train_dir=data/sim_training_data/sim_data_capture

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/ssd_mobilenet-traffic-udacity_sim.config --trained_checkpoint_prefix=data/sim_training_data/sim_data_capture/model.ckpt-5000 --output_directory=frozen_models/frozen_sim_mobile/

For Real Data

Training

python object_detection/train.py --pipeline_config_path=config/ssd_mobilenet-traffic_udacity_real.config --train_dir=data/real_training_data

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/ssd_mobilenet-traffic_udacity_real.config --trained_checkpoint_prefix=data/real_training_data/model.ckpt-10000 --output_directory=frozen_models/frozen_real_mobile/


Inference results can be viewed using the TrafficLightDetection-Inference.ipynb or .html files.

Camera Image and Model's Detections

alt-text alt-text

alt-text alt-text

alt-text alt-text

alt-text alt-text

alt-text alt-text

alt-text alt-text


Some useful links

trafficlight_detection-tensorflowapi's People

Contributors

vatsl avatar

Watchers

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