Traffic light detection and classification for self-driving car
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fazıl Altınel 2d46792bc6
Add files via upload
6 years ago
LICENSE Initial commit 6 years ago
detectRecognizeLight.py Add files via upload 6 years ago
readme.md Add files via upload 6 years ago

readme.md

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