yashasvini121 / predictive-calc

An interactive web application developed with Streamlit, designed for making predictions using various machine learning models. The app dynamically generates forms and pages from JSON configuration files. ⭐ If you found this helpful, consider starring the repo!
https://predictive-calc.streamlit.app/
MIT License
11 stars 29 forks source link

Eye Blink Detection Model #77

Open Shrutakeerti opened 4 hours ago

Shrutakeerti commented 4 hours ago

Problem Description:

The model aims to address the real-time detection of eye blinks using facial landmarks. Eye blink detection is crucial in various applications, including driver drowsiness detection, fatigue monitoring, and human-computer interaction systems. This problem needs a solution because undetected fatigue or drowsiness can lead to accidents and reduced productivity. Additionally, blink detection has potential applications in accessibility technology, helping individuals with motor disabilities interact with computers using blink-based commands.

The key challenge here is achieving accurate and reliable detection in real-time, where facial expressions, lighting conditions, and camera quality can significantly impact performance. The goal is to provide a robust system that can detect blinks consistently across different environments and users.

Model Description:

The underlying model is based on Dlib's facial landmark detection combined with a custom calculation of the Eye Aspect Ratio (EAR). The key algorithms involved include:

Facial Landmark Detection: Using Dlib’s pre-trained shape predictor, the model identifies 68 specific landmarks on the face. The landmarks corresponding to the eyes are extracted for further analysis.

Eye Aspect Ratio (EAR): The EAR measures the vertical and horizontal distances between specific eye landmarks to determine whether the eyes are open or closed. A significant drop in the EAR value indicates that the eyes are closed, which allows the model to identify a blink. This method is computationally efficient and well-suited for real-time processing.

Blink Detection Logic: By monitoring consecutive frames where the EAR falls below a pre-defined threshold, the model identifies blinks. It ensures that a blink is detected only after confirming that the eyes are closed for a short duration, reducing false positives from noise or quick movements. Estimated Time for Completion:

The estimated time for completion is 3-4 weeks. The timeline is broken down as follows:

Day 1: Model setup, including integrating Dlib's facial landmark detector, and initial testing on video input. Day 2: Development of blink detection logic using EAR and tuning the parameters (threshold, consecutive frame count). Day 3: Testing across different environments, refining performance, and optimizing real-time responsiveness. Day 4: Final testing, debugging, and preparing for deployment, including packaging the code for use in different systems. Potential factors affecting the timeline include lighting conditions affecting accuracy, challenges with real-time performance on lower-end hardware, and ensuring consistent detection across a variety of users. Expected Outcome:

After implementing the model, the expected outcome is a fully functional real-time blink detection system capable of accurately detecting blinks in various lighting conditions and environments. The system should be able to:

Detect eye blinks with high accuracy (i.e., minimal false positives or negatives). Perform efficiently in real-time without significant lag or performance issues. Provide a reliable signal for triggering actions (e.g., warning a driver or assisting with accessibility tools). This will improve the functionality of any application requiring blink detection and enhance performance by offering a lightweight and efficient solution that can run on common hardware like laptops or smartphones.

Additional Context: References:

Dlib’s official documentation for facial landmark detection. Previous implementations of blink detection using the EAR method. Dlib shape_predictor_68_face_landmarks.dat.

Possible Enhancements: In future iterations, the model could incorporate deep learning-based gaze estimation or integrate additional face detection models for increased robustness across diverse user groups and environments.

Shrutakeerti commented 4 hours ago

Assign me this issue @yashasvini121