Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

22AM6SRITP Report

CHAPTER 1:
ABOUT THE INTERNSHIP

This project internship with Pantech Solutions Pvt. Ltd., focused on the project "Stay Awake:
Real-Time Drowsiness Detection." The project aimed to develop a drowsiness detection system
using OpenCV and the Dlib library. The system employed a pre-trained facial landmark detector
to identify 68 points on a face. The internship provides hands-on experience in computer vision,
image processing, an excellent opportunity to enhance one’s programming skills, insights about
cutting-edge technologies, and an opportunity to contribute to a project with potential real-world
impact in preventing accidents caused by driver fatigue.

1.1 Organization/Company Profile

Pantech Solutions Pvt. Ltd., also known as Pantech Solutions, is a privately held company
based in Chennai, Tamil Nadu, India. It was founded in 2004 and is best known for
manufacturing and marketing of high-quality, state-of-the-art engineering lab equipment’s and
electronic hobby kits. The company's products are delivered across the globe and many
satisfied customers are the best guarantee of its first-rate service.

Pantech Solutions' products range from various microcontroller development boards, DSP
boards, CPLD/FPGA boards, communication kits, power electronics, basic electronics,
robotics, sensors, and much more. The company's goal is to make finding the parts and
information you need easier and affordable so you can create awesome projects and training
from basic to cutting edge technology.

Pantech Solutions is a growing company with a strong commitment to customer satisfaction.


The company's products and services are used by engineers, hobbyists, and students around the
world. Pantech Solutions is committed to providing its customers with the best possible
products and services, and it is constantly innovating to meet the needs of its customers.

Dept. of MEL, BMSCE Session: April 2023 - July 2023 1


22AM6SRITP Report

1.2 Internship Details: Length

The internship at Pantech Solutions Pvt. Ltd. was a one-month program, providing the
individual with a condensed but valuable learning experience. Throughout the internship, the
intern had the opportunity to immerse themselves in the project "Stay Awake: Real-Time
Drowsiness Detection," gaining hands-on experience in developing an OpenCV-based system
for real-time video analysis. During the program, the individual applied their skills in computer
vision, image processing, and machine learning to effectively address the problem statement.
The one-month duration of the internship offered a focused and intensive environment for the
intern to enhance their technical expertise and gain practical insights into the field of study.

Dept. of MEL, BMSCE Session: April 2023 - July 2023 2


22AM6SRITP Report

CHAPTER 2:
INTRODUCTION

2.1 Problem Definition and Objective

The internship project focused on addressing the problem of drowsiness detection in real-time
video analysis. Drowsiness poses a significant risk in situations such as driving or operating
heavy machinery, necessitating the need for an efficient detection system. The objective was to
develop a system using OpenCV that could accurately identify drowsiness by analyzing real-
time video feeds. By leveraging computer vision techniques, including face detection and eye
tracking, the system aimed to detect signs of drowsiness such as eye closure or prolonged eye
fatigue. The ultimate goal was to create a reliable and prompt alert system, enabling individuals
or operators to take immediate action and prevent accidents caused by drowsiness.

2.2 Scope

The scope of the internship project, titled "Stay Awake: Real-Time Drowsiness Detection,"
encompassed the development of a comprehensive system for detecting drowsiness in real-time
using OpenCV and computer vision techniques. The project aimed to analyze real-time video
feeds to identify signs of drowsiness, with a specific focus on eye closure and eye fatigue as
indicators. The scope included implementing face detection algorithms, leveraging a pre-trained
facial landmark detector to accurately track eye movements, and calculating eye aspect ratios to
determine the level of drowsiness. The project also involved integrating real-time alerts to
promptly notify individuals or operators of potential drowsiness, allowing them to take
immediate preventive measures. Furthermore, the scope encompassed rigorous testing and
optimization of the system's performance to ensure reliable and accurate drowsiness detection
across various real-world scenarios.

Dept. of MEL, BMSCE Session: April 2023 - July 2023 3


22AM6SRITP Report

2.3 Motivation

The motivation behind the internship project, "Stay Awake: Real-Time Drowsiness Detection,"
stemmed from the pressing need to address the potential risks and hazards associated with
drowsiness in critical situations. The project aimed to develop a robust system that could
accurately detect signs of drowsiness in real-time, such as eye closure and eye fatigue. By
implementing this system, the project sought to prevent accidents caused by drowsiness,
particularly in contexts such as driving or operating heavy machinery, where the consequences
of drowsy behavior can be severe. The motivation was to provide individuals or operators with a
reliable tool that would promptly alert them to their drowsy state, enabling them to take
immediate action and prevent potential accidents. Ultimately, the project aimed to enhance
safety, well-being, and productivity by mitigating the risks associated with drowsiness through
real-time detection and timely intervention.

Dept. of MEL, BMSCE Session: April 2023 - July 2023 4


