Computer vision · ADAS perception
German Traffic Sign Recognition
A compact CNN that classifies the 43 sign classes of the German Traffic Sign Recognition Benchmark. Built end to end with a data pipeline, augmentation, training, evaluation, single-image inference and a demo, and trained on a CPU.
- 97.7% test accuracy
- 676K parameters
- 43 sign classes
- 8 epochs on a CPU
Why this task
Traffic-sign recognition is a safety-critical piece of driver-assistance perception, and GTSRB is the standard German benchmark for it. I wanted to own the whole loop an ML engineer owns, not just call a pretrained model.
- 01 data.py Load + augment GTSRB, rotation and colour jitter
- 02 model.py Compact CNN 3 conv blocks, BatchNorm, Dropout
- 03 train.py Train Adam + step LR, best checkpoint
- 04 predict.py Inference Top-k for a single image
- 05 app.py Demo Upload a sign, see confidence
Model
Inputs are 32×32 RGB. There are three convolutional blocks (32→32, 64→64, then 128 channels), each with BatchNorm and ReLU, followed by a classifier head of 2048 → 256 → 43 with dropout of 0.4 and 0.3. That’s 675,659 parameters, small enough to train on a laptop CPU in 8 epochs.
What I’d do for production
97.7% on a clean test set is a starting point, not a safety case. Next would be a per-class confusion analysis (speed-limit signs are easily confused with each other), robustness tests under blur, glare and night conditions, and quantisation to check accuracy and latency on embedded hardware.