An AI-powered traffic incident management platform that predicts incident severity, estimates resolution time, identifies traffic hotspots, and recommends optimal resource deployment for smarter traffic operations.
TrafficVision Pro leverages Machine Learning, Geospatial Analytics, and Interactive Dashboards to help traffic authorities respond faster and make data-driven decisions.
The system analyzes historical traffic incident data to:
- Predict incident severity
- Estimate clearance time
- Detect traffic hotspots
- Calculate traffic impact scores
- Recommend deployment of personnel and resources
- Visualize traffic patterns through an interactive dashboard
Urban traffic management faces several challenges:
- Increasing road accidents and vehicle breakdowns
- Delayed emergency response
- Inefficient resource allocation
- Lack of predictive decision support
- Difficulty identifying recurring congestion hotspots
These issues lead to:
- Traffic congestion
- Increased travel time
- Economic losses
- Reduced public safety
Predicts incident severity levels:
- Low
- Medium
- High
- Critical
using historical traffic incident patterns.
Predicts the expected time required to clear an incident and restore normal traffic flow.
Calculates a traffic impact score based on:
- Predicted severity
- Estimated clearance time
- Road closure requirements
Impact Score Range: 0 - 100
Automatically recommends:
- Traffic officers
- Barricades
- Tow trucks
- Operational instructions
to support rapid incident response.
Uses DBSCAN clustering to identify:
- Accident-prone zones
- Congestion hotspots
- High-risk locations
through geographic analysis.
Provides:
- Incident volume trends
- Event cause analysis
- Severity distribution
- Feature importance analysis
- Geographic hotspot visualization
Traffic Incident Dataset
│
▼
Data Processing
│
▼
Feature Engineering
│
┌─────────┴─────────┐
│ │
▼ ▼
Severity Model Resolution Model
(CatBoost) (CatBoost)
│ │
└─────────┬─────────┘
▼
Recommendation Engine
│
▼
Hotspot Detection
(DBSCAN)
│
▼
Streamlit Dashboard
TrafficVision-Pro/
│
├── data/
│ ├── raw/
│ └── processed/
│
├── models/
│ ├── severity_model.cbm
│ └── resolution_model.cbm
│
├── reports/
│ ├── severity_importance.csv
│ ├── resolution_importance.csv
│ ├── top_hotspots.csv
│ └── data_summary.csv
│
├── src/
│ ├── data_processing.py
│ ├── train_model.py
│ ├── recommendation_engine.py
│ ├── hotspot_detection.py
│ └── utils.py
│
├── dashboard/
│ └── app.py
│
├── requirements.txt
│
└── README.md
| Metric | Value |
|---|---|
| Total Records | 2404 |
| Data Type | Traffic Incidents |
| Features | 40+ Attributes |
| Domain | Smart Traffic Management |
- Event Category
- Event Cause
- Priority Level
- Zone
- Junction
- Corridor
- Vehicle Type
- Latitude
- Longitude
- Resolution Time
- Road Closure Status
- Duplicate removal
- Missing value handling
- Date-time conversion
- Outlier removal
Generated Features:
- Hour of occurrence
- Day of week
- Month
- Peak-hour indicator
- Zone incident density
- Junction density
- Historical average resolution times
Algorithm: CatBoost Classifier
Output Classes:
- Low
- Medium
- High
- Critical
Algorithm: CatBoost Regressor
Output:
Estimated Resolution Time (minutes)
- Handles categorical features efficiently
- Minimal preprocessing required
- High performance on tabular datasets
- Strong predictive accuracy
The platform provides Feature Importance Analysis to explain prediction decisions.
Major Influencing Features:
- Event Cause
- Police Station
- Vehicle Type
- Zone
- Corridor
- Hour of Occurrence
Benefits:
- Transparent predictions
- Better decision support
- Increased trust in AI recommendations
DBSCAN (Density-Based Spatial Clustering)
Identify:
- High-density incident clusters
- Congestion-prone regions
- Persistent traffic hotspots
- Latitude
- Longitude
- Hotspot Clusters
- Incident Density
- Average Resolution Time
Displays:
- Total Events Analyzed
- Mean Resolution Time
- Active Response Zones
- Critical Hotspots
- Severity Breakdown
- System Status
Provides:
- Incident Volume by Hour
- Event Cause Distribution
- Temporal Trends
- Traffic Pattern Analysis
Allows users to enter:
- Event Category
- Priority Level
- Trigger Cause
- Affected Zone
- Occurrence Time
- Road Closure Requirement
Outputs:
- Severity Prediction
- Clearance Time Estimation
- Impact Score
- Resource Recommendation
Features:
- Interactive Heatmap
- Cluster Visualization
- Top Hotspots
- Geographic Analysis
- Python
- Pandas
- NumPy
- CatBoost
- Scikit-learn
- DBSCAN
- Plotly
- Matplotlib
- Folium
- Streamlit-Folium
- Streamlit
git clone https://github.com/your-username/TrafficVision-Pro.git
cd TrafficVision-Propython -m venv venvWindows:
venv\Scripts\activateLinux/Mac:
source venv/bin/activatepip install -r requirements.txtstreamlit run dashboard/app.pyOpen in browser:
http://localhost:8501
- Open AI Impact Predictor
- Enter incident details
- Generate prediction
- View:
- Predicted Severity
- Estimated Clearance Time
- Impact Score
- Resource Recommendations
- Explore hotspot regions using the map dashboard
✔ Improved incident response planning
✔ Faster traffic clearance
✔ Better resource utilization
✔ Data-driven traffic management
✔ Identification of high-risk zones
✔ Enhanced operational efficiency
- Real-time traffic API integration
- Weather-aware predictions
- CCTV-based accident detection
- Emergency vehicle routing
- Traffic signal optimization
- Mobile application support
- Live GPS tracking
- Smart City integration
Developed as part of an AI-driven Smart Traffic Management initiative.
This project is intended for academic, research, and demonstration purposes.
TrafficVision Pro is an AI-powered traffic management platform that predicts incident severity, estimates clearance time, identifies hotspots, and recommends optimal resource deployment for smarter and faster traffic operations.