Accident Risk Navigator
Predicts road accident risk in real time and visualizes high-risk zones on interactive maps using machine learning.
A full-stack AI platform that predicts accident risk based on road conditions and weather, and visualizes high-risk zones on interactive maps.
Accident Risk Navigator is an intelligent road safety platform built to predict and visualize accident risks using machine learning, covering the full lifecycle from raw dataset processing and model training to a production-ready web interface.
Users enter a location and instantly receive an accident risk score powered by a trained TensorFlow/Keras binary classifier. The model factors in road type, speed limit, weather conditions, time of day, and junction type to produce a contextual risk assessment.
A Leaflet-based interactive map renders risk scores as heatmap overlays across the road network, letting users visually identify high-risk zones. A Recharts analytics dashboard displays risk distribution trends, peak accident hours, and feature importance breakdowns.
The backend is a Python Flask API serving the trained model, and the frontend is a React + TypeScript application handling map rendering, user input, and data visualization: a complete full-stack AI project built end to end.
Key Features
Real-time Risk Prediction
Enter any location and instantly receive an accident risk score from the trained TensorFlow/Keras classifier.
Interactive Risk Heatmap
Leaflet map overlays visualize high-risk road zones using color-coded intensity layers across the road network.
Weather-aware Scoring
Risk predictions dynamically factor in current weather conditions: rain, fog, and dry road states each shift the risk score.
Road Feature Hazard Analysis
The model considers road type, speed limits, and junction characteristics to give a context-aware hazard breakdown per location.
Analytics Dashboard
Recharts-powered dashboard showing risk distribution trends, peak accident hours, and ML feature importance breakdowns.
Tech Stack
Architecture
The system is split into two services: a React + TypeScript frontend responsible for map rendering, user input, and analytics visualization, and a Python Flask API that serves model predictions. The ML model is a TensorFlow/Keras binary classifier trained on historical accident datasets. Feature engineering was a significant part of the work: normalizing numerical features, one-hot encoding categoricals, and deriving features like time-of-day buckets and intersection proximity scores.
The Keras model is serialized to disk and loaded once at Flask startup, kept in memory for the lifetime of the server. Concurrent prediction requests are handled via a request queue to prevent parallel model calls. On the frontend, Leaflet heatmap layers use viewport-based data windowing: only risk data for the current map bounds is loaded, with debounced re-fetching on pan/zoom.
Challenges & Solutions
The hard problems, and how I solved them.
Feature engineering for meaningful predictions
Serving the Keras model with low latency
Rendering large heatmap datasets without lag
More Projects
Interested in working together?
I'm always open to discussing new projects and opportunities.