You are on page 1of 20

AN IMPROVED FATIGUE DETECTION SYSTEM

BASED ON BEHAVIORAL CHARACTERISTICS


OF DRIVER USING OPEN CV
ABSTRACT
With driver fatigue continues to cause serious and deadly car and motorcycles accidents, the need
for automatically recognizing driver fatigue and alerting the drivers is apparent. Although various
approaches that explore physiological and physical factors to classify driver fatigue have been
developed, the overall accuracy, recognition speed, distraction in the driving process and the cost of
these systems still need to be improved. In this paper, we present a low-cost driver fatigue level
prediction framework (DFLP) for detecting driver fatigue in its earliest stages. DFLP predicts drive
fatigue based on eyes, mouth, and head behaviour cues using a non-physical contact sensor input
(infrared radiation) (IR) camera. DFLP classifies the level of drowsiness and attributes the level of
altering accordingly. To validate the proposed fatigue prediction framework, we conducted the
experiment using real datasets under night and day illumination conditions.
EXISTING SYSTEM

Existing system :
1. Neural network

2. LBP feature extraction

3. SVM (support vector machine )

Drawback for existing :

We won’t get proper accurate

Feature’s less with local binary pattern


PROPOSED SYSTEM
 Input video Advantages :
 Pre-processing 1. High accuracy
 cascade classifier 2. In this we will extract the features properly
 feature extraction
 Classification of fatigue person
Disadvantages :
Software :PYTHON OPENCV
3. The facial recognition system is highly sensitive to pose
variations

4. The movement of head or different camera positions can


cause changes of facial texture and it will generate the
wrong result
FEASIBILITY STUDY
The feasibility of the project is analyzed in this phase and business proposal is put forth with a very
general plan for the project and some cost estimates. During system analysis the feasibility study of the
proposed system is to be carried out. This is to ensure that the proposed system is not a burden to the
company. For
feasibility analysis, some understanding of the major requirements for the system is essential.

Three key considerations involved in the feasibility analysis are

1. ECONOMICAL FEASIBILITY
2. TECHNICAL FEASIBILITY
3. SOCIAL FEASIBILITY
REQUIREMENTS
Software requirements​ Hardware requirements​

• Python • RAM -- 4GB


• Anaconda • OS -- Windows 7, 8 and 10 (32 and 64 bit) ​
• Jupyter Notebook •​Hard Disk --20GB
• Key Board -- Standard Windows Key board
• Mouse -- Two or Three Button Mouse
• Monitor -- SVGA
MODULES
1.Data Collection and Preprocessing:
1. Collect video data from in-car cameras or external sources.
2. Preprocess video frames to enhance image quality and reduce noise.
3. Extract relevant facial and behavioral features, such as eye movement, head pose, and facial
expressions.
2.Face Detection and Tracking:
1. Utilize OpenCV's face detection algorithms (e.g., Haar cascades or deep learning-based methods) to
locate the driver's face in each frame.
2. Implement face tracking to follow the driver's face as it moves within the frame.
3.Eye Gaze Tracking:
1. Employ OpenCV or specialized libraries for eye detection and tracking.
2. Calculate the direction of the driver's gaze and monitor for signs of drowsiness or distraction.
4.Head Pose Estimation:
1. Estimate the driver's head pose (e.g., yaw, pitch, and roll angles) to detect unusual head movements
that might indicate fatigue or distraction.
SYSTEM ARCHITECTURE
UML DIAGRAMS
The Unified Modeling Language (UML) is used to specify, visualize, modify, construct and
document the artifacts of an object-oriented software intensive system under development. UML
offers a standard way to visualize a system's architectural blueprints, including elements such as:
● actors
● business processes
● (logical) components
● activities
● programming language statements
● database schemas, and
● Reusable software components.
USE CASE DIAGRAM
import module

• UML is a standard language for specifying, visualizing,


Input image

constructing, and documenting the artifacts of software selection

systems. Pre-process

• UML was created by Object Management Group (OMG) U


segmentation

and UML 1.0 specification draft was proposed to the e


r Feature extraction

OMG in January 1997.


Data base

• OMG is continuously putting effort to make a truly


Data base
training
industry standard.
Result

• UML stands for Unified modelling Language.

• UML is a pictorial language used to make software blue


prints
CLASS DIAGRAM

The class diagram is the main building block of


object-oriented modelling. It is used for general
user INPUT Feature extraction
conceptual modelling of the systematic of the Pre-
process
+i
application, and for detailed modelling m
p
+p
roc
+f
ea
or es tur
s() e(
translating the models into programming code. t(
) )

