Skip to content

lsc-1/CarND-Capstone-TrafficLightDetection-1

 
 

Repository files navigation

Traffic Light Detection Project

Environment preparing

  1. pip install tensorflow-gpu=1.4.0

  2. sudo apt-get install protobuf-compiler
    sudo pip install pillow
    sudo pip install lxml
    sudo pip install jupyter
    sudo pip install matplotlib
    
  3. export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim

  4. Go to root directory, get https://github.com/tensorflow/models/tree/master/research/object_detection as object_detection

Training datasets preparing

  1. Get labeled imgs datasets from Vatsal Srivastava and unzip to data/real_training_data, data/sim_training_data.

  2. Get pretrained faster rcnn resnet101 model pretrained ssd v1 modeland unzip to data/

  3. The training config file is data/config/faster_rcnn_resnet101_udacitycapstonejunior.config

  4. Build tf record file

    python data_conversion_udacity_sim.py --output_path data/sim_data.record
    python data_conversion_udacity_real.py --output_path data/real_data.record
    mkdir model_frozen_sim
    mkdir model_frozen_real
    

Detect model finetune

ssd model finetune

Train: python object_detection/train.py --pipeline_config_path=data/config/ssd_mobilenet_v1_coco_sim.config --train_dir=data/sim_training_data/ssd_model

Export:

python object_detection/export_inference_graph.py --pipeline_config_path=data/config/ssd_mobilenet_v1_coco_sim.config --trained_checkpoint_prefix=data/sim_training_data/ssd_model/model.ckpt-26529 --output_directory=model_frozen_sim/ssd/ --input_type image_tensor

frcnn model finetune

Train:

python object_detection/train.py --pipeline_config_path=data/config/faster_rcnn_resnet101_udacitycapstonejunior.config --train_dir=data/sim_training_data/frcnn_model

Export:

python object_detection/export_inference_graph.py --pipeline_config_path=data/config/faster_rcnn_resnet101_udacitycapstonejunior.config --trained_checkpoint_prefix=data/sim_training_data/frcnn_model/model.ckpt-4379 --output_directory=model_frozen_sim/frcnn/ --input_type image_tensor

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.2%
  • Jupyter Notebook 5.9%
  • Shell 3.9%