A Flask web application that uses YOLOv8 to recognize and classify traffic signs in real-time using your computer's camera. The application includes user authentication, a collection system to track discovered signs, and a web interface for easy interaction.
- 🔐 User Authentication: Secure login and registration system
- 📷 Real-time Camera Recognition: Live traffic sign detection using your webcam
- 🎯 YOLOv8 Integration: Advanced object detection and classification
- 📊 Collection System: Track and display discovered traffic signs
- 🌐 Web Interface: User-friendly Flask web application
- 📱 Responsive Design: Works on desktop and mobile devices
Add screenshots of your application here
Before running this application, make sure you have:
- Python 3.7 or higher
- A webcam for real-time recognition
- Git (for cloning the repository)
-
Clone the repository
git clone https://github.com/yesminehe/traffic-signs-recognition.git cd traffic-signs-recognition -
Create a virtual environment
python -m venv .venv
-
Activate the virtual environment
Windows:
.venv\Scripts\activate
macOS/Linux:
source .venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Download the YOLO model
You'll need to obtain the
best.ptmodel file. This should be placed in the root directory of the project.
-
Start the application
python app.py
-
Open your web browser Navigate to
http://localhost:5000 -
Create an account or login
- Register a new account or use existing credentials
- The system will redirect you to the main dashboard
-
Use the camera recognition
- Click on the camera section to start real-time recognition
- Point your camera at traffic signs to detect and classify them
- Discovered signs are automatically added to your collection
-
View your collection
- Check the collection page to see all discovered traffic signs
- Track your progress in finding different types of signs
traffic-signs-recognition/
├── app.py # Main Flask application
├── models.py # User authentication models
├── requirements.txt # Python dependencies
├── class_descriptions.json # Traffic sign class descriptions
├── best.pt # YOLOv8 trained model (not included)
├── templates/ # HTML templates
│ ├── index.html
│ ├── login.html
│ ├── signup.html
│ └── ...
├── static/ # Static files (CSS, JS, images)
│ ├── css/
│ ├── js/
│ └── uploads/
└── README.md
You can set the following environment variables:
SECRET_KEY: Flask secret key for session managementDEBUG: Set toTruefor development mode
The application uses a YOLOv8 model trained on traffic sign datasets. The model file (best.pt) should be placed in the root directory.
GET /- Main dashboard (requires authentication)GET /login- Login pagePOST /login- Login form submissionGET /signup- Registration pagePOST /signup- Registration form submissionGET /logout- Logout userGET /camera- Camera recognition pagePOST /start_camera- Start camera streamPOST /stop_camera- Stop camera streamGET /video_feed