This project implements a Traffic Sign Recognition system using the GTSRB (German Traffic Sign Recognition Benchmark) dataset.
It is part of the Self-Paced Elevvo Machine Learning Internship (Industry-Level Project).
The notebook compares two approaches for classifying traffic signs:
- Custom Convolutional Neural Network (CNN) – built from scratch.
- MobileNetV2 (Pretrained Model) – fine-tuned for traffic sign classification.
- Image preprocessing and normalization
- Data augmentation for better generalization
- Two model approaches:
- Custom CNN
- MobileNetV2 (transfer learning)
- Evaluation using accuracy, precision, recall, and F1-score
- Visual performance comparison between models
-
Dataset Loading and Analysis
- GTSRB dataset
- Images resized and normalized
-
Data Preprocessing & Augmentation
- Applied transformations (rotation, zoom, shifts)
-
Model Development
- Custom CNN with convolution, pooling, dropout, and dense layers
- MobileNetV2 pretrained on ImageNet and fine-tuned
-
Training & Validation
- Trained both models with early stopping and validation tracking
-
Evaluation
- Compared class-wise precision, recall, and F1-score
Install the dependencies with:
pip install tensorflow keras matplotlib seaborn scikit-learn opencv-pythonDataset: GTSRB - German Traffic Sign Recognition Benchmark
-
Clone this repository:
git clone https://github.com/yourusername/traffic-sign-recognition.git cd traffic-sign-recognition -
Open the notebook:
jupyter notebook traffic_sign_recognition.ipynb
-
Run all cells to train and evaluate both models.
- Tags: Deep Learning, CNN, Transfer Learning, MobileNetV2, Image Classification, Traffic Signs, Computer Vision, Internship Project
- File Types:
.ipynb(Jupyter Notebook), dataset images (.png)
The notebook outputs:
- Training vs Validation vs Test Accuracy & Loss plots
- Class-wise Precision, Recall, and F1-score plots
This shows how the pretrained model generalizes better
This plot compares the performance of the CNN and MobileNetV2 across different traffic sign classes.
- The Custom CNN performed well overall but showed weaknesses in some classes, especially rare or complex signs.
- The MobileNetV2 model consistently outperformed the custom CNN with higher accuracy, precision, recall, and F1-scores.
- This shows that transfer learning with pretrained models is more effective for real-world problems like traffic sign recognition.
- In practical applications such as autonomous driving, this higher accuracy can directly improve safety and reliability.