22AM6SRITP Report

CHAPTER 3:
PROJECT DETAILS

3.1 Tasks Performed:

During the one-month internship at Pantech Solutions Pvt. Ltd., the individual worked on the project "Stay
Awake: Real-Time Drowsiness Detection." Their tasks included:

1. Research and Analysis:


 Conducted extensive research on existing drowsiness detection methods and algorithms.
 Analyzed various approaches and techniques used in computer vision and image processing
for drowsiness detection.
 Explored relevant literature and papers to gain insights into the subject.

2. Algorithm Design and Implementation:


 Designed and implemented an OpenCV-based algorithm for drowsiness detection.
 Developed computer vision techniques to identify key facial features, including eyes and
mouth.
 Implemented image processing techniques to track and analyze facial landmarks or
movements.
 Utilized machine learning or deep learning approaches to classify drowsy and awake states.
 Fine-tuned and optimized the algorithm for real-time performance.

3. System Integration and Testing:


 Integrated the drowsiness detection algorithm with a real-time video analysis system.
 Tested the system using different video inputs to evaluate its performance and accuracy.
 Conducted experiments and collected performance metrics, such as detection accuracy and
processing speed.
 Made iterative improvements and fine-tuned parameters based on testing results.

Dept. of MEL, BMSCE Session: April 2023 - July 2023 5


22AM6SRITP Report

3.2 Output Demo

Figure 1. Conscious

Figure 2. Drowsy

3.3 Project Methodology

Figure 3. Project Methodology

1. Loading Face Detector & Landmark Predictor:


The project begins by loading a pre-trained face detection model, which enables the
system to identify and locate faces within a video stream. Additionally, a facial landmark
predictor provided by the dlib library is employed. This predictor can detect 68 specific
points on each detected face, including the positions of the eyes. By leveraging these facial
landmarks, the system gains precise information about the facial features, including eye
locations.

2. Reading Frame from Camera:


To analyze the video stream in real-time, the system continuously captures frames
from a camera or video feed. These frames serve as the input for subsequent image
processing steps.

3. Converting Frame from BGR to Gray:


To simplify subsequent image processing operations, the captured frame is converted
from the BGR color space to grayscale. This conversion reduces the dimensionality of the
image and allows for efficient analysis of the grayscale intensity values.

4. Detecting Face:

Dept. of MEL, BMSCE Session: April 2023 - July 2023 6


22AM6SRITP Report

Once the frame is in grayscale, the loaded face detection model is applied to identify
and localize faces accurately. This step enables the system to pinpoint the region of interest
(ROI) containing the face, which is essential for eye analysis and drowsiness detection.

5. Identifying Left & Right Eye Coordinates:


Having detected the face, the project proceeds to extract the coordinates of the left
and right eyes using the facial landmarks obtained from the previous step. The precise eye
coordinates provide the necessary information for further eye aspect ratio calculations.

6. Finding Eye Aspect Ratio:


The eye aspect ratio (EAR) is calculated based on the Euclidean distances between
specific landmarks around the eyes. By measuring the relative distances between the
landmarks, the EAR provides an indicator of the openness or closure of the eyes. This ratio is
essential for determining the drowsiness levels and detecting instances of eye closure.

7. Eye Close Detection:


Using predefined thresholds, the system compares the calculated eye aspect ratio with
the expected values for open and closed eyes. By monitoring changes in the eye aspect ratio
over time, the system can determine if the eyes are closed or exhibiting patterns consistent
with drowsiness. If the eyes remain closed for an extended period or exhibit drowsiness
patterns, the system can generate an alert to notify the individual or relevant personnel,
enabling timely interventions.

8. Utilizing dlib Library:


The Stay Awake project leverages the dlib library, which provides pre-trained models
and utilities for facial landmark detection. By incorporating this library into the project, we
can take advantage of its robustness and efficiency, enabling accurate facial analysis and
improving the overall performance of the drowsiness detection system.

9. Drowsiness Alert and Actions:


When the system detects drowsiness events based on eye closures, it can trigger
appropriate actions or alerts. These actions can include generating an audible alert to notify
the individual to regain alertness, displaying visual cues to grab attention, sending
notifications to relevant parties (such as a supervisor or caregiver), or activating safety
mechanisms like vibrating seats or lane departure warning systems in vehicles. The specific

Dept. of MEL, BMSCE Session: April 2023 - July 2023 7


22AM6SRITP Report

actions and alerts may vary depending on the application and deployment scenario of the
drowsiness detection system.

3.5 Functional Requirements and Non-Functional Requirements:

Functional Requirements:
Non-functional Requirements:

CHAPTER 4
REFLECTION: RESULTS & INTERNSHIP OUTCOME

Reflection: Results & Internship Outcome

CHAPTER 5
CONCLUSION

References

Dept. of MEL, BMSCE Session: April 2023 - July 2023 8

You might also like