An AI-powered real-time driver monitoring system that detects unsafe driving behaviors to enhance road safety.
- Live Demo: https://driver-monitoring.vercel.app/
- Repository: https://github.com/AlbatrossC/Driver-Monitoring-System
The Driver Monitoring System (DMS) is an AI-based solution designed to detect unsafe driving behaviors in real-time. Using computer vision and deep learning, the system identifies critical safety violations including:
- Drowsiness detection
- Phone usage while driving
- Eating and drinking
- Smoking
- Seatbelt violations
- Driver distraction
The system is optimized to run directly in the browser using lightweight object detection models, making it accessible and efficient.
We developed three distinct models for comprehensive driver behavior analysis:
| Model | Description | Status |
|---|---|---|
| YOLOv8n | Fast and lightweight object detection | ✅ Deployed in browser |
| YOLO11n | Improved accuracy with better class separation | ✅ Deployed in browser |
| Model | Description | Status |
|---|---|---|
| Custom CNN | Deep learning model for behavior classification |
The browser-based demo runs only the YOLO models due to performance constraints. The CNN model is too large and memory-intensive for browser deployment.
To run the CNN model locally:
git clone https://github.com/AlbatrossC/Driver-Monitoring-System
cd Driver-Monitoring-System
python app.pyLink: Driver Monitoring System Dataset
Classes (8):
0:Distracted1:Drinking2:Drowsy3:Eating4:PhoneUse5:SafeDriving6:Seatbelt7:Smoking
Link: Abnormal Driver Behaviour Dataset
Classes:
- Cigarette
- Drinking
- Eating
- Phone
- Seatbelt
Link: Multi-Class Driver Behavior Image Dataset
Classes:
- other_activities
- safe_driving
- talking_phone
- texting_phone
- turning
All datasets underwent rigorous preprocessing:
- Data cleaning and structuring
- Data augmentation for improved model generalization
- Class balancing to handle imbalanced datasets
- YOLO annotation format conversion
- Separate training pipelines for each model
All training notebooks are located in the training_notebooks/ folder:
training_notebooks/
├── 1_soham_yolo11.ipynb # YOLO11 model training
├── 2_chaitanya_yolo8.ipynb # YOLOv8 model training
└── 3_divyanshu_cnn.ipynb # CNN model training
- Download the datasets manually from the links provided above
- Update dataset paths in each notebook
- Execute cells sequentially
Driver-Monitoring-System/
│
├── data/ # Raw and processed datasets
├── demo-images/ # Sample output images
├── driver_monitoring/ # Core ML logic and utilities
├── driver_monitor_sys/ # Experimental modules
├── models/ # Trained YOLO & CNN models
├── public/ # Public frontend assets
├── resources/ # Supporting resources
├── runs/ # YOLO auto-generated outputs
├── static/ # CSS, JS, images
├── templates/ # HTML templates (Flask)
├── testing_notebooks/ # Model testing and evaluation
├── training_notebooks/ # Model training notebooks
│
├── app.py # Main Flask application
├── convert.py # Model conversion utilities
├── requirements.txt # Python dependencies
├── vercel.json # Deployment configuration
└── README.md # Project documentation
- Python 3.8 or higher
- pip package manager
- Git
-
Clone the repository:
git clone https://github.com/AlbatrossC/Driver-Monitoring-System cd Driver-Monitoring-System -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Access the application:
Open your browser and navigate to
http://localhost:5000
- Visit the live demo
- Upload an image
- The system will automatically detect and highlight unsafe behaviors
Run the Flask application locally to access all three models including the CNN classifier:
python app.pyThis project was developed as part of the Advanced Course on Green Skills and Artificial Intelligence under the Skills4Future Program.
| Name | Contribution |
|---|---|
| Chaitanya kulkarni | YOLOv8 Model Training & Dataset Preparation |
| Soham Jadhav | YOLO11 Model Training & Data Annotation |
| Divyanshu Mishra | CNN Model Training & Image Classification |
| Anurag Pawar | Backend Logic & System Integration |
- Program: Advanced Course on Green Skills and Artificial Intelligence
- Organized by: Edunet Foundation, AICTE, Shell India Markets Pvt. Ltd.
- Mentor: Professor Sarthak Narnor
| Model | Accuracy | Speed | Deployment |
|---|---|---|---|
| YOLOv8n | High | Fast | ✅ Browser |
| YOLO11n | Very High | Fast | ✅ Browser |
| Custom CNN | Low | Moderate | 🖥️ Local Only |
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to:
- Edunet Foundation, AICTE, and Shell India Markets Pvt. Ltd. for organizing the Skills4Future Program
- Professor Sarthak Narnor for mentorship and guidance
- The open-source community for providing datasets and tools
