🛡️ SafePath — AI-Enhanced Safety Navigation

🌟 Inspiration

Every girl in India has heard this at least once:
“Share your live location.”
“Text me when you reach.”
“Don’t take that route at night.”

These phrases became so normal that we stopped questioning why they exist.
That frustration became the spark behind SafePath — a platform built to show not just the fastest route, but the safest one.

I wanted to build something that actually understands real-world safety: lighting, police presence, crime trends, and even the emotions in incident reports. Something that gives confidence, not fear.


🔍 What it does

SafePath is an AI-powered safety navigation platform that helps users — especially women — choose safer routes in real time.

Key Features

  • 🗺️ Safest vs Fastest Route comparison
  • 🤖 Gemini AI analysis of community incident reports
  • 📊 ML-ready safety scoring system
  • 📝 Incident reporting with anonymous mode
  • 👍 Helpful-voting for crowd validation
  • 🔔 Real-time alerts for nearby safety issues
  • 🔐 User authentication (secure login/register)
  • 🗃️ Interactive map with safety layers (lighting, police, crime clusters)

SafePath doesn’t just guide you — it actively explains why a route is safe or unsafe.


🛠️ How we built it

🔧 Tech Stack

  • Backend: Flask (Python)
  • Database: PostgreSQL
  • Frontend: HTML, CSS, Bootstrap, JavaScript
  • Mapping: Leaflet.js + OpenStreetMap
  • AI: Google Gemini for NLP
  • Geospatial: NetworkX, Dijkstra, cKDTree, weighted graphs

⚙️ Core Systems

1. Safety Score Formula

[ \text{Safety Score} = 0.30L + 0.25C_d + 0.25C_r + 0.20I ]

2. Dual Routing Engine

  • Fastest Route: shortest path
  • Safest Route: weighted path based on lighting, crime, crowds & infrastructure

3. AI-powered Report Analyzer

Gemini processes user reports to detect:

  • category
  • severity
  • sentiment
  • safety concerns
  • action suggestions

4. Crowdsourced Validation

Helpful votes improve trustworthiness of reports.


🧩 Challenges we ran into

  • Getting real geospatial data and converting it into usable JSON & nodes
  • Finding the right safety weights for different factors
  • Making Gemini avoid misclassification
  • Building a lag-free map while rendering routes + markers + safety zones
  • Handling PostgreSQL joins efficiently for live filtering
  • Designing the UI to show safety info without overwhelming the user

This was basically a boss-level coding sprint 😭🔥


🏆 Accomplishments we’re proud of

  • Built a complete AI + geospatial navigation system from scratch
  • Designed a clean, explainable safety model
  • Integrated real infrastructure data of Delhi
  • Created AI-driven incident interpretation that feels real and helpful
  • Built a beautiful, intuitive map interface
  • And honestly… just turning a personal fear into a working tech solution 🙌

📚 What we learned

  • How to work with geospatial algorithms (NetworkX, KD-trees)
  • Real world data cleaning & weighting
  • Designing a robust Flask backend
  • PostgreSQL indexing & schema planning
  • Prompt engineering with Gemini
  • Thinking about UX from a safety-first perspective
  • How complex “safety” actually is when you break it down mathematically

🚀 What’s next for SafePath

  • 📡 Live crowd density via mobile signals
  • 🛰️ Integration with Delhi Police Open Data
  • 📱 Android + iOS app
  • 🎤 Voice-based safety assistant
  • 🧠 Predictive crime hotspots using ML models
  • 👥 Community safety badges for verified contributors
  • 🚨 Auto-alert if user enters a low-safety zone

SafePath is only getting started — the vision is a future where women don’t have to rely on “text me when you reach home.”

Share this project:

Updates