Skip to content

AashishH15/US-Traffic-Sign-Classification

Repository files navigation

US Traffic Sign Classification

This project is a complete machine learning pipeline for classifying US Traffic Signs from the LISA dataset using deep neural network embeddings and traditional/custom classifiers.

Dataset:

LISAC Traffic Sign Classification Dataset

Overview

Processes raw images, extracts high-level semantic features using MobileNetV2, reduces dimensionality using PCA and MDA, and evaluates multiple classifiers and Bayesian classifiers (Parametric and Non-Parametric).

Requirements & Setup

  1. Clone the repository and navigate into the project directory.
  2. Create and activate a virtual environment.
  3. Install the required dependencies:
pip install -r requirements.txt

How to run

python run_pipeline.py

This script will run:

  1. preprocess.py: Splits the raw dataset into Train/Valid/Test.
  2. extract_features.py: Extracts 1280-dimensional features using MobileNetV2.
  3. PCA_dim_reduction.py & MDA_dim_reduction.py: Reduces dimensions using PCA and MDA.
  4. train.py: Trains SVM, Random Forest, k-NN, and Bayesian Classifiers.
  5. evaluate.py: Generates confusion matrices, reports, and error.
  6. repeated_experiments.py: Evaluates variance and stability of classifiers via multiple data splits.

Summary of Results

Average test set accuracy and stability metrics achieved across 5 randomized training splits:

PCA (50 Dimensions)

Classifier Mean Accuracy Variance Std Dev Mean Time (s)
SVM 91.61% 0.000027 0.0052 0.1172
k-NN 92.34% 0.000027 0.0052 0.2569
Bayesian Non-Parametric 92.34% 0.000027 0.0052 0.0754
Bayesian Parametric 90.66% 0.000009 0.0029 0.0055
Random Forest 86.57% 0.000167 0.0129 0.5972

MDA (c-1 Dimensions)

Classifier Mean Accuracy Variance Std Dev Mean Time (s)
k-NN 91.02% 0.000030 0.0055 0.0068
Bayesian Non-Parametric 90.58% 0.000061 0.0078 0.0224
SVM 90.36% 0.000056 0.0075 0.0221
Bayesian Parametric 89.12% 0.000061 0.0078 0.0014
Random Forest 82.55% 0.000556 0.0236 0.0990

Sample images per classes:

alt text


Aashish Harishchandre

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors