π¦ Traffic Sign Recognition using Deep Learning (CNN)
This project implements a Traffic Sign Recognition System using Convolutional Neural Networks (CNNs) and Computer Vision techniques. It is capable of classifying traffic signs from images and also supports real-time recognition using a webcam.
The project demonstrates a complete deep learning workflow: dataset handling β model training β evaluation β real-time inference.
π Features
Image classification using CNN (TensorFlow / Keras) Preprocessing and normalization of input images Performance evaluation using accuracy and confusion matrix Real-time traffic sign recognition via webcam Confidence thresholding and temporal smoothing for stable predictions
π Tech Stack
Python TensorFlow / Keras OpenCV NumPy Matplotlib / Seaborn
π Project Structure
TrafficSignRecognition/ β βββ dataset/ β βββ README.md # Dataset instructions (full dataset not included) β βββ Traffic_sign_Reco.py # Model training and evaluation βββ webcam_predict.py # Real-time webcam prediction βββ check_structure.py # Dataset structure validation βββ requirements.txt # Project dependencies βββ .gitignore βββ README.md
π Dataset
This project uses a custom traffic sign image dataset.
Expected Dataset Structure dataset/ βββ raw_images/ βββ Stop/ βββ Speed_Limit_50/ βββ Yield/
π How to Run the Project
1οΈβ£ Install Dependencies pip install -r requirements.txt
2οΈβ£ Train the Model python Traffic_sign_Reco.py
This will: Train the CNN model Save the trained model as final_traffic_sign_model.h5
3οΈβ£ Real-Time Traffic Sign Recognition (Webcam) python webcam_predict.py
Controls inside webcam window: q β Quit s β Save current frame r β Reset predictions t β Toggle confidence threshold d β Debug information
π Results
High classification accuracy on validation data Stable predictions using confidence thresholding Smooth real-time recognition using temporal averaging (Sample result images and confusion matrix can be added in a results/ folder.)
π― Learning Outcomes
Practical implementation of CNNs for image classification Dataset preprocessing and augmentation techniques Model evaluation and performance visualization Real-time deployment of deep learning models using OpenCV
π Future Improvements
Data augmentation for better generalization Transfer learning with pretrained models (ResNet, MobileNet) Deployment as a web or mobile application