A deep learning-based Traffic Sign Detection and Classification System built using Python, TensorFlow, Keras, and Convolutional Neural Networks (CNN). The system can identify and classify traffic signs from uploaded images and provides a simple GUI for easy interaction.
Traffic signs play an important role in road safety and intelligent transportation systems. This project uses a Convolutional Neural Network (CNN) to automatically recognize traffic signs from images.
The model is trained to classify 43 different traffic sign categories. A Tkinter-based GUI is also provided where users can upload an image and get the predicted traffic sign.
- Classification of 43 traffic sign categories
- CNN-based deep learning model
- Image upload functionality
- Simple graphical user interface using Tkinter
- Fast traffic sign prediction
- Training and validation accuracy visualization
- Pre-trained model included
- Jupyter notebooks for training and GUI implementation
- Python
- TensorFlow
- Keras
- NumPy
- Pandas
- OpenCV / PIL
- Matplotlib
- Scikit-learn
- Tkinter
- Jupyter Notebook
The project uses a Convolutional Neural Network (CNN) for image classification.
The CNN consists of:
- Convolutional layers
- ReLU activation functions
- Max Pooling layers
- Dropout layers
- Flatten layer
- Fully Connected Dense layer
- Softmax output layer
The input images are resized to 30 Γ 30 pixels with 3 RGB channels.
The final layer contains 43 output classes, representing the different traffic sign categories.
- Input Size: 30 Γ 30 Γ 3
- Number of Classes: 43
- Optimizer: Adam
- Loss Function: Categorical Cross-Entropy
- Batch Size: 32
- Epochs: 15
- Activation: ReLU and Softmax
- Train/Test Split: 80/20
The model can recognize traffic signs such as:
- Speed Limit signs
- No Passing
- Right-of-Way
- Priority Road
- Yield
- Stop
- No Entry
- General Caution
- Dangerous Curve
- Road Work
- Traffic Signals
- Pedestrian Crossing
- Children Crossing
- Bicycle Crossing
- Slippery Road
- Keep Left / Keep Right
- Roundabout Mandatory
- End of Speed Limit
- And many more
Traffic_Sign_Detection_System/
β
βββ data/
β βββ dictionary.sqlite
β
βββ GUI.ipynb
βββ traffic_signs.ipynb
β
βββ Train.csv
βββ Test.csv
βββ Meta.csv
β
βββ traffic_classifier.h5
βββ traffic_classifier.keras
βββ my_model.h5
β
βββ README.md
git clone https://github.com/your-username/Traffic_Sign_Detection_System.gitcd Traffic_Sign_Detection_Systempip install tensorflow keras numpy pandas pillow matplotlib scikit-learn opencv-python jupyterOpen the GUI notebook:
jupyter notebook GUI.ipynbRun all the cells and use the GUI to upload a traffic sign image.
The system will:
- Open the image upload dialog.
- Load the selected traffic sign image.
- Resize the image to 30 Γ 30 pixels.
- Pass the image to the trained CNN model.
- Predict the traffic sign class.
- Display the predicted traffic sign.
To train the model from scratch, open:
jupyter notebook traffic_signs.ipynbThe notebook loads the training data, preprocesses the images, creates the CNN model, trains it for 15 epochs, evaluates the model, and saves the trained model.
The training notebook performs the following steps:
Dataset
β
Image Loading
β
Image Resizing (30 Γ 30)
β
Data Preprocessing
β
Train/Test Split
β
One-Hot Encoding
β
CNN Model Creation
β
Model Training
β
Model Evaluation
β
Trained Model
Upload Traffic Sign Image
β
Preprocessing
β
CNN Model Prediction
β
Predicted Class
β
Display Traffic Sign Name
The following screenshots demonstrate the model training process, performance visualization, and the final traffic sign classification GUI.
Jupyter Notebook output showing the CNN model training across multiple epochs with training and validation loss and accuracy metrics.
Accuracy curve comparing the model's training accuracy with validation accuracy across the training epochs.
Loss curve showing the change in training and validation loss during CNN model training.
GUI prediction example where the trained CNN correctly identifies the uploaded traffic sign as Yield.
GUI prediction example demonstrating recognition of a Road Work warning sign from the uploaded image.
GUI prediction example where the system identifies the uploaded sign as Speed Limit (30 km/h).
This project can be used as a foundation for:
- Advanced Driver Assistance Systems (ADAS)
- Autonomous vehicles
- Intelligent transportation systems
- Road safety applications
- Computer vision projects
- AI-based traffic monitoring systems
- Machine learning and deep learning education
Possible improvements include:
- Real-time traffic sign detection using a webcam
- Object detection instead of image classification
- Integration with OpenCV
- Deployment as a web application
- Mobile application integration
- Improved CNN architecture
- Data augmentation for better generalization
- Real-time video traffic sign recognition
- Deployment using TensorFlow Lite
The project uses a traffic sign dataset containing multiple categories of road signs. The dataset is divided into training and testing information and contains images representing 43 traffic sign classes
Contributions are welcome!
If you would like to improve this project:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Commit your changes.
- Push the branch.
- Create a Pull Request.
Add your GitHub repository link here:
https://github.com/your-username/Traffic_Sign_Detection_System
This project is intended for educational and research purposes. You may modify and extend it according to your requirements.





