Skip to content

Traffic Lights Detection and Classification

James Dunn edited this page Oct 26, 2017 · 16 revisions

Data Augmentation

https://medium.com/@vivek.yadav/dealing-with-unbalanced-data-generating-additional-data-by-jittering-the-original-image-7497fe2119c3

https://codebox.net/pages/image-augmentation-with-python


Datasets

Bosch Small Traffic Lights Dataset

https://hci.iwr.uni-heidelberg.de/node/6132
https://github.com/bosch-ros-pkg/bstld
This dataset contains 13427 camera images at a resolution of 1280x720 pixels and contains about 24000 annotated traffic lights. The annotations include bounding boxes of traffic lights as well as the current state (active light) of each traffic light.

Dataset description

The camera images are provided as raw 12bit HDR images taken with a red-clear-clear-blue filter and as reconstructed 8-bit RGB color images. The RGB images are provided for debugging and can also be used for training. However, the RGB conversion process has some drawbacks. Some of the converted images may contain artifacts and the color distribution may seem unusual.

Dataset specifications

Training set:

  • 5093 images
  • Annotated about every 2 seconds
  • 10756 annotated traffic lights
  • Median traffic lights width: ~8.6 pixels
  • 15 different labels
  • 170 lights are partially occluded

Test set:

  • 8334 consecutive images
  • Annotated at about 15 fps
  • 13486 annotated traffic lights
  • Median traffic light width: 8.5 pixels
  • 4 labels (red, yellow, green, off)
  • 2088 lights are partially occluded

level5-engineers Traffic Lights Datasets

Captured (from the up-facing dash-cam in the simulator

Small Dataset

https://www.dropbox.com/s/gp7vtdk8tjo65kc/TLdataset01.zip?dl=0

  • 775 frames at the first two traffic lights.
  • Zipped it is 252MB.
  • Dimensions of each image: 800x600
  • Format: PNG for high quality
  • Notes: You'll find three folders from different sessions and within those are folders labeled red, yellow, and green. Also included is a reference frame to demonstrate what we see in the simulator versus what the dash-cam is seeing (looking up from a different perspective at the same moment). There is one partial frame from the test site to demonstrate the difference in image quality.

Larger Dataset

https://www.dropbox.com/s/87xark39qyer8df/TLdataset02.zip?dl=0

  • 4499 images classified in 4 folders (red: 1733, yellow: 253, green: 645, unknown: 1868)
  • Zipped it is 197MB.
  • Format: PNG for high quality
  • Dimensions of each image: 224x224
  • Acquired through 10 simulator track circuits (8 forward, 2 counter)
  • Includes long-range (>62m)
  • Includes unknowns (no traffic light)
  • Includes mis-predictions from training using the smaller dataset

Additional dataset with 423 yellow light samples (all within 75m): https://www.dropbox.com/s/7ld9h9vt9ctluib/TLdataset03.zip?dl=0

  • Zipped 17MB

Additional dataset https://www.dropbox.com/s/dboj3lt4sa3ecj4/TLdataset04.zip?dl=0

  • Zipped 26MB
  • 622 images classified in 3 folders (red: 329, yellow: 36, green: 257)
  • Includes mis-predictions from training on prior datasets

Project remarks

  • the simulator only changes the state of the traffic light, which is coming up next (all the other traffic lights stay in status Red)

Reference works

Google TF Object Detection API

https://github.com/tensorflow/models/tree/master/research/object_detection

Building a Real-Time Object Recognition App with Tensorflow and OpenCV

https://medium.com/towards-data-science/building-a-real-time-object-recognition-app-with-tensorflow-and-opencv-b7a2b4ebdc32

Self-Driving Cars: Implementing Real-Time Traffic Light Detection and Classification in 2017

https://medium.com/@anthony_sarkis/self-driving-cars-implementing-real-time-traffic-light-detection-and-classification-in-2017-7d9ae8df1c58

Recognizing Traffic Lights With Deep Learning

https://medium.freecodecamp.org/recognizing-traffic-lights-with-deep-learning-23dae23287cc
https://github.com/davidbrai/deep-learning-traffic-lights

Traffic Light Mapping and Detection paper by Google

https://static.googleusercontent.com/media/research.google.com/ru//pubs/archive/37259.pdf

Additional references

https://carnd.slack.com/archives/C6NVDVAQ3/p1505631493000037
https://www.youtube.com/watch?v=ZPzHfzaCYDQ
https://www.isprs-ann-photogramm-remote-sens-spatial-inf-sci.net/III-1/191/2016/isprs-annals-III-1-191-2016.pdf