Work in Progress — This project is in early development. Core detection logic is functional, but features are still being refined.
Drivera is an Android app that monitors driver alertness in real-time using on-device AI — no cloud, no internet required. It detects drowsiness and micro-sleep by analyzing eye movements through the front camera, then triggers a loud alarm before an accident can happen.
![]() |
![]() |
![]() |
![]() |
| OFF | ON | WARNING | CRITICAL |
Drivera runs a persistent background service that continuously analyzes your face using MediaPipe Face Landmarker. It calculates your Eye Aspect Ratio (EAR) to determine how closed your eyes are, and escalates through three states:
| State | Condition | Response |
|---|---|---|
SAFE |
Eyes open normally | No action |
WARNING |
Eyes beginning to close | Visual alert on screen |
CRITICAL |
Eyes closed for 1.5+ seconds | Max-volume alarm + vibration |
The app keeps monitoring even when the screen is off or you switch to another app.
- Language: Kotlin + Jetpack Compose
- AI / CV: MediaPipe Face Landmarker (on-device, LIVE_STREAM mode)
- Camera: CameraX
- Architecture: Foreground Service · State Machine · LocalBroadcastManager
[▓▓▓▓▓▓░░░░] ~60% — Core detection working, UI polish & testing in progress
- EAR-based eye closure detection
- Moving average noise filter
- Dominant eye logic (head tilt tolerance)
- CRITICAL alarm with max volume override + haptic
- Camera isolation (screen off doesn't stop detection)
- Calibration UI per user
- Settings screen (sensitivity, alarm tone)
- Head pose / nodding detection
- Proper permission flow & onboarding
Requires Android Studio Hedgehog or newer, Android API 26+
git clone https://github.com/Cet412/drivera.git- Open in Android Studio
- Let Gradle sync finish
- Run on a physical device (camera required)
- Grant camera & notification permissions when prompted
- Keep the front camera facing your face while driving
Want to understand the internals? The technical documentation (state machine design, EAR algorithm, component breakdown, known tech debt) lives in the Wiki.
This is a personal project but feedback and ideas are welcome. Feel free to open an issue or reach out.
Ringkasan dalam Bahasa Indonesia
Drivera adalah aplikasi Android pemantau pengemudi berbasis AI lokal (on-device). Aplikasi ini mendeteksi kantuk dan micro-sleep secara real-time menggunakan kamera depan, tanpa koneksi internet.
Cara kerjanya: kamera merekam wajah secara terus-menerus, lalu model AI menganalisis rasio penutupan kelopak mata (Eye Aspect Ratio). Jika mata terdeteksi tertutup lebih dari 1,5 detik, alarm dengan volume maksimum dan getaran akan langsung aktif.
Proyek ini masih dalam tahap pengembangan awal (~60%). Logika deteksi utama sudah berjalan, tapi UI dan fitur tambahan masih dalam pengerjaan.
Built with MediaPipe · CameraX · Jetpack Compose · Made in Indonesia



