This repository contains a working prototype of an AI-based traffic signal recommendation system. The prototype analyzes traffic videos and provides signal timing suggestions using computer vision and machine learning.
The objective of this project is to demonstrate feasibility and system design, not production-scale deployment.
- Accepts a traffic video as input
- Detects and counts vehicles using a computer vision model
- Extracts traffic composition features
- Uses a supervised machine learning model to generate signal timing suggestions
- Displays results through a simple dashboard interface
- Traffic video (roadside camera footage)
- Road type (City Street, Highway, Residential)
- Vehicle counts (cars, motorcycles, buses, trucks)
- Traffic signal timing recommendation
- Vehicle detection is performed using a YOLOv8-based computer vision model
- Traffic frames are processed using OpenCV for video analysis and preprocessing
- Extracted traffic features are used as input to a trained XGBoost machine learning model to generate signal timing recommendations
- Hard-coded rule-based logic is intentionally avoided in the final prototype
- Vehicle speed is excluded, as it cannot be reliably inferred from a single uncalibrated camera
- Python
- YOLOv8 – Vehicle detection
- OpenCV – Video processing
- XGBoost – Supervised ML model for signal timing prediction
- Streamlit – Dashboard UI
- Implemented the computer vision pipeline for vehicle detection using YOLOv8
- Processed traffic video streams using OpenCV
- Extracted traffic features such as vehicle counts and traffic composition
- Trained and integrated the XGBoost model used for generating traffic signal timing recommendations
Install dependencies:
pip install -r requirements.txt
Run the Streamlit application:
python -m streamlit run ui_app.py
This project was developed collaboratively by:
- Kausthuv Narayan Medhi
- Swapnil Borgohain
- Dibakar Sarma