Skip to content
SARATHI

SARATHI

Unified Attention Monitoring for Transportation

Created on 21st June 2025

โ€ข

SARATHI

SARATHI

Unified Attention Monitoring for Transportation

The problem SARATHI solves

๐Ÿง  The Problem It Solves

Weโ€™ve all been there โ€” driving late at night, eyes heavy, mind drifting. Or sitting in a long meeting, struggling to stay focused. Now imagine that same fatigueโ€ฆ behind the wheel of a truck, or in the cockpit of a plane.

Fatigue is silent. It doesnโ€™t knock before it takes control โ€” and sometimes, it takes lives.

Every year, thousands of road and aviation accidents happen simply because a driver or pilot was:

  • ๐Ÿ˜ด Tired
  • ๐Ÿ˜ต Distracted
  • ๐Ÿ˜ Or just not paying attention for a few seconds

And most vehicles still donโ€™t have real-time, intelligent fatigue monitoring โ€” especially in low-cost environments.


โœ… What SARATHI Does

SARATHI acts like a digital co-pilot โ€” quietly watching, gently alerting, and always protecting.

Using just a regular webcam, SARATHI:

  • ๐Ÿ‘๏ธ Tracks eye movement and blinking patterns
  • ๐Ÿง  Monitors head orientation
  • ๐Ÿง Detects unsafe posture from the side

If it senses the user is losing attention, it:

  • ๐Ÿ”” Triggers a real-time audio + visual alert
  • ๐Ÿ–ผ๏ธ Captures a screenshot of the alert moment
  • ๐Ÿ“Š Updates a live attention status dashboard

All in real-time โ€” no special hardware needed.


๐ŸŒ Who Can Use SARATHI

  • ๐Ÿš— Long-distance or night-time drivers
  • ๐ŸšŒ Fleet operators and public transport managers
  • โœˆ๏ธ Aviation pilots and co-pilots
  • ๐Ÿš‘ Emergency drivers (ambulance, fire)
  • ๐Ÿงช Behavioral researchers studying attention

SARATHI doesnโ€™t judge. It just watches over you โ€” like a caring co-pilot.

Because one moment of awarenessโ€ฆ can save a lifetime.

Challenges we ran into

๐Ÿง—โ€โ™‚๏ธ Challenges I Ran Into

Building SARATHI in just 36 hours came with real engineering and design hurdles:


๐Ÿ”„ Real-time Performance without GPU

We had to process live video frames using MediaPipe + OpenCV + Streamlit on a standard laptop without GPU support.
Balancing multiple models while maintaining real-time FPS was difficult. We solved this by:

  • Optimizing frame logic and draw operations
  • Tuning MediaPipe's confidence thresholds
  • Minimizing I/O operations and memory usage

๐Ÿง  Accuracy vs False Alarms

Setting the right thresholds for eye closure (EAR), head tilt, and posture slouch was tricky. Too strict โ†’ false positives. Too lenient โ†’ unsafe.
We used:

  • Temporal smoothing
  • Manual testing on different faces & postures
  • Frame-by-frame visual overlays to debug subtle changes

๐Ÿ” Streamlit + OpenCV Syncing

Streamlit sometimes froze or lagged when handling:

  • Frame updates
  • Screenshot saving
  • Alarm playback

We solved it by:

  • Running logic inside a clean main() control loop
  • Separating UI updates from processing logic
  • Caching static assets

๐ŸŽฅ Side Posture Monitoring with a Single Cam

Unlike multi-cam systems, we had to extract side-body posture using only a single side-facing webcam. MediaPipe Pose had limitations depending on the userโ€™s body angle.
We overcame this by:

  • Relying on shoulder + hip landmarks
  • Testing with varied upper-body positions
  • Using threshold-based slouch detection

๐Ÿ”Š Consistent Audio Alerts

Pygame audio alerts sometimes looped or lagged due to thread clashes. We wrote a minimal alert manager to:

  • Prevent duplicate audio triggers
  • Smooth playback using conditionals
  • Stop the alarm when posture normalized

๐Ÿ’ช What Worked

  • Careful performance profiling
  • Testing with multiple body types and face positions
  • Keeping the code modular, debug-friendly, and clean

These challenges made SARATHI stronger โ€” and more ready for the real world.

Discussion

Builders also viewed

See more projects on Devfolio