A complete, production-ready, end-to-end AI-powered Traffic Sign Recognition System (TSRS) utilizing MobileNetV2 for high-speed, accurate classification. Features a stunning Cyberpunk-industrial dark mode UI, real-time webcam streaming, video analysis, and multi-lingual voice alerts (English & Hindi).
- ποΈ Ultra-Fast Inference: < 50ms per frame detection.
- πΈ Multi-Source Support: Images, Video Files, and Live Webcam.
- π Voice Synthesis: Automatic TTS alerts in English and Hindi.
- π Neural Analytics: Real-time stats, detection trends, and distribution charts.
- π Night Mode: AI-enhanced visibility for low-light conditions.
- π‘οΈ Admin Core: Secure panel for history management and system logs.
- π³ Docker Ready: Full containerization for instant deployment.
| Component | Technology |
|---|---|
| Backend | Python / Flask / SQLAlchemy |
| Deep Learning | TensorFlow / Keras (MobileNetV2) |
| Computer Vision | OpenCV / NumPy |
| Frontend | Vanilla JS / CSS3 (Industrial Dark Mode) |
| Database | SQLite (Default) / PostgreSQL Compatible |
| Voice | gTTS / pyttsx3 (Offline Fallback) |
# Create virtual environment
python -m venv venv
# Activate virtual environment
.\venv\Scripts\Activate.ps1
# Install dependencies (with timeout for slow connections)
pip install --default-timeout=1000 -r requirements.txt# Auto-download GTSRB dataset and begin training
python train.py# Start the web server
python app.pyVisit http://localhost:5000 in your browser.
Deploy instantly using Docker Compose:
docker-compose up --build- Architecture: MobileNetV2 with custom GlobalAveragePooling2D head.
- Classes: 43 (GTSRB Standard).
- Image Size: 64x64 pixels.
- Optimization: Adam optimizer, EarlyStopping, ReduceLROnPlateau.
- Accuracy Goal: 95%+ on GTSRB test set.
TrafficSignAI/
βββ dataset/ # GTSRB Data
βββ models/ # Trained .h5 weights
βββ static/ # Assets (CSS, JS, Audio)
βββ templates/ # Jinja2 HTML Templates
βββ utils/ # Preprocessing, DB, Voice logic
βββ app.py # Main Flask Entry
βββ train.py # Training Pipeline
βββ detect.py # Inference Engine
| Endpoint | Method | Description |
|---|---|---|
/api/detect/image |
POST |
Upload image for analysis |
/api/detect/video |
POST |
Start background video processing |
/api/webcam/stream |
GET |
MJPEG real-time detection stream |
/api/analytics/data |
GET |
Fetch system stats JSON |
/api/admin/logs |
GET |
Paginated system logs |
This project is licensed under the MIT License - see the LICENSE file for details.
Built with π for Autonomous Infrastructure.