Skip to content

Dragon4926/Drowsiness-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Software Requirements Specification (SRS)

1. Introduction

This document serves as the Software Requirements Specification (SRS) for the Eye Blink Detection System. The purpose of this system is to detect and alert users when their eyes are closed for an extended period, indicating potential drowsiness or fatigue. The system utilizes computer vision techniques to analyze live video feed from a camera and detect the state of the user's eyes in real-time.

2. Scope

The Eye Blink Detection System is designed to be a standalone application that can be used by individuals to monitor their alertness levels while performing tasks that require sustained attention, such as driving or operating machinery. The system is implemented using Python programming language and various libraries such as OpenCV, dlib, and pygame.

3. Functional Requirements

3.1. Eye Aspect Ratio Calculation

The system shall calculate the Eye Aspect Ratio (EAR) using the formula:
EAR = (A + B) / (2.0 * C)
Where:
- A = Euclidean distance between two points on the eye (e.g., top and bottom)
- B = Euclidean distance between two other points on the eye (e.g., left and right)
- C = Euclidean distance between two fixed points on the eye (e.g., inner and outer corner)
The EAR calculation is performed for both the left and right eyes.

3.2. Eye Blink Detection

The system shall continuously analyze the live video feed from the camera to detect faces using the dlib library.
For each detected face, the system shall identify the landmarks of the eyes using a pre-trained shape predictor model.
Using the landmarks, the system shall calculate the EAR for each eye and compute the average EAR for both eyes.
If the average EAR falls below a predefined threshold (`thresh`), the system shall increment a counter (`flag`) to track consecutive frames where eyes are closed.
If the `flag` exceeds a specified threshold (`frame_check`), the system shall trigger an alert indicating potential drowsiness or fatigue.

3.3. Alerting Mechanism

When drowsiness is detected, the system shall display an alert message on the video feed indicating "ALERT: Wake Up".
Additionally, the system shall play an audio alert using the pygame library to further notify the user.

4. Non-Functional Requirements

4.1. Performance

The system shall analyze video frames in real-time with minimal latency to provide timely alerts.
The system shall be optimized to run efficiently on a variety of hardware configurations.

4.2. Reliability

The system shall be robust to variations in lighting conditions, facial expressions, and head movements.
The system shall accurately detect eye blinks with high precision and minimal false positives.

5. Conclusion

The Eye Blink Detection System outlined in this document aims to provide users with a reliable tool for monitoring their alertness levels and preventing potential accidents due to drowsiness. By leveraging computer vision techniques, the system offers a non-intrusive solution for detecting signs of fatigue in real-time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages