A KDD-driven web-based intelligent system for automatic road accident detection, severity estimation, V2X emergency broadcast simulation, and accident-prone zone identification.
Based on research validated at Applus+ IDIADA Automotive Research Corporation, Spain
๐ Quick Start โข ๐ Architecture โข โจ Features โข ๐ธ Screenshots โข ๐ API Reference โข ๐ค Connect
Modern vehicles equipped with communication technologies present an opportunity for better emergency response to road accidents. IADSES implements a novel intelligent system that:
- Automatically detects road accidents from vehicular sensor data
- Estimates severity using a KDD (Knowledge Discovery in Databases) pipeline with weighted feature inference
- Broadcasts alerts via simulated V2X (Vehicle-to-Everything) vehicular networks to emergency services
- Identifies accident-prone zones using the Haversine formula for geographic clustering
- Visualises incidents on interactive maps powered by OpenStreetMap/Leaflet.js
The system considers the most relevant variables characterising accident severity: vehicle speed, vehicle type, impact force, airbag deployment status, road type, and weather conditions โ aligning directly with the research methodology validated at Applus+ IDIADA Automotive Research Corporation.
- KDD 5-Stage Pipeline โ Data Collection โ Preprocessing โ Feature Selection โ Pattern Mining โ Knowledge Output, visualised as an animated pipeline on every result
- AI Weighted Inference Engine โ Deterministic feature-weight scoring with animated confidence bars (Impact Force 35%, Speed 25%, Airbag 20%, Vehicle Type 10%, Weather 10%)
- Severity Escalation โ Weather + road type modifiers (Fog/Rain on Highway escalates severity one level; heavy vehicles escalate on high impact)
- Accident-Prone Zone Detection โ Haversine formula calculates real geographic distances; flags any 500m radius with 3+ accidents in 30 days
- Animated broadcast to 6 receiver nodes: Ambulance, Fire Department, Police, Hospital, Nearby Vehicles, Traffic Control
- Zone authority notification when location is flagged as accident-prone
- Notification messages include vehicle plate, exact address, severity, and zone status
- GPS Auto-detection โ Browser geolocation API with OpenStreetMap Nominatim reverse geocoding
- Interactive Maps โ Leaflet.js maps on Result and Dashboard pages
- Accident Pins โ Colour-coded by severity (Red=High, Orange=Medium, Green=Low)
- Prone Zone Circles โ 500m radius danger circles rendered on map
- Mini Map Preview โ Shows location before form submission
- Physics-Based Simulator โ Three modes with realistic vehicle dynamics:
- Normal Drive โ Idle โ Accelerate โ Cruise โ Brake cycle, 0.1โ1.5 kN micro-impacts
- Simulate Crash โ 5 real accident scenarios (Highway Rear-End, City Intersection, Rural Rollover, Parking Lot, Highway Head-On) with impact decay using
F ร e^(-tร0.6) - Random Event โ Weighted: 50% hard braking, 35% medium impact, 15% severe crash
- Mock Scenario Button โ Fills all fields AโZ instantly with 7 pre-loaded realistic Indian road accident scenarios (plate, coordinates, address, all sensor data)
- Dark cockpit / instrument cluster aesthetic
- Orbitron + Rajdhani + Share Tech Mono typography
- CSS scanline overlay, animated road lines, amber/red/cyan palette
- Animated KDD pipeline, staggered V2X node notifications
- Scrolling traffic safety quote ticker
- Fully responsive
| Layer | Technology |
|---|---|
| Backend | ASP.NET Core 10.0 (MVC + Web API hybrid) |
| Frontend | Razor Views, Vanilla JS, CSS3 Animations |
| Database | SQLite via Entity Framework Core 9.0 |
| ORM | Entity Framework Core (Code First, EnsureCreated) |
| Maps | Leaflet.js + OpenStreetMap + Nominatim |
| Fonts | Google Fonts (Orbitron, Rajdhani, Share Tech Mono) |
| Testing | xUnit, Microsoft.Extensions.Logging.Abstractions |
| Language | C# 13 |
| Platform | Windows / Linux / macOS (cross-platform) |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PRESENTATION LAYER โ
โ Razor Views (Index ยท Result ยท Dashboard) โ
โ Leaflet.js Maps ยท CSS Cockpit UI ยท iadses.js โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTP
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONTROLLER LAYER โ
โ AccidentController (MVC) ApiController (REST /api/) โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUSINESS LOGIC LAYER โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ AccidentDetection โ โ SeverityEstimation โ โ
โ โ Service โ โ Service โ โ
โ โ โ โ โ โ
โ โ IF ImpactForce > 50 โ โ High: Force>80 OR Speed>100 โ โ
โ โ OR Airbag == true โ โ Medium: Force > 50 โ โ
โ โ โ ACCIDENT โ โ Low: Otherwise โ โ
โ โ โ โ +Escalation: Weather/Road โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NotificationService โ โ ZoneAnalysisService โ โ
โ โ โ โ โ โ
โ โ Builds alert msg โ โ Haversine formula โ โ
โ โ Saves to DB โ โ 500m radius ยท 30-day window โ โ
โ โ Logs to console โ โ 3+ accidents โ Prone Zone โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATA ACCESS LAYER โ
โ ApplicationDbContext (EF Core) โ
โ SQLite ยท AccidentRecord โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ก Data Collection โ ๐ง Preprocessing โ ๐ฏ Feature Selection
Raw sensor Validate & Speed, Force,
streams normalize Airbag, Location
โ ๐ง Pattern Mining โ ๐ Knowledge Output
Inference rules Accident Detected
+ Zone analysis Severity Level
For each new accident with coordinates (lat, lon):
Query all accidents within last 30 days with coordinates
For each historical accident h:
d = 2R ร arcsin(โ(sinยฒ(ฮlat/2) + cos(lat)ยทcos(h.lat)ยทsinยฒ(ฮlon/2)))
Count accidents where d โค 500m
If count โฅ 3 โ Flag as ACCIDENT-PRONE ZONE
IADSES/
โ
โโโ AccidentSystem/ # Main ASP.NET Core project
โ โโโ Controllers/
โ โ โโโ AccidentController.cs # MVC controller (UI routes)
โ โ โโโ ApiController.cs # REST API controller
โ โ
โ โโโ Models/
โ โ โโโ AccidentData.cs # Input DTO (form + API)
โ โ โโโ AccidentRecord.cs # Database entity
โ โ
โ โโโ Services/
โ โ โโโ AccidentDetectionService.cs # Detect() โ KDD rule engine
โ โ โโโ SeverityEstimationService.cs# Predict() โ weighted inference
โ โ โโโ NotificationService.cs # Notify() โ alert + store
โ โ โโโ ZoneAnalysisService.cs # Haversine prone-zone engine
โ โ
โ โโโ Data/
โ โ โโโ ApplicationDbContext.cs # EF Core DbContext
โ โ
โ โโโ Views/
โ โ โโโ Accident/
โ โ โ โโโ Index.cshtml # Cockpit input form
โ โ โ โโโ Result.cshtml # Analysis result + KDD + V2X + Map
โ โ โ โโโ Dashboard.cshtml # Mission Control + incident map
โ โ โโโ Shared/
โ โ โโโ _Layout.cshtml # Shared layout + nav
โ โ
โ โโโ wwwroot/
โ โ โโโ css/site.css # Cockpit dark theme design system
โ โ โโโ js/iadses.js # Simulator + mock data + GPS
โ โ
โ โโโ Program.cs # App entry point + DI + auto DB
โ โโโ appsettings.json
โ โโโ AccidentSystem.csproj
โ
โโโ AccidentSystem.Tests/ # xUnit unit tests
โ โโโ AccidentDetectionServiceTests.cs # 8 detection tests
โ โโโ SeverityEstimationServiceTests.cs # 9 severity tests
โ
โโโ AccidentSystem.sln
โโโ SETUP_AND_RUN.bat # Windows one-click launcher
โโโ README.md
โโโ LICENSE
- .NET 10 SDK โ only requirement
- No database installation needed (SQLite is built-in)
- No Docker, no SQL Server, no environment variables
git clone https://github.com/samnaveenkumaroff/IADSES.git
cd IADSES\AccidentSystem
dotnet restore
dotnet runOr simply double-click SETUP_AND_RUN.bat
git clone https://github.com/samnaveenkumaroff/IADSES.git
cd IADSES/AccidentSystem
dotnet restore
dotnet runThe SQLite database file
AccidentSystem.dbis created automatically in the build output directory on first run. No setup required.
CREATE TABLE Accidents (
Id INTEGER PRIMARY KEY AUTOINCREMENT,
VehicleSpeed REAL NOT NULL,
ImpactForce REAL NOT NULL,
AirbagStatus INTEGER NOT NULL, -- boolean
VehicleType TEXT NOT NULL,
NumberPlate TEXT, -- e.g. TN29AB1234
Severity TEXT NOT NULL, -- High | Medium | Low | None
IsAccident INTEGER NOT NULL, -- boolean
IsInProneZone INTEGER NOT NULL, -- boolean
Latitude REAL,
Longitude REAL,
Address TEXT,
RoadType TEXT, -- Highway | City Road | Rural | etc.
WeatherCondition TEXT, -- Clear | Rain | Fog | Night | Snow
Timestamp TEXT NOT NULL, -- UTC datetime
NotificationMessage TEXT
);Process accident data and return detection result.
Request Body:
{
"vehicleSpeed": 94.5,
"impactForce": 87.3,
"airbagStatus": true,
"vehicleType": "Car",
"numberPlate": "TN29AB1234",
"latitude": 12.9716,
"longitude": 80.2137,
"address": "NH-32, Near Tambaram Flyover, Chennai",
"roadType": "Highway",
"weatherCondition": "Clear"
}Response:
{
"recordId": 1,
"accident": true,
"severity": "High",
"isProneZone": false,
"plate": "TN29AB1234",
"location": {
"latitude": 12.9716,
"longitude": 80.2137,
"address": "NH-32, Near Tambaram Flyover, Chennai"
},
"timestamp": "2026-03-21T07:00:00Z",
"message": "๐ด HIGH SEVERITY โ Vehicle TN29AB1234 at NH-32..."
}Returns all accident-prone zone clusters.
[
{
"latitude": 12.9715,
"longitude": 80.2135,
"accidentCount": 4,
"highSeverity": 2,
"lastAccident": "2026-03-20T14:30:00Z",
"address": "NH-32, Tambaram, Chennai"
}
]{ "status": "ok", "timestamp": "2026-03-21T07:00:00Z" }ACCIDENT = TRUE if: ImpactForce > 50 kN
OR AirbagStatus == true
HIGH if: ImpactForce > 80 kN OR VehicleSpeed > 100 km/h
MEDIUM if: ImpactForce > 50 kN
LOW if: Accident detected but below thresholds
ESCALATE one level if:
Weather โ {Fog, Rain} AND RoadType = Highway
OR
VehicleType โ {Truck, Bus} AND ImpactForce > 80 kN
Impact Force โ 35% weight
Vehicle Speed โ 25% weight
Airbag Status โ 20% weight
Vehicle Type โ 10% weight
Weather โ 10% weight
cd AccidentSystem.Tests
dotnet test -v normal17 unit tests covering:
- Accident detection (8 tests) โ no accident, impact threshold, airbag trigger, boundary conditions, null guard
- Severity estimation (9 tests) โ High/Medium/Low paths, boundary values, escalation, null guard
The ๐ญ LOAD MOCK SCENARIO button cycles through 7 pre-loaded real Indian road accident scenarios:
| # | Scenario | Plate | Location |
|---|---|---|---|
| 1 | Highway Rear-End Collision | TN29AB1234 | NH-32, Tambaram, Chennai |
| 2 | City Intersection T-Bone | KA05MN5678 | Silk Board Junction, Bengaluru |
| 3 | Foggy Highway Head-On | MH12CD9988 | Mumbai-Pune Expressway |
| 4 | Rural Road Pothole Skid | AP09XY3344 | SH-1, Shamshabad, Telangana |
| 5 | Night City Speeding | DL3CAF7722 | Ring Road, AIIMS, Delhi |
| 6 | Bridge Guardrail Impact | GJ15EF4411 | Sardar Bridge, Ahmedabad |
| 7 | Safe Normal Drive | TN22GH8801 | Anna Salai, Chennai |
- Replace rule-based engine with ML.NET trained model
- Integrate real OBD-II / IoT sensor data streams
- Add SMS/Email alerts via Twilio / SendGrid
- Real GPS tracking with live vehicle movement
- Mobile app companion (MAUI / React Native)
- Export accident reports to PDF
- Multi-language support (Tamil, Hindi)
- Real V2X DSRC/C-V2X protocol integration
This project implements the system described in:
"A Novel Intelligent System for Automatic Notification and Severity Estimation of Vehicles in Road Accidents" โ A KDD-based approach validated at Applus+ IDIADA Automotive Research Corporation, Spain.
Key contributions implemented:
- KDD-based accident detection from vehicular sensor features
- Feature-based severity inference (Speed, Impact, Airbag, Vehicle Type)
- V2X vehicular network notification architecture
- Accident-prone zone identification from historical data
This project is licensed under the MIT License โ see LICENSE for details.
โก Built with ASP.NET Core ยท SQLite ยท Leaflet.js ยท OpenStreetMap
Every millisecond saved in accident detection can save a life.