Professional Documents
Culture Documents
Abstract:- The purpose of this Python project is to conditions as well as imaging resolution. This problem can
develop a real time productivity analyser system that be solved using machine learning algorithms that are well-
will enhance the productivity in various industries by trained as they provide high precision and robustness in
minimizing the unaffordable productivity losses as much fatigue recognition. A simple CNN-based productivity
as possible. The system will work by detecting whether a analyser has been developed with an average accuracy of
person's eyes are closed for a sufficient amount of time 83.74% across multiple subjects using their customized
and whether he is yawning or not. This device will alert training data sets.
him when fatigue is detected. Fatigue poses a major risk
of life-threatening injuries. We used OpenCV to gather II. PRODUCTIVITY MONITORING SYSTEMS
images from a camera and feed them to our CNN binary THAT ARE COMMONLY USED
Classifier that will determine whether the person's eyes
are Open' or 'Closed’ along with the yawning score. The The system is one instance of analysing the
classifier we developed is using Convolutional Neural productivity by detecting the exhaustion of a person. The
Networks (CNN). A convolutional neural network is a system also works well by reducing the accidents happening
sort of deep neural network that is particularly effective on road because of fatigue of the driver. Enforced in Ford
for image categorisation.[8] cars into the Driver Assistant. This analyses fast steering
Movements, walking, erratic and sudden braking or
This system has been designed in order to reduce acceleration on lines dividing lanes. The system collects and
accidents in most of the industries be it construction analyses this data, assigns one of the 5-degree concentration
sites, roads, etc. as most of the accidents happen because levels to the driver (5- the driver is centred, drives correctly,
of fatigue. Hence this a system will alert the person 1- the driver is very tired, should stop driving and rest
before it gets too late. The system is capable of immediately) [2].
calculating the accurate position of the eye. [5]
PERCLOS is a somnolence detection technology that
I. INTRODUCTION measures the percentage of closed eyes over the pupil over
time, rather than blinks, and reflects these closures or drops.
Analysis of productivity is a technology capable of [3] Different real-time operator somnolence detection
avoiding unbearable productivity losses that can affect the systems use PERCLOS evaluation and specially designed
name and fame of an organization because of exertion. Also, algorithms to determine the onset of fatigue. Each techno
road accidents and poor workplace results are often caused uses a unique set-up and combination of hardware.
by exhaustion. More and more occupations need long-term
focus nowadays. Drivers must keep an open eye on the lane, Electroencephalography is a tool that non-invasively
so they can quickly respond to unexpected events. In many reports electrical brain activity. It was discovered in 1924 by
traffic accidents, driver exhaustion also becomes a direct Hans Berger and developed to the advanced technology of
cause. There is also a need to improve systems to identify today over more than 90 years [4]. A drastic decrease in
and warn a driver of a bad neuropsychological situation, EEG instrumentation scale, weight and cost, and the ability
which could dramatically reduce the number of car to interact wirelessly with other digital systems paved the
accidents associated with exhaustion. [1] way for the technology to be applied to previously
unsuspected areas, such as entertainment, bio-feedback, and
The aim of this Python project is to develop a learning and memory support.
productivity analyser system that will detect that whether
the eyes of an individual is closed and if he is yawning or To identify and monitor the operator's facial features,
not. This device will warn you when it senses fatigue. the computer vision system uses an unobtrusive dashboard-
Exhaustion presents a serious risk of causing injuries that mounted camera and two infra-red illumination sources. Eye
are potentially fatal. closes and head poses are analysed by the machine to assess
the early onset of exhaustion and diversion.
Works previously attempted to address the issues of
productivity losses by detecting fatigue was done using AVECLOS is determined by the fatigue sensing
feature extraction-based techniques like Har cascade algorithm. This is the percentage of time over one minute
classifiers. This technique provides faster detection, but the that the eyes are completely closed.[5]
problem is that they are more sensitive to illumination
Step 1 – Face Detection Step 3 – Detect the eyes from ROI and feed it to the
Taking input from our camera is the first sub step in classifier
this. So, an infinite loop has been made to access the To detect the eyes, the same technique is used to detect
webcam that will catch each frame. Then we have used a faces. First, in leye and reye, we set our CNN binary
learning-based technique for face detection on the basis of classifier for eyes. We only need to extract the eye info from
Har-like features of Viola and Jones and cascade classifiers. the entire image now. This may be accomplished by deleting
the eye's border box, and then using this code, we can
Step 2 – Detect Face in the Image and Create a Region of extract the eye image from the frame. l eye solely includes
Interest (ROI) the eye's picture data [9]. This data will be sent into our
An integral image is used to reduce the initial image CNN classifier, which will predict whether or not the eyes
processing required for face detection and compute the are open. Similarly, we will be extracting the right eye into
rectangle features correctly and efficiently. The value of r_eye[7][8].
integral image at point (x, y) can be calculated in one pass
over the original image which will be equal to the sum of all Step 4 – Classifier will Categorize whether Eyes are
pixels above and to the left of it. This will return an array of Open or Closed
detections with the x, y, and height coordinates of the To predict eye status, we use our CNN Binary
object's border box width. We can now go through the faces classifier. We must execute such procedures in order to feed
and draw boundary boxes for each one [8]. our image into the model, as the model requires accurate
measurements to begin with. With our model, we are now
predicting each eye lpred = model.predict(l_eye) classes [8].
Step 5 – Start Calculating Score after mouth localization Step 6 – Detecting Mouth Localization
to Check whether Person is Exhausted (i)Detect facial edge using gradient edge detector .
The score is simply a value that we are going to use to (ii)Compute vertical projection on the half lower face edge
assess how long the individual has closed his eyes. So, if by Vproj(j) = ∑i grad(i,j), where grad symbolises the image
both eyes are closed, we will continue to raise the score, and gradient and represent the ith row and jth column,
we will decrease the score when the eyes are open. Using respectively. This phase seeks to identify the borders of the
the cv2.putText() feature, which will show the person's real- right and left mouth regions.
time status, we draw the result on the screen. For example, if (iii)Compute horizontal projection to resulting gradient
the score is greater than 15, a threshold is established, which region according to Hproj(j) = ∑i grad(i,j), to obtain the
means that the eyes of the individual are closed for a long upper and lower limits of the mouth and then the mouth
localized region
3.3. Proposed architecture of application The model recognises and extracts facial landmarks
This section describes and illustrates the architecture from the image, then passes the data to the trained model,
of the implemented solution in Fig.2. [9] The user's face is which analyses the user's state or level of weariness. Finally,
captured by the camera. It will run the ML model after if the result reveals that the user is exhausted, the application
shooting the photo and decide if the user is weary or not will alert the user. Finally, if the result reveals that the user
depending on the score generated. is exhausted, the programme will notify the user.
S. No Category Accuracy
Good light with
1 88.241
glasses
Low light without
2 81.35
glasses
3 Low light with glasses 77.262
Good light without
4 88.137
glasses
Average 83.747
Table 1. Accuracy w.r.t. different condition
V. CONCLUSION