Safedrive Drowsiness Detection

🚗 Driver Drowsiness Detection with Deep Learning (PoC) 🧠 A personal experiment comparing CNN + MobileNetV2 and YOLOv11 for real-time drowsiness detection. Focused on evaluating accuracy and efficiency to explore AI’s potential in preventing fatigue-related accidents. 😴⚡ A hands-on dive into safety-driven computer vision.

AI & Machine LearningJupyter NotebookApache-2.0

Abstract

Safedrive Drowsiness Detection is an open-source AI & Machine Learning project. 🚗 Driver Drowsiness Detection with Deep Learning (PoC) 🧠 A personal experiment comparing CNN + MobileNetV2 and YOLOv11 for real-time drowsiness detection. Focused on evaluating accuracy and efficiency to explore AI’s potential in preventing fatigue-related accidents. 😴⚡ A hands-on dive into safety-driven computer vision. As part of my journey through a Deep Learning course, I developed this project to explore how artificial intelligence can contribute to making our roads safer. I focused on the challenge of driver drowsiness detection, a crucial issue given how many accidents are caused by fatigue every year. It is built using Jupyter Notebook, Computer Vision, Deep Learning, TensorFlow. Key capabilities include: Why use YOLOv8 for Mobile?; High-speed detection: YOLOv8 is optimized for real-time processing, making it perfect for mobile apps that need fast response times; Advanced localization: YOLOv8 can detect and localize facial features, offering more detailed insights into the driver’s state. The complete source code is publicly available on GitHub under the Apache License 2.0, making it a useful reference for students building an AI & Machine Learning mini project or final-year project.

1. Introduction

As part of my journey through a Deep Learning course, I developed this project to explore how artificial intelligence can contribute to making our roads safer. I focused on the challenge of driver drowsiness detection, a crucial issue given how many accidents are caused by fatigue every year. The idea of using deep learning to potentially save lives made this an incredibly motivating and meaningful project to work on. ‍

Throughout the process, I experimented with two powerful approaches: a CNN-based model with Transfer Learning for image classification , and YOLOv8, a real-time object detection model integrated through Roboflow . This allowed me to explore both accuracy-focused models and those designed for real-time inference, gaining a clearer understanding of their strengths, limitations, and real-world applications. ⏱

Working on this project helped me strengthen my grasp of key deep learning concepts, from feature extraction and model fine-tuning to evaluating metrics like precision, recall, and F1-score. I also encountered important practical lessons—like how to handle imbalanced data, optimize for performance, and think critically about what it means to deploy AI in real-life, safety-critical situations.

2. Objective

🚗 Driver Drowsiness Detection with Deep Learning (PoC) 🧠 A personal experiment comparing CNN + MobileNetV2 and YOLOv11 for real-time drowsiness detection. Focused on evaluating accuracy and efficiency to explore AI’s potential in preventing fatigue-related accidents. 😴⚡ A hands-on dive into safety-driven computer vision.

This project demonstrates how Jupyter Notebook, Computer Vision, Deep Learning can be applied to a real-world AI & Machine Learning problem.

3. Key Features / Modules

  • Why use YOLOv8 for Mobile?
  • High-speed detection: YOLOv8 is optimized for real-time processing, making it perfect for mobile apps that need fast response times.
  • Advanced localization: YOLOv8 can detect and localize facial features, offering more detailed insights into the driver’s state.
  • ‍ Better for powerful devices: If you’re targeting high-end devices with robust processing power, YOLOv8 will deliver optimal performance.
  • When should you use it?
  • Your mobile app needs to detect multiple objects or localize faces/eyes.
  • You have access to high-performance hardware on the device (e.g., high-end smartphones).
  • You need a complete detection and classification system in a single pipeline.

4. Technology Stack

Jupyter NotebookComputer VisionDeep LearningTensorFlow

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Python 3.8 or later with Jupyter Notebook / JupyterLab (or Google Colab)
  • pip for dependencies
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/sergio11/safedrive_drowsiness_detection.git
cd safedrive_drowsiness_detection

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Deploy the model as a web app with Streamlit, Flask or FastAPI
  • Compare against an additional model and report the metric difference
  • Add explainability (SHAP / Grad-CAM)

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. What dataset does the project use and how was it pre-processed?
  2. Which algorithm / model architecture is used and why was it chosen over alternatives?
  3. How are training and testing data split, and how is overfitting avoided?
  4. Which evaluation metrics (accuracy, precision, recall, F1) are reported and what do they mean here?
  5. How would you deploy this model for real users?

9. Source Code & License

This project is developed by sergio11 and published on GitHub under the Apache License 2.0. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on an AI & Machine Learning project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for AI & Machine Learning Internship