Elia Alghazal
← Back

CrashLens

End-to-end IoT and AI crash detection with emergency dispatch and insurance reporting

Live Site ↗GitHub ↗
THE PROBLEM

Vehicle crashes produce a surge of time-critical information that emergency services and insurance providers need immediately but rarely receive accurately. Manual crash reporting is slow, incomplete, and depends on the driver being able to report at all. CrashLens automates the entire pipeline: detect the crash, capture the evidence, and route it to the right people in under 30 seconds, with no driver action required.

SYSTEM DESIGN
GPS /IMUCaptures accelerometer, GPS, and gyroscope data.RaspberryPi 5Runs YOLO inference and sensor fusion at the edge.4GModuleTransmits evidence via cellular when WiFi unavailable.Spring BootAPIRoutes crash data with JWT role-based auth.PostgreSQLStores crash events, sensor data, and user records.InsuranceDashboardEvidence for adjusters: video, sensors, timestamps.DriverAppConfirms help is coming to the driver.First ResponderAppGPS location and injury severity in real time.
ENGINEERING DECISIONS
Raspberry Pi 5, not Pi 4 or a microcontroller
The Pi 5's CPU made edge inference viable. A microcontroller cannot run YOLO at all, and the Pi 4 was too slow to hit sub-second detection consistently. That constraint mattered because a crash detection system that waits on a cloud response fails at the worst possible moment: right after impact, when the network is least reliable.
4G instead of WiFi for uploads
Vehicles do not crash near WiFi. 4G was the only option that worked regardless of location. We also added a local SD card buffer so that if the 4G module has not fully initialized at the moment of impact, evidence is stored locally and uploaded once connectivity returns. Without the buffer, we would lose data on exactly the cases where the system was needed most.
YOLO instead of a custom-trained CNN
We did not have a labeled crash dataset large enough to train from scratch. YOLO's pre-trained weights gave us a working detection baseline in days rather than months, which we then fine-tuned on curated crash frames and quantized to INT8 to fit the Pi 5's memory constraints. A custom model would have been the better long-term choice with more data and more time.
Three separate dashboards instead of one unified view
Insurance adjusters need evidence: video, sensor readings, timestamps. First responders need location and probable injury severity. Drivers need to know the system worked and who is coming. Putting everything on one screen meant every user group would see data they did not need during a high-stress moment. Three focused views, one API, role-based JWT auth. The extra frontend surface was worth it.
OUTCOMES
  1. 01Live and deployed at crashlens.org
  2. 02Sub-30-second end-to-end latency from crash detection to stakeholder notification
  3. 03IEEE paper submitted and under review
  4. 04Role-based access for three distinct user groups
STACK

Python · Raspberry Pi 5 · YOLO · GPS/IMU · 4G · Spring Boot · JPA/Hibernate · PostgreSQL · React Native · JWT