Welcome to the Drowsiness Detection & Driver Management System, an AI-powered solution designed to ensure road safety by detecting driver drowsiness in real-time. This system helps prevent accidents caused by drowsy driving by providing immediate alerts to drivers and fleet managers.
Our system offers the following key benefits:
✔ Accurate AI Detection – Monitors eye closure, yawning, and head movements for precise drowsiness detection.
✔ Real-Time Alerts – Sends instant warnings to drivers to prevent accidents.
✔ Driver Management – Tracks driver activity and ensures compliance with safety regulations.
✔ Real-Time Face & Eye Tracking – Detects drowsiness using facial landmark detection.
✔ Advanced AI Models – Uses deep learning for accurate drowsiness detection.
✔ Instant Alerts & Notifications – Provides audio-visual alarms to wake up drivers in case of fatigue.
✔ Secure Data Management – Stores data with encryption to meet safety compliance standards.
✔ Trip Monitoring – Logs trip data and tracks driver behavior for safety audits.
1️⃣ Face Detection – The system uses OpenCV and Dlib to identify the driver’s facial landmarks.
2️⃣ Drowsiness Calculation – Eye Aspect Ratio (EAR) and yawn detection algorithms assess fatigue levels.
3️⃣ Alert System – Triggers audio-visual alarms and real-time notifications to managers when drowsiness is detected.
4️⃣ Data Logging – Logs driver activity and generates reports for safety audits and analytics.
🔹 Streamlit – A web framework for building the interactive UI.
🔹 MySQL Connector – Enables communication between Python and MySQL.
🔹 Streamlit Shadcn UI – Provides enhanced UI components for a better user experience.
🔹 Dlib – Used for facial landmark detection in drowsiness detection.
🔹 Pygame – Handles sound alerts to notify the driver.
🔹 NumPy – Supports numerical computations.
🔹 Pandas – Used for data manipulation and analysis.
🔹 Plotly – Generates interactive visualizations for dashboards.
🔹 SciPy.spatial.distance – Computes distances between facial landmarks for drowsiness detection.
1️⃣ Clone this repository
- Download or clone the project from GitHub.
2️⃣ Install Dependencies
- Install the required libraries using
pip install -r requirements.txt.
3️⃣ Run the Application
- Execute the app using
streamlit run app.pyto interact with the drowsiness detection system.
✅ Prevents road accidents caused by drowsy driving.
✅ Enhances driver accountability by tracking activity and behavior.
✅ Improves fleet management and regulatory compliance through data-driven insights.
🔹 Integrate AI for Driver Behavior Prediction – Predict and assess driver performance based on past behavior.
🔹 Mobile App Integration – Extend the system to mobile platforms for real-time monitoring.
🔹 Enhance User Interface – Improve the Streamlit UI for a more seamless user experience.
🔹 Real-Time Driver Location Tracking – Monitor and alert based on driver locations for added safety.
We welcome contributions! If you'd like to improve this project, feel free to fork the repo, raise issues, or submit pull requests.
This project is open-source under the MIT License.