From 2d46792bc670d65676581e9d7b2acfb9e4f0359e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Faz=C4=B1l=20Alt=C4=B1nel?= Date: Fri, 7 Dec 2018 01:01:18 +0900 Subject: [PATCH] Add files via upload --- readme.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..ae74a8a --- /dev/null +++ b/readme.md @@ -0,0 +1,44 @@ + +# Self-Driving Car Traffic Light Detection and Classification + +## Overview +This repository contains TensorFlow implementation of traffic light detection and classification task of images taken using a self-driving car. + +### Method +In order to detect traffic lights, a pre-trained model called Single Shot Multibox Detector (SSD) with Inception v2 from the TensorFlow Zoo on MS-COCO dataset is used. The object detector is lightweight. However, the detection accuracy is not high under some conditions such as occlusion. More complex object detectors can perform better. + +After the traffic light is detected in an image, a simple method is exploited to classify the color of the traffic light. To classify the color of the traffic light, brightness feature that uses HSV color space is employed. This method cannot achieve very accurate results. However, it is a fast method for real-time inference. For better accuracy, a deep learning based method could be used. + +An output video is generated after detection and classification. Find the output video under `out/` directory. + +### Dataset +The dataset is taken from https://github.com/udacity/self-driving-car/tree/master/annotations#dataset-2. + +## Files +``` +model/ - Model files folder +object-dataset/ - Dataset images folder +out/ - Result folder +detectRecognize.py - Loads the model file and detect and recognize traffic light(s) for given input image(s). +``` + +## Dependencies +Tests are performed with following version of libraries: + ++ Python 3.5 ++ Numpy 1.15.2 ++ TensorFlow 1.5.0 ++ OpenCV-Python ++ Pillow + +Ubuntu 14.04 LTS is used for the tests. + +## Running ++ Download Udacity Annotated Driving Dataset: [http://bit.ly/udacity-annotations-autti](http://bit.ly/udacity-annotations-autti). ++ Extract the file. ++ Download the model file trained on COCO dataset: http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_2017_11_17.tar.gz. Extract and locate the files under `model/`. ++ Run the command below for all testing set of Udacity Annotated Driving Dataset: + ``` + $ python detectRecognizeLight.py + ``` ++ Result video will be located under `out/` directory.