/traffic-light-classifier

A simple network to classifier the states of the traffic lights.

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

Traffic light classifer

Objective

Use a nerual network to predict the state of a traffic lights, e.g. "red", "yellow", "green", "off"

1. Current accuracy:

94.2% at Bosch dataset, Udacity simular and udacity car dataset.

The state definition of the traffic lights are as follow:
Traffic light state red yellow green off
Index 1 2 3 4

2. How to run the code

python main.py

3. How to run with one example

alt text

Use the code in the main.py

    file_path = './data/green.jpg'
    predicted_state = test_an_image(file_path, model=load_model('model.h5'))

Predicted state of the traffic light:

green

4. Network Architecture

A very simple network is used here:

alt text