About the project
Long night drives make truck, bus and cab drivers sleepy, and a few seconds of closed eyes at highway speed can cause a serious accident. This driver drowsiness detection Android project turns an ordinary smartphone into an in-cab safety monitor. The phone is mounted on the dashboard, the front camera tracks the driver's face in real time, and the app warns the driver the moment signs of sleep appear. Fleet owners and family members get alerts and trip reports on their own phones.
How it works
- Before driving, the driver takes a 60-second alertness self-test (blink check, reaction taps, sleep hours) and gets a fitness score with AI advice
- The driver starts a trip; the app calibrates to the driver's eyes for 3 seconds
- ML Kit Face Mesh reads 468 face points on every frame and calculates eye openness (EAR), mouth opening (MAR) and head nod
- Eyes closed for about 1.5 seconds triggers a full-screen alarm with vibration and a countdown
- If the driver does not tap "I'm Awake", an SOS with GPS location is sent to the owner/family (plus optional SMS to emergency contacts)
- At the end of the trip the app gives a safety score, an alertness graph and an AI trip report with a PDF
- Owners review trips, add remarks and download fleet reports
Users
- Driver: alertness test, live monitoring, alarm, SOS, trip history, insights, badges, emergency contacts, vehicles
- Fleet Owner / Family: live drivers, SOS and drowsy alerts with map, driver detail with AI risk summary, trip review, fleet PDF report
- Admin (web panel): drivers, owners, vehicles, trips, SOS alerts, alertness tests, notices, reports, settings
Highlights
- 3 roles, 26 Android screens, 12 admin pages, 35 APIs, 13 database tables
- On-device ML (ML Kit Face Mesh) with EAR, MAR, head-nod and PERCLOS rules – no internet needed for detection
- Gemini AI for test advice, trip report and weekly risk summary, with an offline fallback
- Safety score and alertness score formulas explained in the report
- Full validations on every form (email, 10-digit mobile, licence number, vehicle number, password rules)
- Passwords hashed, prepared SQL statements, CSRF protection in the admin panel
- Sample data and demo logins ready for the college demo
What you get
- Complete Android Studio project (Java) and the admin panel source code
- MySQL database file with sample data
- Project report (Word, 54 pages) with all UML, DFD and ER diagrams
- 2-page project abstract (Word + PDF)
- Project explanation with 23 viva questions
- Step-by-step setup guide (PDF) and README
- Setup help on call / WhatsApp
Who can use this project
Final year students of BE / B.Tech, MCA, BCA, M.Tech and Diploma in Computer Engineering, IT, ENTC and Electrical branches. It is a good choice if you want an Android project with source code that has real machine learning, a live camera feature and a road-safety theme, with documentation and report included.
Frequently asked questions
Does the drowsiness detection need internet? No. Face detection and the drowsy rules run on the phone. Internet is needed only to sync with the server and for the optional Gemini AI reports.
Can I run it on the Android emulator? The screens open on the emulator, but drowsiness detection needs a real phone with a front camera.
Is a Gemini API key compulsory? No. Without a key the app writes an offline report automatically. A free key from Google AI Studio can be added in admin settings.
How do the fleet owner and the driver get connected? Each driver has a code like JR-D-1042. The owner or family member enters this code in the app to link the driver.