🛡️ SafePath AI – Predict Danger. Prevent Crime. Protect Women.


💡 Inspiration

Navigation systems today optimize for speed and distance — not safety.

Women traveling through urban spaces often face environmental vulnerabilities such as poorly lit streets, isolated areas, and low pedestrian presence, especially at night. Yet modern navigation tools do not consider contextual safety when suggesting routes.

We asked a simple but powerful question:

What if maps could recommend the safest route instead of just the fastest?

SafePath AI was created to transform navigation into an AI-powered safety decision system.

We chose Morbi, Gujarat as a focused urban pilot to demonstrate practical and scalable real-world implementation.


🧭 What It Does

SafePath AI is an AI-powered urban safety routing assistant that:

  • Allows users to select source and destination within Morbi
  • Generates possible route options
  • Calculates a vulnerability score (0–100)
  • Classifies risk as Low, Moderate, or High
  • Dynamically adjusts risk using Day/Night context
  • Automatically recommends a safer alternative if available
  • Provides explainable AI reasoning for each route segment

Instead of simply saying “go this way,” SafePath AI explains why a route may be vulnerable.


⚙️ How I Built It

SafePath AI combines mapping technology with AI-based contextual reasoning.

🗺️ Mapping Layer

  • Leaflet.js for interactive maps
  • OpenStreetMap (OSM) for geographic and routing data
  • Route segmentation for granular safety analysis

🤖 AI Risk Modeling

We integrated Gemini AI to evaluate contextual vulnerability factors:

  • Lighting conditions
  • Isolation levels
  • Crowd density
  • Road type
  • Time of day

Each route segment is analyzed by AI and returns:

  • Risk score
  • Risk category
  • Confidence value
  • Human-readable explanation

Overall route risk is calculated as:

$$ Route\ Risk = \frac{\sum_{i=1}^{n} Segment\ Risk_i}{n} $$

If an alternative route has significantly lower risk, it is highlighted as:

✅ Recommended Safe Path

The prototype is strictly restricted to Morbi’s urban boundaries to maintain realistic scope and deployment feasibility.


🚧 Challenges I Ran Into

1️⃣ Modeling Contextual Risk

There is no ready-made dataset that directly measures urban vulnerability.
We designed structured AI prompts to simulate contextual risk scoring responsibly.

2️⃣ Consistency in AI Output

Ensuring reliable and structured AI responses required careful prompt engineering and validation logic.

3️⃣ UX Clarity

Safety insights must be immediately understandable. We implemented:

  • Color-coded routes (🟢🟡🔴)
  • Overall risk score panel
  • Segment-level explanation popups
  • Night mode risk adjustment

4️⃣ Responsible AI Design

We ensured:

  • No personal profiling
  • No crime prediction
  • No surveillance-based modeling

SafePath AI evaluates environmental vulnerability — not individuals.


🏆 Accomplishments That I'm Proud Of

  • Built a fully AI-integrated routing prototype
  • Implemented dynamic Day/Night risk modeling
  • Enabled explainable AI at segment level
  • Created automatic safer-route recommendation logic
  • Designed a clean, intuitive, safety-focused UI

Most importantly, we demonstrated how AI can meaningfully improve women’s urban safety.


📚 What I Learned

  • AI can enhance everyday infrastructure tools like navigation.
  • Explainability is critical in safety-focused AI systems.
  • Responsible AI requires transparency and clear boundaries.
  • Local pilot implementations can demonstrate scalable global impact.

Safety modeling requires contextual reasoning — not just raw data.


🚀 What's Next for SafePath AI

SafePath AI is designed to scale.

Future directions include:

  • Integration with real-time lighting datasets
  • Smart CCTV density modeling
  • Urban vulnerability heatmaps
  • Government safety dashboards
  • Multi-city deployment
  • Mobile app development
  • Community-reported risk updates

Our long-term vision:

Transform navigation from efficiency-first to safety-first.

SafePath AI is not just a routing tool —
it is a step toward intelligent, responsible AI-powered urban safety systems.

Built With

Share this project:

Updates