Skip to content

rohitp189/Drowsiness-Detection-System

Repository files navigation

🚗 Drowsiness Detection & Driver Management System

📌 About the Project

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.


🌟 Why Choose Our System?

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.


🌟 Key Features

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.


🔍 How It Works?

1️⃣ Face Detection – The system uses OpenCV and Dlib to identify the driver’s facial landmarks.
2️⃣ Drowsiness CalculationEye 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.


🛠️ Technologies Used

🔹 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.


🔧 Installation & Setup

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.py to interact with the drowsiness detection system.

📊 Benefits

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.


🚀 Future Improvements

🔹 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.


🤝 Contributing

We welcome contributions! If you'd like to improve this project, feel free to fork the repo, raise issues, or submit pull requests.


📜 License

This project is open-source under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published