A modular smart traffic light system leveraging computer vision and IoT protocols to automate traffic management and violation detection.
.
├── backend/ # Backend API
├── docs/ # MQTT protocol documentation
├── traffic_light/ # Traffic light control runloop
├── traffic_light_web/ # Vue.js frontend interface
└── violation_detection/ # Dockerfile for license plate OCR and service for red light violation detection
- backend/: Contains the backend server (API) and frontend web application for system management and monitoring.
- docs/: Documentation for MQTT protocols used for communication between system components.
- traffic_light/: Implements the main runloop logic for controlling the traffic lights.
- violation_detection/: Contains code and Docker setup for running YOLO-based vehicle detection and license plate OCR to identify red light violations.
- Docker (for violation detection)
- Python 3.8+
- Node.js (for frontend, if applicable)
-
Clone the repository:
git clone https://github.com/yourusername/MiniSmartTraffic.git cd MiniSmartTraffic -
Start the backend and frontend:
cd backend # Follow backend/README.md for setup instructions
cd ../traffic_light_web npm run serve -
Run the traffic light control:
cd ../traffic_light python main.py -
Start violation detection:
Build the docker image using the Dockerfile in
violation_detectionand spin up an container on a x86_64 machine using the built image exposing5000to the host as the numberplate recognition API.cd ../violation_detection uv run main.py -
Refer to
docs/for MQTT protocol details.
This project is licensed under the MIT License. See LICENSE for details.