Traffic sign recognition with Torch
Lua
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
resources
LICENSE
NOTICES
Optim.lua
README.md
baseline.lua add support for validation set Sep 10, 2015
baseline.md
baseline_st.lua
baseline_st.md
baseline_st_val.md
bench_utils.lua
dataset.lua
gtsrb.lua
idsia_net.lua
main.lua
networks.lua
plot.lua
trainer.lua
use_cudnn.lua

README.md

gtsrb.torch

This repo illustrates how to use Torch to train a convolutional neural network on the GTSRB dataset (German Traffic Sign Recognition Benchmark) and how to improve the state-of-the-art with a Spatial Transformer layer.

Requirements

git clone https://github.com/qassemoquab/stnbhwd.git
cd stnbhwd && luarocks make stnbhwd-scm-1.rockspec

CUDA is not mandatory unless you use the Spatial Transformer (see below).

Usage

To train a network with all default options:

luajit main.lua

Use luajit main.lua --help to see all the available options.

In particular use the --no_cuda option to work in CPU mode.

Results

Method Accuracy
two spatial transformers with idsia-like network (1) 99.67
single spatial transformer with idsia-like network (2) 99.46
winner of original contest: idsia network 99.46
single idsia-like network (3) 98.85
human performances (corresponding paper) 98.84

(1) luajit main.lua -n -1 --st --net idsia_net.lua --cnn 150,200,300,350 --locnet 200,300,200 --locnet3 150,150,150 -e 26

(2) luajit main.lua -n -1 --net idsia_net.lua --cnn 200,250,350,400 --st --locnet 200,300,200

(3) luajit main.lua -n -1 --net idsia_net.lua --cnn 150,200,300,350

Code description

gtsrb module

The gtsrb module is a wrapper around all other modules.

It contains:

Benchmark module and scripts

To be able to test as much configurations as possible, we use some automatic benchmarking scripts.

See here for details.

Plotting script

This script allows to have an idea of the visual impact of the spatial transformer when it is placed at the input of the network.

Use qlua plot.lua --help to see the available options.

This script is meant to be used with networks generated by the main.lua script.