Skip to content

Module for detecting traffic lights in the CARLA autonomous driving simulator. Based on the YOLO v2 deep learning object detection model and implemented in keras, using the tensorflow backend.

Notifications You must be signed in to change notification settings

affinis-lab/traffic-light-detection-module

Repository files navigation

traffic-light-detection-module

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

IMPORTANT UPDATE

This repo is deprecated. For a newer and improved model, implemented in PyTorch, please refer to this repo.

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

out(2).png

About

Module for detecting traffic lights in the CARLA autonomous driving simulator (version: 0.8.4).
Built upon and inspired by https://github.com/experiencor/keras-yolo2.
Instructions and more traffic light detection examples can be found below.

  • This module is used along several other modules to implement our version of imitation learning in the CARLA simulator. Results of the core module can be found on this repository

  • Model for objection detection is based on tiny yolov2

  • Training started with yolov2 coco pretrained weights

  • It was first trained on the LISA traffic light detection dataset (~5800 images), and after that on the dataset collected from the CARLA simulator by myself (~1800 images).

CARLA dataset and model

  • Dataset collected by myself in the CARLA simulator can be found here, annotations can be found here.

  • Important note - several images in the dataset are left out of annotations because bounding boxes are too small (too far away). I also filtered (left out) all images that have xmax < 15 when loading the dataset. There is around 70-80 out of ~1800 images that are left out, so it isn't that problematic.

  • Pretrained model can be found here.

Instructions

  • To train:

    • In the config file set training -> enabled to true
    • Put your annotations file in the dataset folder
    • In the config file set training -> annot_file_name to the name of your annotations file
    • Put your images in the dataset/images folder
    • If necessary, adjust parameters in config according to your problem/dataset
    • run main.py with -c config.json
  • To evaluate:

    • In the config file set training -> enabled to false
    • Put your annotations file in the evaluation folder
    • In the config file set training -> annot_file_name to to the name of your annotations file containing images for evaluation
    • Put your images in the evaluation/images folder
    • If necessary, adjust parameters in config according to your problem/dataset
    • run main.py with -c config.json
  • To generate anchors:

    • run generate_anchors.py with -c config.json
  • Soon to be added:

    • Real time traffic light detecting gifs

Examples

  • Several examples of predictions, more can be found in the out folder

out(11).png out(12).png out(6).png out(7).png out(14).png out(15).png out(4).png

About

Module for detecting traffic lights in the CARLA autonomous driving simulator. Based on the YOLO v2 deep learning object detection model and implemented in keras, using the tensorflow backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages