A deep learning project using Keras to detect traffic signs, specifically focusing on stop signs and traffic lights.
- Real-time traffic sign detection
- Modern GUI interface
- Support for stop signs, traffic lights, and other traffic signs
- High accuracy predictions
- Easy-to-use interface
src/: Source code for the projecttrain.py: Script for training the modelpredict.py: Script for making predictionsgui.py: Modern GUI applicationutils.py: Utility functions
model/: Directory for storing the trained modeldata/: Directory for storing the datasettrain/: Training datatest/: Test data
requirements.txt: List of Python dependenciesREADME.md: Project documentation
- Python 3.8 or higher
- pip package manager
- Virtual environment (recommended)
- Clone the repository:
git clone https://github.com/byrongomezjr/traffic_sign_detection.git
cd traffic_sign_detection- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the required dependencies:
pip install -r requirements.txtThis project uses the GTSRB - German Traffic Sign Recognition Benchmark dataset.
-
Download the dataset:
- Visit GTSRB Dataset on Kaggle
- Download
archive.zip
-
Prepare the dataset:
- Create a
temp_datadirectory in the project root - Place the downloaded
archive.zipintemp_data/ - Run:
python organize_dataset.py
- Create a
- Train the model:
python src/train.py- Make predictions using the GUI:
python src/gui.py- The model is trained specifically on three classes:
- Stop signs
- Traffic lights
- Other traffic signs
- Achieves high accuracy on test data
- Fast prediction times
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Byron Gomez Jr.

