A privacy-conscious Android app that detects driver drowsiness using real-time facial landmarks and alerts the user with alarms, vibration, and SOS messages — all while running in the background.
- 🎯 Real-time detection of closed eyes (EAR) and yawning (MAR)
- 🧠 Uses MediaPipe Face Landmarker for facial landmark tracking
- 📣 Plays alarm sound and triggers vibration when drowsy
- 📍 Sends SOS alerts with GPS location to emergency contacts
- 🧾 Lets user add/manage emergency contacts in-app
- ⚙️ Runs as a background foreground service to keep detection active even when minimized
- 🧠 Uses lightweight Android services, no cloud dependencies
| Technology | Purpose |
|---|---|
| Android (Kotlin) | App logic and UI |
| MediaPipe Face Landmarker | Real-time eye/mouth landmark detection |
| CameraX | Camera preview and frame capture |
| SharedPreferences + Gson | Local contact storage |
| SmsManager | Sends emergency SMS alerts |
| FusedLocationProviderClient | Fetches GPS location |
| RecyclerView + Adapter | Dynamic contact list |
| Notification / ForegroundService | Keeps detection alive in background |
CAMERA– for capturing face in real timeSEND_SMS– to send SOS messagesVIBRATE– to trigger physical alertsACCESS_FINE_LOCATION/ACCESS_COARSE_LOCATION– for GPSFOREGROUND_SERVICE– to run detection even when minimized
-
Clone the repo:
git clone https://github.com/visruthnr/DrowzeFree.git
-
Open the project in Android Studio
-
Connect a real Android device via USB
-
Run the app and grant all requested permissions
-
Tap “Manage Contacts” to add emergency numbers
-
The app starts detecting automatically —
if drowsiness is detected continuously, SOS will be triggered