Skip to content

komalkhatod1105/Sleep_Detector_New

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sleep Detection System

Project Overview

The Sleep Detection System is a Python-based computer vision project that detects whether a person is feeling sleepy by analyzing eye movement using a webcam. If the system detects that the eyes remain closed for a certain period, it triggers an alarm sound to alert the user.

This project is useful for driver drowsiness detection, study monitoring, and fatigue detection systems.


Technologies Used

  • Python
  • OpenCV
  • Pygame
  • Haar Cascade Classifier
  • Computer Vision

Features

  • Real-time face detection
  • Real-time eye detection
  • Detects if eyes remain closed for a long duration
  • Plays an alarm sound when sleep is detected
  • Works using a webcam

📂 Project Structure

sleep_detector
│
├── SleepDetection.py
├── buzz.mp3
└── README.md

Installation

  1. Clone the repository
git clone https://github.com/komalkhatod1105/Sleep_Detector.git
  1. Install required libraries
pip install opencv-python
pip install pygame

How to Run

Run the Python file:

python SleepDetection.py

Press ESC to exit the program.


How It Works

  1. The webcam captures video frames.
  2. OpenCV detects the face and eyes using Haar Cascade classifiers.
  3. If eyes remain closed for a specific duration, the system assumes the user is sleepy.
  4. The program plays an alarm sound to alert the user.

Applications

  • Driver drowsiness detection
  • Student focus monitoring
  • Safety systems in vehicles
  • Workplace fatigue monitoring

Future Improvements

  • Use Deep Learning models for higher accuracy
  • Add GUI using Tkinter
  • Implement Eye Aspect Ratio (EAR) algorithm
  • Send mobile notifications

Author

Komal Khatod

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages