Skip to content

A real-time Driver Fatigue Monitoring System using Python, OpenCV, and MediaPipe. It detects drowsiness and distraction through eye and head movement analysis. Alerts are triggered via sound/vibration

Notifications You must be signed in to change notification settings

subhas-pramanik-09/SARATHI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

🚘 SARATHI – Unified Attention Monitoring for Transportation

"A moment’s lapse. A lifetime lost. SARATHI watches, warns, and saves."


📍 Overview

SARATHI is a real-time AI-based driver and pilot attention monitoring system that detects drowsiness, unsafe posture, and inattentiveness using only a single webcam. It serves as a digital co-pilot, ensuring that no fatigue-related accident goes unnoticed.

Developed during Hack4Bengal 4.0 – Eastern India's Largest Hackathon, SARATHI addresses one of the deadliest causes of transport-related deaths — fatigue.

YouTube Video Link : https://youtu.be/lDf7jZFTieQ

Front View Side View
Front View Side View

🚀 Key Features (USPs)

  • Dual-layer Detection: Simultaneously monitors eye behavior, head pose, and body posture*
  • 🖼 Screenshot Capture: Takes periodic screenshots during alert states
  • 📣 Smart Alerts: Audio alarm + visual warnings when fatigue is detected
  • 💡 Lightweight: No heavy ML models — optimized for laptops & Raspberry Pi
  • 🔋 Low Resource Usage: CPU-efficient, real-time performance
  • 🔧 Fully Modular: Easily extendable for dual camera or IoT deployment

📊 Impact & Benefits

🚗 Road Safety 🚌 Fleet Monitoring ✈ Pilot Awareness
Reduces fatigue-related accidents Real-time monitoring for public transport Can scale to cockpit fatigue detection

🧠 Tech Stack

Category Tools/Technologies
Language Python
Libraries OpenCV, MediaPipe, NumPy, Pygame
UI Streamlit
Audio Pygame
Utilities jsonschema, tornado
Future Hardware Raspberry Pi 4, external buzzer/cam

⚙ Installation & Run Guide

🔄 1. Clone the Repository

git clone https://github.com/your-username/sarathi.git
cd sarathi

🛠 2. Install Requirements

pip install -r requirements.txt

▶ 3. Launch the App

streamlit run driver_state_detection/app.py

⚠ Make sure your webcam is connected and accessible.


🧪 Technical Workflow

SARATHI performs attention analysis using:

  • 👁 Eye landmarks to detect prolonged closure or gaze shifts
  • 🧠 Head pose (pitch, yaw, roll) to monitor orientation
  • 🧍 Posture deviation using shoulder & spine angles

🧠 If any threshold is crossed:

  • Screenshot is captured
  • Audio alarm is triggered
  • Visual status bar updates on Streamlit UI

🧗‍♂ Challenges Faced

  • ⚠ Real-time processing without GPU
  • 🌙 Handling low-light conditions
  • ❗ Ensuring accuracy while minimizing false alarms
  • 📐 Angle-sensitive posture detection
  • 🧠 Calibrating thresholds across multiple face orientations

🌱 Future Enhancements

  • 📷 Dual camera setup (side + front view) using IoT (e.g., Raspberry Pi)
  • 🧘 User posture calibration on startup for custom thresholds
  • Gesture-based alert dismissal using hand detection
  • 🚨 SOS Trigger: Auto-message if alert persists beyond limit
  • 🌒 Night mode via IR camera support

🏁 Developed At

Hack4Bengal 4.0 – June 2025
Team Name: Dot Slash
Team Lead: Dipan Mazumder
Team Member: Subhas Pramanik


🕉 Why the Name "SARATHI"?

In ancient Indian tradition, SARATHI means “charioteer” — the one who safely drives the warrior through chaos.
In our context, SARATHI acts as a modern digital guide, monitoring attentiveness, preventing fatigue-induced danger, and saving lives through intelligence.


📬 Contact

📧 Email 💻 GitHub 🔗 LinkedIn
Dipan Mazumder
Subhas Pramanik
Dipan Mazumder
Subhas Pramanik
Dipan Mazumder
Subhas Pramanik

Built to protect. Designed to alert. SARATHI is not just code — it's a life-saving companion.

About

A real-time Driver Fatigue Monitoring System using Python, OpenCV, and MediaPipe. It detects drowsiness and distraction through eye and head movement analysis. Alerts are triggered via sound/vibration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages