SafePath AI
SafePath AI predicts road accident risk and warns drivers via Google Maps overlay, proactive voice alerts, hands-free Ask AI, on-device Gemma, and Fastest vs Safest route recommendations — plus a dashboard for governemen
Core trick
Scores road segments with an XGBoost risk model, then has an on-device Gemma model explain the score in voice alerts on Maps.
Description
SafePath AI predicts road accident risk and warns drivers via Google Maps overlay, proactive voice alerts, hands-free Ask AI, on-device Gemma, and Fastest vs Safest route recommendations — plus a dashboard for governement and police. XGBoost predicts; Gemma explains; Maps shows. Future scope: Gemini Live API for conversational, interruptible driving guidance + Live Translate for Kannada/Hindi/Tamil/English.
README excerpt
# SafePath AI > Road-risk prediction + on-device AI guidance on Google Maps, plus a government safety > dashboard. **XGBoost predicts, Gemma explains, Maps shows.** Built for the Google DeepMind Bangalore Hackathon. SafePath AI predicts accident risk on road segments from government/open accident data, warns drivers in real time with on-device AI voice guidance, recommends safer routes, and gives authorities a live risk dashboard. ## Monorepo ``` apps/ android/ # Kotlin driver app · Maps SDK · Gemma · voice dashboard/ # React police/government dashboard services/ road-intelligence-service/ # Spring Boot — orchestration, DB, routing, hazards, dashboard ai-service/ # Python FastAPI — risk model serving + training pipeline docker-compose.yml # postgres(PostGIS) + ai-service + backend + dashboard ``` **Firm rule:** all AI/ML is Python (`ai-service`); all backend logic is Spring (`road-intelligence-service`); apps call only Spring; everything runs on Docker. ## Quick start Prerequisites: **Docker Desktop**, plus **JDK 21 / Node 20 / Python 3.11** for local dev, and **Android Studio** (a physical device is best for on-device Gemma). Full per-OS steps, single-service dev, Android setup, and troubleshooting: **[SETUP.md](SETUP.md)**. ```bash gh repo clone keshriaditya123/safepath-ai # or git clone via SSH/HTTPS cd safepath-ai cp .env.example .env # then fill in Google Maps + (optional