Giter Site home page Giter Site logo

carnd-capstone-trafficlightdetection's Introduction

Traffic Light Detection with Tensorflow Object Detection API

No Maintenance Intended

This repository was used to setup an environment to train/evaluate a pre-trained model to identify/classify traffic lights in pictures using tensorflow. It was part of my final project for the Udacity Self-Driving Car Engineer Nano Degree program.

Setup

Dependencies

sudo apt-get install protobuf-compiler
sudo pip install pillow
sudo pip install lxml
sudo pip install jupyter
sudo pip install matplotlib

Protobuf Compilation

# From root directory
protoc object_detection/protos/*.proto --python_out=.

Add Libraries to PYTHONPATH

# From root directory
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim

Download SSD MobileNet Model

# From root directory
curl http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_2017_11_17.tar.gz | tar -xv -C model/ --strip 1

Creating TFRecord files

python object_detection/dataset_tools/create_pascal_tf_record.py --data_dir=data/sim_training_data/sim_data_capture --output_path=sim_data.record
python object_detection/dataset_tools/create_pascal_tf_record.py --data_dir=data/real_training_data/real_data_capture --output_path=real_data.record

Training

For Simulator Data

Training

python object_detection/train.py --pipeline_config_path=config/ssd_mobilenet_v1_coco_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_v1_coco_sim.config --trained_checkpoint_prefix=data/sim_training_data/sim_data_capture/model.ckpt-6000 --output_directory=model_frozen_sim/

For Real Data

Training

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

Saving for Inference

python object_detection/export_inference_graph.py --pipeline_config_path=config/ssd_mobilenet_v1_coco_real.config --trained_checkpoint_prefix=data/real_training_data/real_data_capture/model.ckpt-25000 --output_directory=model_frozen_real/

Attributions

carnd-capstone-trafficlightdetection's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

carnd-capstone-trafficlightdetection's Issues

about Creating TFRecord files

When I use this command to create TFRecord, the sim_data.record is empty.
python object_detection/dataset_tools/create_pascal_tf_record.py --data_dir=data/sim_training_data/sim_data_capture --output_path=sim_data.record

I found there is some code in the "create_pascal_tf_record.py"
files = glob.glob(os.path.join(data_dir, "*.xml"))

So, it there some xml file missing in /data/sim_training_data/sim_data_capture/ ?

Thanks a lot

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.