Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moodstocks/gtsrb.torch
Traffic sign recognition with Torch
https://github.com/moodstocks/gtsrb.torch
Last synced: about 2 months ago
JSON representation
Traffic sign recognition with Torch
- Host: GitHub
- URL: https://github.com/moodstocks/gtsrb.torch
- Owner: Moodstocks
- License: mit
- Created: 2015-08-21T16:49:35.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-24T07:55:56.000Z (over 8 years ago)
- Last Synced: 2024-05-20T21:24:56.326Z (4 months ago)
- Language: Lua
- Homepage: http://torch.ch/blog/2015/09/07/spatial_transformers.html
- Size: 1.29 MB
- Stars: 173
- Watchers: 19
- Forks: 61
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neat-rnn - [Spatial Transformer Layer
README
## gtsrb.torch
This repo illustrates how to use [Torch](http://torch.ch/) to train a
convolutional neural network on the [GTSRB](http://benchmark.ini.rub.de/?section=gtsrb&subsection=news)
dataset (German Traffic Sign Recognition Benchmark) and how to improve the
state-of-the-art with a [Spatial Transformer](http://arxiv.org/abs/1506.02025) layer.### Requirements
* install Torch (see [this guide](http://torch.ch/docs/getting-started.html))
* (optional) install the [Spatial Transformer](https://github.com/qassemoquab/stnbhwd)
module:```bash
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:
```bash
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](http://people.idsia.ch/~juergen/nn2012traffic.pdf) | **99.46** |
| single idsia-like network (3) | 98.85 |
| human performances ([corresponding paper](http://image.diku.dk/igel/paper/MvCBMLAfTSR.pdf)) | 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:
* `gtsrb.dataset` the [data loader](docs/dataset.md).
* `gtsrb.networks` the [network builder](docs/networks.md).
* `gtsrb.trainer` the [trainer](docs/trainer.md).#### Benchmark module and scripts
To be able to test as much configurations as possible, we use some automatic
benchmarking scripts.See [here](docs/bench.md) 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.