Skip to content

rv2442/GTSRB_Mnist_Model

Repository files navigation

Model for GTSRB & MNIST

This is used for creating a model and predicting traffic signs, based on the GTSRB (German Traffic Sign Recognition Benchmark) Dataset.

Context

The German Traffic Sign Benchmark is a multi-class, single-image classification challenge held at the International Joint Conference on Neural Networks (IJCNN) 2011. We cordially invite researchers from relevant fields to participate: The competition is designed to allow for participation without special domain knowledge. Our benchmark has the following properties:

  1. Single-image, multi-class classification problem
  2. More than 40 classes
  3. More than 50,000 images in total
  4. Large, lifelike database

Training accuracy

Training

Validation and Test accuracy Evaluation

Validation and Test evaluation

Single Image Prediction

Sign_prediction

User Guide

Installing Dependencies

pip -r install requirements.txt

Once done create a folder inside named training_data and inside that create 2 folders train and val.
Update the paths in Source Code.

Dataset: GTSRB (German Traffic Sign Recognition Benchmark)

Preprocessing : First the data was divided with a split_size of 0.1 using split_data() and test set was ordered using Test.Csv from the dataset with order_test_set() located in my_utils.py

MODEL Architecture

CONVOLUTIONAL LAYER
MAXPOOL LAYER
BATCH NORMALIZATION LAYER CONVOLUTIONAL LAYER
MAXPOOL LAYER
BATCH NORMALIZATION LAYER
CONVOLUTIONAL LAYER
MAXPOOL LAYER
BATCH NORMALIZATION LAYER
FLATTEN LAYER
DENSE LAYER
DENSE LAYER

USER GUIDE

Training and Testing:
Run GTSRB.py, with TRAIN = True and TEST = True

Predicting Single Image:
Run my_predictor.py after updating the image path with the path of the image to be predicted.

Note in windows folders are numbered in the following sequence,

0,1,10,11,12,13,14,15,16,17,18,19,2,20,21,22,23,24,25,26,27,28,29,3,30,31,32,33,34 ...

If you want to run mnist_example.py, just execute the file. The dataset will be downloaded automatically when running for the first time.

QUICK UPDATE: We were able to train and classify traffic lights(customly added to dataset) and signs which are not there in the dataset