Class diagrams can also be used for data Data


Result Algorithm base

modelling. The classes in a class diagram


+ +
represent both the main elements, interactions in b
u
d
a
il t

the application, and the classes to be d


(
a
(
) )

programmed.
SEQUENCE DIAGRAM

Sequence Diagrams Represent the objects participating user Pre-step


Feature
Data algorithm
the interaction horizontally and time vertically. A Use Extractio base
result

Case is a kind of behavioural classifier that represents a 1


import
:

declaration of an offered behaviour. Each use case ()


2 :
load
specifies some behaviour, possibly including variants that ()
3
preprocessing
:

the subject can perform in collaboration with one or more () 4


operations
:

actors. Use cases define the offered behaviour of the ()


5 :
build
subject without reference to its internal structure. ()

6 :
result
()
ACTIVITY DIAGRAM

Activity diagrams are graphical representations of


Input

Workflows of stepwise activities and actions with support


Pre-
for choice, iteration and concurrency.In the Unified process

modelling Language, activity diagrams can be used to


describe the business and operational step-by-step preprocess Feature
extraction database

workflows of components in a system. An activity diagram


shows the overall flow of control.
Algorithm with
result
TESTING

Software testing is an investigation conducted to provide stakeholders with information about the quality of
the product or service under test. Software Testing also provides an objective, independent view of the
software to allow the business to appreciate and understand the risks at implementation of the software. Test
techniques include, but are not limited to, the process of executing a program or application with the intent of
finding software bugs​
TEST CASES
Test case1:(packages testing)
Input: downloading packages in interactive mode
Output: importing packages in script mode

Test case2: (IDLE testing)


Input : user execution in IDLE
Output: Ip camera in command prompt

Test case3:(data process)


Input : load data
Output: load data and display data in output code
TESTING METHODS
Functional Testing: ​

Functional testing provide systematic demonstrations that functions tested are available as specified by the
business and technical requirements, system documentation, and user manuals. ​
Functions: Identified functions must be exercised. ​
Output: Identified classes of software outputs must be exercised. ​
Systems/Procedures: system should work properly ​

Integration Testing :​

Software integration testing is the incremental integration testing of two or more integrated software
components on a single platform to produce failures caused by interface defects. ​
Test Case for Excel Sheet Verification: ​
Here in machine learning we are dealing with dataset which is in excel sheet format so if any test case we
need means we need to check excel file. Later on classification will work on the respective columns
of dataset​
FUTURE ENHANCEMENT
In this process detection of drowsiness obtained by using video streaming based on the driver position
at the time of driving here detection starts when vehicle starts at the time of driving only it detects for
the future purpose we can use this detection for the rest of position also that means we have to add
another features for this purpose. Detection can also be applied for sleeping at the time of vehicle and
human rest position also. For the next generation we can detect the other living things position also by
using this process accidents will be avoided here we can implement detection for the different type of
applications.
CONCLUSION
In this study, we have demonstrated the potential of OpenCV as a powerful tool for real-time fatigue
detection, particularly in the context of driver safety. Fatigue-related accidents on the road are a
significant concern, and our approach offers a promising solution to mitigate this risk.Through the
use of OpenCV, we harnessed the capabilities of computer vision to continuously monitor a driver's
facial expressions and eye movements. The system effectively identified key indicators of fatigue,
including drooping eyelids, frequent blinking, and head nodding. Additionally, it analyzed gaze
direction and facial expressions to provide a comprehensive assessment of the driver's sta One of the
key strengths of our approach lies in its real-time nature, allowing for immediate alerting of the
driver when signs of fatigue are detected. By providing timely warnings, we aim to reduce the
likelihood of accidents caused by drowsy driving.
REFARENCES
Y. Chen, D. Zhao and G. He, "Deep Learning-Based Fatigue Detection for Online Learners," 2022 5th
International Conference on Pattern Recognition and Artificial Intelligence (PRAI), 2022, pp. 924-927,
doi: 10.1109/PRAI55851.2022.9904096.

J. Gebauer, P. Šofer and M. Jurek, "The System for Fatigue Crack Propagation Detection Based on Machine
Vision," 2021 22nd International Carpathian Control Conference (ICCC), 2021, pp. 1-4, doi:
10.1109/ICCC51557.2021.9454600.

G. Liu, D. Yan and Z. Chen, "Research on Early Warning of Driver Fatigue Status Based on Image
Processing," 2021 33rd Chinese Control and Decision Conference (CCDC), 2021, pp. 2678-2681, doi:
10.1109/CCDC52312.2021.9601394.

You might also like