Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🚗 AI Driver Safety Platform (Built on Endee)

🔍 Overview

The AI Driver Safety Platform is a real-time intelligent monitoring system designed to detect potential driving risks and prevent accidents. It leverages Machine Learning, Semantic Search (Endee Vector DB), and Explainable AI (RAG) to analyze driving conditions and generate meaningful insights.

This project is built on top of a forked Endee repository, fulfilling the requirement of using Endee as a vector database.


🎯 Problem Statement

Road accidents often occur due to:

  • Overspeeding
  • Poor weather conditions
  • Lack of situational awareness

This system aims to predict and explain driving risks in real time, enabling safer driving decisions.


🚀 Key Features

  • 🚗 Real-Time Monitoring (2s refresh)

  • 📱 Mobile GPS Tracking (via browser)

  • 🌦️ Weather-aware Risk Detection

  • 🧠 Hybrid Risk Engine

    • ML-based prediction
    • Semantic similarity search (Endee)
  • 📊 Explainable AI (RAG)

  • 📄 Smart Event Logging

    • Logs only MEDIUM & HIGH risks
  • 📸 Evidence Capture for High Risk

  • 📈 Interactive Dashboard (Charts + Map)


🧠 System Architecture

User Input / Sensors (GPS, Speed, Weather)
                ↓
        Data Processing Layer
                ↓
    --------------------------
    | ML Model Prediction    |
    | Endee Semantic Search  |
    --------------------------
                ↓
        Hybrid Risk Engine
                ↓
     Explainability (RAG)
                ↓
 Dashboard + Alerts + Logging

⚡ Use of Endee (Core Requirement)

This project integrates Endee Vector Database for semantic search:

  • Retrieves similar accident scenarios
  • Compares real-time driving conditions
  • Enhances prediction accuracy
from endee_client import similarity_search

👉 Endee enables fast and scalable similarity matching, making the system context-aware.


🚦 Risk Detection Logic

Condition Status
Speed ≤ 3 km/h IDLE
Low Risk SAFE
Medium Risk ⚠️ WARNING
High Risk 🚨 ALERT

👉 Only MEDIUM and HIGH risks are stored in risk_logs.csv


📊 Dashboard Components

  • 🎯 Risk Gauge (Real-time)
  • 📈 Speed vs Risk Graph
  • 🧠 AI Explanation Panel (RAG)
  • 🌍 Live Map (Mobile GPS)
  • 📄 Recent Risk Logs

🧪 Tech Stack

  • Frontend: Streamlit
  • Backend: Python
  • AI/ML: Custom Risk Model
  • Vector Database: Endee
  • Explainability: RAG
  • Visualization: Plotly
  • Data: Pandas

▶️ Setup Instructions

git clone https://github.com/madha1502/endee.git
cd endee/ai-driver-safety

pip install -r requirements.txt
streamlit run app.py

📱 Mobile GPS Usage

  1. Connect mobile & laptop to same WiFi
  2. Run app on laptop
  3. Open in mobile browser:
http://<your-ip>:8501
  1. Allow location access

📁 Project Structure

endee/
 ├── ai-driver-safety/
 │    ├── app.py
 │    ├── agent.py
 │    ├── semantic_search.py
 │    ├── rag.py
 │    ├── auth.py
 │    ├── gps_speed.py
 │    ├── logger.py
 │    ├── requirements.txt
 │    └── README.md

🚀 Future Enhancements

  • 📡 Real sensor integration (IoT)
  • 🤖 Deep Learning models
  • ☁️ Cloud deployment (Endee Cloud)
  • 🚔 Traffic authority alerts
  • 📱 Mobile app version

🎤 Key Highlights

  • Real-world AI application
  • Uses Vector DB (Endee) effectively
  • Combines ML + RAG + Semantic Search
  • Clean modular architecture

🏁 Conclusion

This project demonstrates a complete AI pipeline for real-time decision making, combining:

  • Machine Learning
  • Vector Databases
  • Explainable AI

👉 A scalable solution for smart transportation systems


⭐ Credits

  • Endee (Vector Database)
  • Streamlit
  • Python Ecosystem

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors