0% found this document useful (0 votes)
10 views68 pages

Federated Learning Based Face and Eye Blink Recognition: Mini Project Report

This mini project report presents a Federated Learning-based system for face and eye blink recognition, aimed at enhancing privacy and security in biometric authentication. The approach utilizes decentralized training of machine learning models, ensuring sensitive biometric data remains on users' devices, thus mitigating risks of data breaches. The report includes a comprehensive methodology, literature survey, and evaluation of the proposed system's performance compared to traditional centralized methods.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views68 pages

Federated Learning Based Face and Eye Blink Recognition: Mini Project Report

This mini project report presents a Federated Learning-based system for face and eye blink recognition, aimed at enhancing privacy and security in biometric authentication. The approach utilizes decentralized training of machine learning models, ensuring sensitive biometric data remains on users' devices, thus mitigating risks of data breaches. The report includes a comprehensive methodology, literature survey, and evaluation of the proposed system's performance compared to traditional centralized methods.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A

MINI PROJECT REPORT


ON

FEDERATED LEARNING BASED FACE AND


EYE BLINK RECOGNITION
Submitted in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
in

COMPUTER SCIENCE AND ENGINEERING


By

P. AKSHITH REDDY -- 21Q91A05A6


S. VARUN -- 21Q91A05B4
K. UDAY -- 21Q91A0588
P. PRINCY -- 21Q91A05A9

Under the guidance of


Mrs. Sashwati Acharya
Assistant Professor

2024-2025
This is to certify that the Mini Project report on “FEDERATED LEARNING BASED
FACE AND EYE BLINK RECOGNITION” is successfully done by the following students of
Department of Computer Science & Engineering of our college in partial fulfilment of the
requirement for the award of [Link] degree in the year 2024-2025. The results embodied in this
report have not been submitted to any other University for the award of any diploma or degree.
PARVATH REDDY AKSHITH REDDY : 21Q91A05A6

SHANKAROLLA VARUN : 21Q91A05B4

KOMMU UDAY : 21Q91A0588

PERKA PRINCY : 21Q91A05A9

Submitted for the viva voice examination held on:

INTERNAL GUIDE HOD


[Link] Acharya Dr. [Link]
[Link] Professor

Internal Examiner External Examiner

I
DECLARATION

We are the final year students are hereby declaring that the mini project report entitled
“federated learning based face and eye blink recognition” has done by us under the guidance of
Mrs. Sashwati Acharya Assistant Professor, Department of CSE is submitted in the partial
fulfillment of the requirements for the award of the degree of BACHELOR OF TECHNOLOGY
in COMPUTER SCIENCE AND ENGINEERING.
The Results embedded in this project report have not been submitted to any other University or
institute for the award of any degree or diploma.

Signature of the candidate:

P. AKSHITH REDDY -- 21Q91A05A6


S. VARUN -- 21Q91A05B4
K. UDAY -- 21Q91A0588
P. PRINCY -- 21Q91A05A9

DATE:
PLACE: Maisammaguda

II
ACKNOWLEDGEMENT

First and foremost, we would like to express our immense gratitude towards our institution
Malla Reddy College of Engineering, which helped us to attain profound technical skills in the
field of Computer Science & Engineering, there by fulfilling our most cherished goal.

We are pleased to thank Sri Ch. Malla Reddy, our Founder, Chairman MRGI, Sri Ch.
Mahender Reddy, Secretary, MRGI for providing this opportunity and support throughout the
course.

It gives us immense pleasure to acknowledge the perennial inspiration of Dr. M. Ashok our
beloved principal for his kind co-operation and encouragement in bringing out this task.

We would like to thank Dr. T. V. Reddy our vice principal, Dr. G. Manjunath HOD, CSE
Department for their inspiration adroit guidance and constructive criticism for successful
completion of our degree.

We would like to thank Mrs. Sashwati Acharya, Assistant Professor our internal guide, for her
valuable suggestions and guidance during the exhibition and completion of this project.

Finally, we avail this opportunity to express our deep gratitude to all staff who have contribute
their valuable assistance and support making our project success.

P. AKSHITH REDDY -- 21Q91A05A6


S. VARUN -- 21Q91A05B4
K. UDAY -- 21Q91A0588
P. PRINCY -- 21Q91A05A9

III
ABSTRACT

In the era of rapidly advancing technology, the need for robust and privacy-
preserving biometric authentication systems has become paramount. Federated
Learning (FL) offers a promising solution by enabling machine learning models
to be trained across multiple decentralized devices while keeping data localized.
This paper presents a novel approach to face and eye blink recognition using
Federated Learning, aimed at enhancing security and privacy in biometric
authentication systems.
Our proposed system leverages the decentralized nature of Federated Learning to
train face and eye blink recognition models across a network of devices without
transferring raw data to a central server. By doing so, it ensures that sensitive
biometric data remains on the user's device, significantly reducing the risk of data
breaches and enhancing user privacy.
The face and eye blink recognition models are trained using convolutional neural
networks (CNNs) that can effectively capture and analyze facial features and
blinking patterns.

Keywords: Federated Learning, Convolutional Neural Network, Recurrent Neural Network.

IV
TABLE OF CONTENTS

CERTIFICATE i

DECLARATION ii

ACKNOWLEDGEMENT iii

ABSTRACT iv

TABLE OF CONTENTS v

LIST OF FIGURES vii

LIST OF SCREENSHOTS viii

LIST OF ABBREVATIONS ix

CHAPTER 1: INTRODUCTION
1.1 Introduction 2
1.2 Objective 3
1.3 Methodology Adopted 3
CHAPTER 2: LITERATURE SURVEY
2.1 Literature survey 6
CHAPTER 3: SYSTEM ANALYSIS
3.1 Existing System 10
3.2 Drawbacks 10
3.3 Proposed system 11
3.4 Advantages 12
3.5 System Requirements 12
3.6 Feasibility study 13
CHAPTER 4: SYSTEM DESIGN
4.1 System Architecture 16
4.2 Modules 17
4.3 UML Diagrams 17
CHAPTER 5: SYSTEM IMPLEMENTATION
5.1 Python 24

V
5.2 History of python 27
5.3 What is Machine Learning 28
5.4 Modules used in Python 32
CHAPTER 6: TESTING
6.1 Testing 43
6.2 Testing Methodologies 45

CHAPTER 7: RESULTS
7. Screenshots 47
CHAPTER 8: CONCLUSION
8. Conclusion 54
CHAPTER 9: FUTURE ENHANCEMENTS
9. Future Enhancements 56

REFERENCES 57

VI
LIST OF FIGURES

Figure Name of the Figure Page


No No

4.1.1 System Architecture 16

4.3.1 Use Case Diagram 18

4.3.2 Class Diagram 19


4.3.3 Sequence Diagram 20
4.3.4 Flow chart diagram 21
4.3.5 Data flow diagram 22

VII
LIST OF SCREENSHOTS

Figure Name of Screenshot Page


No No

5.5.1 Python 35
7.1 Command prompt 47
7.2 Train model with given face and username 47
7.3 Press ‘face Detection’ button to get below output 48

7.4 Press ‘q’ key to train face model 48


7.5 Face registration completed and now click on Eye blink 49
7.6 Press ‘q’ key to train model 49
7.7 Eye blink training completed and click on Federated
update model to server button 50
7.8 Updating completed and click on face authentication 50
7.9 Click ‘q’ key to authenticate face 51
7.10 Webcam will started to detect eye blinks 51
7.11 Count and once user recognized 52
7.12 U can see both face and eye blink pattern recognized 52

VIII
LIST OF ABBREVIATIONS

S. No Short Form Full Form


1. CNN Convolutional Neural Networks
2. SN Social Network
3. ML Machine Learning
4. RNN Recurrent Neural Networks
5. PCA Principal Component Analysis
6. UML Unified Modelling Language
7. DFD Data flow Diagram

IX
FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 1
INTRODUCTION

MRCE DEPARTMENT OF CSE 1


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

1.1 INTRODUCTION

In recent years, biometric authentication has become an integral part of various


security systems, ranging from unlocking smartphones to accessing secure
facilities. Among the various biometric modalities, face and eye blink recognition
stand out due to their non-intrusive nature and high accuracy. However, the
widespread adoption of these technologies raises significant privacy concerns, as
traditional centralized training methods require the collection and storage of
sensitive biometric data on central servers. This centralization poses a risk of data
breaches and misuse, highlighting the need for privacy-preserving solutions.
Federated Learning (FL) emerges as a promising approach to address these
privacy issues. FL allows machine learning models to be trained across multiple
decentralized devices without the need to transfer raw data to a central server.
Instead, only model updates are shared, ensuring that the data remains on the
user’s device. This decentralized approach not only enhances data privacy but
also leverages the computational power and diverse data sources of edge devices.
This paper proposes a Federated Learning-based system for face and eye blink
recognition aimed at improving the security and privacy of biometric
authentication systems. Our approach utilizes convolutional neural networks
(CNNs) to effectively capture and analyse facial features and blinking patterns.
By training these models in a federated manner, we ensure that sensitive biometric
data never leaves the user’s device, significantly mitigating the risk of data
breaches. We present a detailed methodology for implementing the Federated
Learning framework, including the architecture of the CNN models and the
aggregation of model updates from multiple devices to form a global model.
Additionally, we conduct extensive experiments using benchmark datasets to
evaluate the performance of our system. The results are compared with traditional
centralized training methods to demonstrate the efficacy and robustness of the

MRCE DEPARTMENT OF CSE 2


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

proposed approach. The goal of this research is to develop a secure and privacy
preserving face and eye blink recognition system that maintains high accuracy
and reliability.

1.2 OBJECTIVE

The primary objective is to identify and flag fake or fraudulent profiles on the social network.
This includes accounts created with deceptive intentions, such as spreading misinformation,
engaging in scams, or impersonating others. Enhance the safety and security of legitimate
users by reducing their exposure to potentially harmful or malicious fake profiles. This helps
protect users from various risks, including fraud, harassment, and privacy breaches. Trust and
Credibility: Improve the trustworthiness and credibility of the social platform by minimizing
the presence of fake profiles. This fosters a more reliable and trustworthy environment for
users and can lead to increased user satisfaction and engagement. Enhance the quality of
content and interactions on the platform by reducing the influence of fake profiles that may
engage in spam, the dissemination of false information, or the promotion of low-quality
content.

1.3 METHODOLOGY ADOPTED

• Data Collection: Gather a diverse and representative dataset that includes both genuine
and fake profiles. Collect information such as user profiles, posts, comments,
connections, and other relevant data from the social network.
• Data Preprocessing: Clean and preprocess the collected data to handle missing values,
remove noise, and standardize formats. Tokenize and vectorize text data for NLP tasks.
Extract relevant features from user profiles, posts, and other relevant information.
• Feature Engineering: Identify and create meaningful features that can help distinguish
between genuine and fake profiles. Features may include linguistic patterns, posting
frequency, connection networks, and other behavioural attributesmjkn.
• Labelling: Annotate the dataset with labels indicating whether each profile is genuine or
fake.

MRCE DEPARTMENT OF CSE 3


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

• Model Selection: Choose appropriate machine learning algorithms for the classification
task.
• Training the Model: Train the selected machine learning model on the labelled dataset
using the identified features. Use a portion of the data for training and reserve another
portion for validation and testing.
• NLP Analysis: Apply NLP techniques to analyse textual data associated with profiles,
posts, and comments. Identify linguistic patterns, sentiment analysis, and other relevant
NLP features that can contribute to the model's accuracy.
• Model Evaluation: Evaluate the performance of the trained model using metrics such as
accuracy, precision, recall, F1 score, and area under the ROC curve. Fine-tune the model
based on the evaluation results to improve its performance.
• Cross-Validation: Perform cross-validation to ensure the model's robustness and
generalization to unseen data. Adjust hyperparameters and features based on cross
validation results.
• Deployment: Integrate the trained model into the social network platform for real time or
periodic monitoring. Implement an alert system to notify administrators of potential fake
profiles.
• Continuous Monitoring and Updating: Regularly update the model to adapt to changing
patterns of fake profile creation. Monitor the system's performance over time and make
adjustments as needed.
• Documentation and Reporting: Document the entire methodology, including data sources,
preprocessing steps, feature engineering, model selection, and evaluation metrics. Provide
regular reports on the performance and effectiveness of the fake profile identification
system.

MRCE DEPARTMENT OF CSE 4


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 2
LITERATURE SURVEY

MRCE DEPARTMENT OF CSE 5


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

2.1 LITERARTURE SURVEY


The field of biometric authentication, particularly face and eye blink recognition,
has seen significant advancements in recent years. Traditional methods typically
involve centralized machine learning models trained on large datasets collected
from various users. While these centralized approaches have demonstrated high
accuracy, they also pose substantial privacy risks due to the centralized storage
and processing of sensitive biometric data. This literature survey explores the
evolution of face and eye blink recognition technologies, the privacy concerns
associated with them, and the emergence of Federated Learning as a solution.

Face Recognition Technologies


Face recognition systems have become a cornerstone of modern biometric
authentication due to their non-intrusive nature and high accuracy. Early methods
focused on feature extraction techniques such as Eigenfaces and Fisher faces,
which rely on principal component analysis (PCA) and linear discriminant
analysis (LDA) respectively. These methods have evolved with the advent of deep
learning, particularly convolutional neural networks (CNNs), which can
automatically learn hierarchical features from raw pixel data. Notable
advancements include the development of architectures like VGGFace, FaceNet,
and DeepFace, which have set new benchmarks for accuracy and robustness in
face recognition tasks.

Eye Blink Detection


Eye blink detection serves as an additional layer of security in biometric systems,
providing liveness detection to distinguish between real users and spoofing
attacks using photographs or videos. Traditional approaches to eye blink detection
involved the use of optical flow techniques and threshold-based methods to detect

MRCE DEPARTMENT OF CSE 6


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

changes in the eye region over time. Recent advances leverage machine learning
and deep learning techniques, such as recurrent neural networks (RNNs) and
CNNs, to accurately model and detect blinking patterns in real-time video
streams.

Privacy Concerns in Centralized Biometric Systems


Centralized biometric systems, while effective, raise significant privacy concerns.
The collection, storage, and processing of biometric data in central repositories
create attractive targets for cyber-attacks. High-profile data breaches, such as
those affecting biometric databases, underscore the vulnerability of centralized
systems and the potential for misuse of sensitive information. Regulatory
frameworks, such as the General Data Protection Regulation (GDPR), emphasize
the need for stringent data protection measures, further highlighting the
challenges associated with centralized biometric data processing.

Federated Learning
Federated Learning (FL) is an emerging machine learning paradigm designed to
address privacy concerns by enabling the training of models across decentralized
devices. In FL, data remains on the user’s device, and only model updates are
shared and aggregated on a central server. This approach significantly reduces the
risk of data breaches and aligns with privacy regulations by ensuring that raw data
never leaves the local device. Federated Learning has been successfully applied
in various domains, including natural language processing, healthcare, and
mobile applications, demonstrating its potential to balance privacy and
performance.

MRCE DEPARTMENT OF CSE 7


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Federated Learning in Biometric Authentication


Applying Federated Learning to biometric authentication, particularly face and
eye blink recognition, is a novel approach that combines the strengths of
decentralized data processing with the sophisticated pattern recognition
capabilities of deep learning models. Recent studies have explored the feasibility
of FL for face recognition, highlighting the challenges and opportunities in
implementing FL for real-time biometric applications. These studies demonstrate
that FL can achieve competitive performance while providing superior privacy
protection compared to traditional centralized methods.

Conclusion
The literature survey underscores the evolution of face and eye blink recognition
technologies, the privacy challenges of centralized biometric systems, and the
promising potential of Federated Learning to address these challenges. By
leveraging FL, the proposed system aims to enhance the security and privacy of
biometric authentication, paving the way for more secure and privacy-preserving
applications in various domains. This survey sets the foundation for the proposed
research, highlighting the need for innovative solutions that balance accuracy,
security, and privacy in biometric authentication systems.

MRCE DEPARTMENT OF CSE 8


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 3
SYSTEM ANALYSIS

MRCE DEPARTMENT OF CSE 9


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

3.1 EXISTING SYSTEM

Traditional face and eye blink recognition systems predominantly rely on


centralized machine learning approaches, where large datasets of biometric
information are collected from users and stored on central servers for training
models. These centralized systems utilize deep learning techniques, such as
convolutional neural networks (CNNs), to achieve high accuracy in recognizing
facial features and detecting eye blinks. Popular frameworks like VGGFace,
FaceNet, and OpenFace have been widely adopted for face recognition, while
recurrent neural networks (RNNs) and optical flow techniques are commonly
used for eye blink detection. Although these systems are effective in terms of
performance, they pose significant privacy risks. The centralized storage and
processing of sensitive biometric data make these systems vulnerable to data
breaches and unauthorized access. High-profile incidents of data breaches
involving biometric databases highlight the critical need for more secure and
privacy-preserving approaches. Additionally, centralized systems often fail to
comply with stringent data protection regulations, such as the General Data
Protection Regulation (GDPR), which mandates strict controls over the collection
and processing of personal data. These privacy concerns necessitate the
exploration of decentralized solutions like Federated Learning, which can provide
robust biometric authentication while ensuring data privacy and security.

3.2 EXISTING SYSTEM DRAWBACKS

1. Privacy Concerns: Centralized face and eye blink recognition systems


raise significant privacy concerns due to the collection and storage of
sensitive biometric data on central servers. This centralized approach
increases the risk of data breaches and unauthorized access to personal
information.

MRCE DEPARTMENT OF CSE 10


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

2. Data Security: Centralized systems are more susceptible to cyber-attacks


and data breaches, as a single breach can compromise the entire database
of biometric information. This poses a serious risk to user privacy and
security.
3. Regulatory Compliance: Centralized systems may struggle to comply
with stringent data protection regulations, such as the General Data
Protection Regulation (GDPR), which mandate strict controls over the
collection, storage, and processing of personal data, including biometric
information

3.3 PROPOSED SYSTEM

Our proposed system aims to address the drawbacks of existing centralized face
and eye blink recognition systems by leveraging Federated Learning (FL) to
ensure data privacy and security. In our system, instead of collecting and storing
biometric data on a central server, we distribute the machine learning model
across multiple decentralized devices, such as smartphones, laptops, and IoT
devices. Each device trains the model locally using its own data and only shares
model updates with a central server, which aggregates these updates to create a
global model. For face recognition, we propose the use of convolutional neural
networks (CNNs) to extract facial features and identify individuals. These CNN
models can be trained locally on each device using images captured by the
device's camera. Similarly, for eye blink recognition, we propose the use of
recurrent neural networks (RNNs) to detect blinking patterns. These RNN
models can also be trained locally on each device using video streams captured
by the device's camera. The Federated Learning framework ensures that
sensitive biometric data, such as facial images and eye blink patterns, never
leaves the user's device, thereby mitigating privacy and security risks. Only
model updates, which are small in size and do not contain raw data, are shared
with the central server. This decentralized approach not only enhances data
privacy but also leverages the computational power of edge devices, leading to

MRCE DEPARTMENT OF CSE 11


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

faster and more efficient model training. To evaluate the performance of our
proposed system, we plan to conduct experiments using benchmark datasets for
face and eye blink recognition. We will compare the accuracy and efficiency of
our Federated Learning approach with traditional centralized methods to
demonstrate its effectiveness in maintaining privacy while achieving
comparable or superior performance.

3.4 PROPOSED SYSTEM ADVANTAGES

1. Privacy Preservation: By keeping biometric data on the user's device


and only sharing model updates, the proposed system significantly
enhances privacy protection compared to centralized systems, reducing
the risk of data breaches and unauthorized access.
2. Data Security: Decentralizing the machine learning model reduces the
risk of cyber-attacks and data breaches, as sensitive biometric data is
not stored or processed on central servers.
3. Regulatory Compliance: The proposed system aligns with stringent
data protection regulations, such as the General Data Protection
Regulation (GDPR), by minimizing the collection and storage of
personal biometric data.

3.5 SYSTEM REQUIREMENTS

3.5.1 Software Requirements

• Processor - Pentium –IV


• RAM - 4 GB (min)
• Hard Disk - 20 GB
• Key Board - Standard Windows Keyboard
• Mouse - Two or Three Button Mouse

MRCE DEPARTMENT OF CSE 12


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

• Monitor - SVGA

3.5.2 Hardware Requirements

• Operating system : Windows 7 Ultimate.

• Coding Language : Python.

• Front-End : Html, CSS, JavaScript.

• Back-End : Django-ORM

• Data Base : MySQL (WAMP Server).

3.6 FEASIBILITY STUDY

The feasibility of the project is analysed 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

• ECONOMICAL FEASIBILITY
• TECHNICAL FEASIBILITY
• SOCIAL FEASIBILITY

3.6.1 ECONOMICAL FEASIBILITY


This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.

MRCE DEPARTMENT OF CSE 13


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

3.6.2 TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical requirements
of the system. Any system developed must not have a high demand on the available technical
resources. This will lead to high demands on the available technical resources. This will lead
to high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.

3.6.3 SOCIAL FEASIBILITY

The aspect of study is to check the level of acceptance of the system by the user. This includes
the process of training the user to use the system efficiently. The user must not feel threatened
by the system, instead must accept it as a necessity. The level of acceptance by the users solely
depends on the methods that are employed to educate the user about the system and to make
him familiar with it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.

MRCE DEPARTMENT OF CSE 14


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 4
SYSTEM DESIGN

MRCE DEPARTMENT OF CSE 15


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

4.1 SYSTEM ARCHITECTURE

MRCE DEPARTMENT OF CSE 16


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

4.2 MODULES

We have implemented this project as REST based web services which consists
of following modules
1) User Login: user can login to system using username and password as
‘admin and admin’.
2) Load Design Patterns Code: after login user will run this module to upload
dataset to application
3) Code to Numeric Vector: all codes will be converted to numeric vector
which will replace each word occurrence with its average frequency.
4) Train ML Algorithms: processed numeric vector will be split into train and
test with a ratio of 80:20. 80% dataset will be input to training algorithms
to train a model and this model will be applied on 20% test data to calculate
accuracy
5) Predict Design Patterns: user will upload test source code files and then
ML algorithms will rank test file to predict accurate design patterns.

4.3 UML DIAGRAMS

UML stands for Unified Modelling Language. UML is a standardized general-purpose


modelling language in the field of object-oriented software engineering. The standard is
managed, and was created by, the Object Management Group.
The goal is for UML to become a common language for creating models of object oriented
computer software. In its current form UML is comprised of two major components: a
Metamodel and a notation. In the future, some form of method or process may also be added
to; or associated with, UML.
The Unified Modelling Language is a standard language for specifying, Visualization,
Constructing and documenting the artifacts of software system, as well as for business
modelling and other non-software systems.
The UML represents a collection of best engineering practices that have proven successful in
the modelling of large and complex systems.

MRCE DEPARTMENT OF CSE 17


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

The UML is a very important part of developing objects oriented software and the software
development process. The UML uses mostly graphical notations to express the design of
software projects.

4.3.1 USE CASE DIAGRAM:

A use case diagram in the Unified Modelling Language (UML) is a type of behavioural
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented
as use cases), and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Roles of the actors
in the system can be depicted.

Fig 4.3.1: Use case diagram.

MRCE DEPARTMENT OF CSE 18


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

4.3.2 CLASS DIAGRAM:

In software engineering, a class diagram in the Unified Modelling Language (UML) is a


type of static structure diagram that describes the structure of a system by showing the
system's classes, their attributes, operations (or methods), and the relationships among the
classes. It explains which class contains information.

Fig 4.3.2: Class Diagram.

4.3.3 SEQUENCE DIAGRAM:

A sequence diagram in Unified Modelling Language (UML) is a kind of interaction diagram


that shows how processes operate with one another and in what order. It is a construct of a
Message Sequence Chart. Sequence diagrams are sometimes called event diagrams, event
scenarios, and timing diagrams.

MRCE DEPARTMENT OF CSE 19


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 4.3.3: Sequence diagram.

4.3.4 FLOW CHART DIAGRAM:

A flowchart diagram is a visual representation of a process, system, or set of instructions


using various symbols and connectors to illustrate the sequence of steps, decision points, and
actions involved in that process. Flowcharts are commonly used in various fields, such as
business, engineering, computer programming, and other domains, to clarify and document
complex processes or workflows. The primary purpose of a flowchart is to provide a clear
and concise way to communicate how something works or how a series of tasks or decisions
are carried out. It can help users, whether they are professionals or beginners, to understand
a process and follow it systematically

MRCE DEPARTMENT OF CSE 20


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 4.3.4: Flow chat diagram

4.3.5 DATA FLOW DIAGRAM:

A Data Flow Diagram (DFD) is a graphical representation of how data flows within a system
or a process. It is a powerful tool used in systems analysis and design to model and describe
the flow of data through various processes, data stores, and data sources in a structured and
visual way. DFDs provide a clear and concise way to illustrate the inputs, outputs, and the
transformations of data as it moves through the system.

MRCE DEPARTMENT OF CSE 21


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 4.3.5: Data flow diagram.

MRCE DEPARTMENT OF CSE 22


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 5
SYSTEM IMPLEMENTATION

MRCE DEPARTMENT OF CSE 23


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

5. 1 Python
Below are some facts about Python.

Python is currently the most widely used multi-purpose, high-level programming language.
Python allows programming in Object-Oriented and Procedural paradigms. Python
programs generally are smaller than other programming languages like Java. Programmers
have to type relatively less and indentation requirement of the language, makes them
readable all the time.
Python language is being used by almost all tech-giant companies like – Google, Amazon,
Facebook, Instagram, Dropbox, Uber… etc.
The biggest strength of Python is huge collection of standard library which can be used for
the following –
• Machine Learning
• GUI Applications (like Kivy, Tkinter, PyQt etc. )
• Web frameworks like Django (used by YouTube, Instagram, Dropbox)
• Image processing (like Opencv, Pillow)
• Web scraping (like Scrapy, BeautifulSoup, Selenium)
• Test frameworks
• Multimedia

Advantages of Python

Let’s see how Python dominates over other languages.


1. Extensive Libraries

Python downloads with an extensive library and it contain code for various purposes like
regular expressions, documentation-generation, unit-testing, web browsers, threading,
databases, CGI, email, image manipulation, and more. So, we don’t have to write the
complete code for that manually.
2. Extensible

As we have seen earlier, Python can be extended to other languages. You can write some of
your code in languages like C++ or C. This comes in handy, especially in projects.
3. Embeddable

MRCE DEPARTMENT OF CSE 24


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Complimentary to extensibility, Python is embeddable as well. You can put your Python
code in your source code of a different language, like C++. This lets us add scripting
capabilities to our code in the other language.

4. Improved Productivity

The language’s simplicity and extensive libraries rende programmers more productive than
languages like Java and C++ do. Also, the fact that you need to write less and get more
things done.
5. IOT Opportunities

Since Python forms the basis of new platforms like Raspberry Pi, it finds the future bright for
the Internet Of Things. This is a way to connect the language with the real world.

6. Simple and Easy

When working with Java, you may have to create a class to print ‘Hello World’. But in
Python, just a print statement will do. It is also quite easy to learn, understand, and code.
This is why when people pick up Python, they have a hard time adjusting to other more
verbose languages like Java.
7. Readable

Because it is not such a verbose language, reading Python is much like reading English.
This is the reason why it is so easy to learn, understand, and code. It also does not need
curly braces to define blocks, and indentation is mandatory. This further aids the readability
of the code.
8. Object-Oriented

This language supports both the procedural and object-oriented programming paradigms.
While functions help us with code reusability, classes and objects let us model the real
world. A class allows the encapsulation of data and functions into one.

MRCE DEPARTMENT OF CSE 25


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

9. Free and Open-Source

Like we said earlier, Python is freely available. But not only can you download Python for
free, but you can also download its source code, make changes to it, and even distribute
it. It downloads with an extensive collection of libraries to help you with your tasks.
10. Portable

When you code your project in a language like C++, you may need to make some changes
to it if you want to run it on another platform. But it isn’t the same with Python. Here, you
need to code only once, and you can run it anywhere. This is called Write Once Run
Anywhere (WORA). However, you need to be careful enough not to include any system
dependent features.
11. Interpreted

Lastly, we will say that it is an interpreted language. Since statements are executed one by
one, debugging is easier than in compiled languages.

Disadvantages of Python

So far, we’ve seen why Python is a great choice for your project. But if you choose it, you
should be aware of its consequences as well. Let’s now see the downsides of choosing
Python over another language.
1. Speed Limitations

We have seen that Python code is executed line by line. But since Python is interpreted, it
often results in slow execution. This, however, isn’t a problem unless speed is a focal point
for the project. In other words, unless high speed is a requirement, the benefits offered by
Python are enough to distract us from its speed limitations.
2. Weak in Mobile Computing and Browsers

While it serves as an excellent server-side language, Python is much rarely seen on the
client-side. Besides that, it is rarely ever used to implement smartphone-based applications.
One such application is called Carbonnelle.
The reason it is not so famous despite the existence python is that it isn’t that secure.

MRCE DEPARTMENT OF CSE 26


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

3. Design Restrictions

As you know, Python is dynamically-typed. This means that you don’t need to declare the
type of variable while writing the code. It uses duck-typing. But wait, what’s that? Well, it
just means that if it looks like a duck, it must be a duck. While this is easy on the
programmers during coding, it can raise run-time errors.
4. Underdeveloped Database Access Layers

Compared to more widely used technologies like JDBC (Java DataBase


Connectivity) and ODBC (Open DataBase Connectivity), Python’s database access layers are
a bit underdeveloped. Consequently, it is less often applied in huge enterprises.
5. Simple

No, we’re not kidding. Python’s simplicity can indeed be a problem. Take my example. I
don’t do Java, I’m more of a Python person. To me, its syntax is so simple that the verbosity
of Java code seems unnecessary.

This was all about the Advantages and Disadvantages of Python Programming Language.

5.2 History of Python

What do the alphabet and the programming language Python have in common? Right, both
start with ABC. If we are talking about ABC in the Python context, it's clear that the
programming language ABC is meant. ABC is a general-purpose programming language
and programming environment, which had been developed in the Netherlands, Amsterdam,
at the CWI (Centrum Wiskunde &Informatica). The greatest achievement of ABC was to
influence the design of [Link] was conceptualized in the late 1980s. Guido van
Rossum worked that time in a project at the CWI, called Amoeba, a distributed operating
system. In an interview with Bill Venners1, Guido van Rossum said: "In the early 1980s, I
worked as an implementer on a team building a language called ABC at Centrum voor
Wiskunde en Informatica (CWI). I don't know how well people know ABC's influence on
Python. I try to mention ABC's influence because I'm indebted to everything I learned
during that project and to the people who worked on it."Later on in the same Interview,
Guido van Rossum continued: "I remembered all my experience and some of my frustration

MRCE DEPARTMENT OF CSE 27


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

with ABC. I decided to try to design a simple scripting language that possessed some of
ABC's better properties, but without its problems. So I started typing. I created a simple
virtual machine, a simple parser, and a simple runtime. I made my own version of the
various ABC parts that I liked. I created a basic syntax, used indentation for statement
grouping instead of curly braces or begin-end blocks, and developed a small number of
powerful data types: a hash table (or dictionary, as we call it), a list, strings, and numbers."

5.3 What is Machine Learning


Before we take a look at the details of various machine learning methods, let's start by
looking at what machine learning is, and what it isn't. Machine learning is often categorized
as a subfield of artificial intelligence, but I find that categorization can often be misleading
at first brush. The study of machine learning certainly arose from research in this context,
but in the data science application of machine learning methods, it's more helpful to think
of machine learning as a means of building models of data.

Fundamentally, machine learning involves building mathematical models to help


understand data. "Learning" enters the fray when we give these models tunable parameters
that can be adapted to observed data; in this way the program can be considered to be
"learning" from the data. Once these models have been fit to previously seen data, they can
be used to predict and understand aspects of newly observed data. I'll leave to the reader
the more philosophical digression regarding the extent to which this type of mathematical,
model-based "learning" is similar to the "learning" exhibited by the human brain.
Understanding the problem setting in machine learning is essential to using these tools
effectively, and so we will start with some broad categorizations of the types of approaches
we'll discuss here.

Need for Machine Learning


Human beings, at this moment, are the most intelligent and advanced species on earth
because they can think, evaluate and solve complex problems. On the other side, AI is still
in its initial stage and haven’t surpassed human intelligence in many aspects. Then the
question is that what is the need to make machine learn? The most suitable reason for doing
this is, “to make decisions, based on data, with efficiency and scale”.

MRCE DEPARTMENT OF CSE 28


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Lately, organizations are investing heavily in newer technologies like Artificial


Intelligence, Machine Learning and Deep Learning to get the key information from data to
perform several real-world tasks and solve problems. We can call it data-driven decisions
taken by machines, particularly to automate the process. These data-driven decisions can
be used, instead of using programing logic, in the problems that cannot be programmed
inherently. The fact is that we can’t do without human intelligence, but other aspect is that
we all need to solve real-world problems with efficiency at a huge scale. That is why the
need for machine learning arises.

Applications of Machines Learning

Machine Learning is the most rapidly growing technology and according to researchers we
are in the golden year of AI and ML. It is used to solve many real-world complex problems
which cannot be solved with traditional approach. Following are some real-world
applications of ML −

• Emotion analysis

• Sentiment analysis

• Error detection and prevention

• Weather forecasting and prediction

• Stock market analysis and forecasting

• Speech synthesis
• Speech recognition

• Customer segmentation

• Object recognition

• Fraud detection

• Fraud prevention

MRCE DEPARTMENT OF CSE 29


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Advantages of Machine learning


[Link] identifies trends and patterns
Machine Learning can review large volumes of data and discover specific trends and patterns
that would not be apparent to humans. For instance, for an e-commerce website like Amazon,
it serves to understand the browsing behaviours and purchase histories of its users to help
cater to the right products, deals, and reminders relevant to them. It uses the results to reveal
relevant advertisements to them.
[Link] human intervention needed (automation)
With ML, you don’t need to babysit your project every step of the way. Since it means
giving machines the ability to learn, it lets them make predictions and also improve the
algorithms on their own. A common example of this is anti-virus softwares; they learn to
filter new threats as they are recognized. ML is also good at recognizing spam.
[Link] Improvement
As ML algorithms gain experience, they keep improving in accuracy and efficiency. This
lets them make better decisions. Say you need to make a weather forecast model. As the
amount of data you have keeps growing, your algorithms learn to make more accurate
predictions faster
[Link] multi-dimensional and multi-variety data
Machine Learning algorithms are good at handling data that are multi-dimensional and
multivariety, and they can do this in dynamic or uncertain environments.
[Link] Applications
You could be an e-tailer or a healthcare provider and make ML work for you. Where it does
apply, it holds the capability to help deliver a much more personal experience to customers
while also targeting the right customers.
Disadvantages of Machine Learning
[Link] Acquisition
Machine Learning requires massive data sets to train on, and these should be
inclusive/unbiased, and of good quality. There can also be times where they must wait for
new data to be generated.

MRCE DEPARTMENT OF CSE 30


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

[Link] and Resources


ML needs enough time to let the algorithms learn and develop enough to fulfill their purpose
with a considerable amount of accuracy and relevancy. It also needs massive resources to
function.
This can mean additional requirements of computer power for you.
[Link] of Results
Another major challenge is the ability to accurately interpret results generated by the
algorithms. You must also carefully choose the algorithms for your purpose.
[Link] Error-Susceptibility
Machine Learning is autonomous but highly susceptible to errors. Suppose you train an
algorithm with data sets small enough to not be inclusive. You end up with biased predictions
coming from a biased training set. This leads to irrelevant advertisements being displayed to
customers. In the case of ML, such blunders can set off a chain of errors that can go
undetected for long periods of time. And when they do get noticed, it takes quite some time
to recognize the source of the issue, and even longer to correct it.

Purpose
We demonstrated that our approach enables successful segmentation of intra-retinal
layers—even with low-quality images containing speckle noise, low contrast, and different
intensity ranges throughout—with the assistance of the ANIS feature.

Python
Python is an interpreted high-level programming language for general-purpose
programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant whitespace.

Python features a dynamic type system and automatic memory management. It supports
multiple programming paradigms, including object-oriented, imperative, functional and
procedural, and has a large and comprehensive standard library.

Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.

MRCE DEPARTMENT OF CSE 31


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Python is Interactive − you can actually sit at a Python prompt and interact with the interpreter
directly to write your programs.
Python also acknowledges that speed of development is important. Readable and terse code
is part of this, and so is access to powerful constructs that avoid tedious repetition of code.
Maintainability also ties into this may be an all but useless metric, but it does say something
about how much code you have to scan, read and/or understand to troubleshoot problems
or tweak behaviors. This speed of development, the ease with which a programmer of other
languages can pick up basic Python skills and the huge standard library is key to another
area where Python excels. All its tools have been quick to implement, saved a lot of time,
and several of them have later been patched and updated by people with no Python
background - without breaking.

5.4 Modules Used in Project

Tensor flow
TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library, and is also used for
machine learning applications such as neural networks. It is used for both research and
production at Google.

TensorFlow was developed by the Google Brain team for internal Google use. It was released
under the Apache 2.0 open-source license on November 9, 2015.

Numpy
Numpy is a general-purpose array-processing package. It provides a high-performance
multidimensional array object, and tools for working with these arrays.

It is the fundamental package for scientific computing with Python. It contains various
features including these important ones:

• A powerful N-dimensional array object


• Sophisticated (broadcasting) functions
• Tools for integrating C/C++ and Fortran code
• Useful linear algebra, Fourier transform, and random number capabilities

MRCE DEPARTMENT OF CSE 32


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Besides its obvious scientific uses, Numpy can also be used as an efficient
multidimensional container of generic data. Arbitrary data-types can be defined using
Numpy which allows Numpy to seamlessly and speedily integrate with a wide variety of
databases.

Pandas
Pandas is an open-source Python Library providing high-performance data manipulation
and analysis tool using its powerful data structures. Python was majorly used for data
munging and preparation. It had very little contribution towards data analysis. Pandas
solved this problem. Using Pandas, we can accomplish five typical steps in the processing
and analysis of data, regardless of the origin of data load, prepare, manipulate, model, and
analyze. Python with Pandas is used in a wide range of fields including academic and
commercial domains including finance, economics, Statistics, analytics, etc.

Matplotlib
Matplotlib is a Python 2D plotting library which produces publication quality figures in a
variety of hardcopy formats and interactive environments across platforms. Matplotlib can
be used in Python scripts, the Python and IPython shells, the Jupyter Notebook, web
application servers, and four graphical user interface toolkits. Matplotlib tries to make easy
things easy and hard things possible. You can generate plots, histograms, power spectra,
bar charts, error charts, scatter plots, etc., with just a few lines of code. For examples, see
the sample plots and thumbnail gallery.

For simple plotting the pyplot module provides a MATLAB-like interface, particularly when
combined with IPython. For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface or via a set of functions
familiar to MATLAB users.

Scikit – learn
Scikit-learn provides a range of supervised and unsupervised learning algorithms via a
consistent interface in Python. It is licensed under a permissive simplified BSD license and
is distributed under many Linux distributions, encouraging academic and commercial use.

MRCE DEPARTMENT OF CSE 33


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Python

Python is an interpreted high-level programming language for general-purpose


programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant whitespace.

Python features a dynamic type system and automatic memory management. It supports
multiple programming paradigms, including object-oriented, imperative, functional and
procedural, and has a large and comprehensive standard library.

Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.

Python is Interactive − you can actually sit at a Python prompt and interact with the interpreter
directly to write your programs.
Python also acknowledges that speed of development is important. Readable and terse code
is part of this, and so is access to powerful constructs that avoid tedious repetition of code.
Maintainability also ties into this may be an all but useless metric, but it does say something
about how much code you have to scan, read and/or understand to troubleshoot problems
or tweak behaviors. This speed of development, the ease with which a programmer of other
languages can pick up basic Python skills and the huge standard library is key to another
area where Python excels. All its tools have been quick to implement, saved a lot of time,
and several of them have later been patched and updated by people with no Python
background - without breaking.

Install Python Step-by-Step in Windows and Mac :


Python a versatile programming language doesn’t come pre-installed on your computer
devices. Python was first released in the year 1991 and until today it is a very popular high-
level programming language. Its style philosophy emphasizes code readability with its
notable use of great whitespace.
The object-oriented approach and language construct provided by Python enables
programmers to write both clear and logical code for projects. This software does not
come pre-packaged with Windows. How to Install Python on Windows and Mac :

MRCE DEPARTMENT OF CSE 34


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

There have been several updates in the Python version over the years. The question is
how to install Python? It might be confusing for the beginner who is willing to start
learning Python but this tutorial will solve your query. The latest or the newest version of
Python is version
3.7.4 or in other words, it is Python 3.
Note: The python version 3.7.4 cannot be used on Windows XP or earlier devices. Before
you start with the installation process of Python. First, you need to know about your
System Requirements. Based on your system type i.e. operating system and based
processor, you must download the python version. My system type is a Windows 64-bit
operating system. So the steps below are to install python version 3.7.4 on Windows 7
device or to install Python 3. Download the Python Cheatsheet [Link] steps on how to
install Python on Windows 10, 8 and 7 are divided into 4 parts to help understand better.
Download the Correct version into the system
Step 1: Go to the official site to download and install python using Google Chrome or any
other web browser. OR Click on the following link: [Link]

(a)

Now, check for the latest and the correct version for your operating system.

MRCE DEPARTMENT OF CSE 35


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Step 2: Click on the Download Tab.

(b)

Step 3: You can either select the Download Python for windows 3.7.4 button in Yellow
Color or you can scroll further down and click on download withrespective to their
version. Here, we are downloading the most recent python version for windows 3.7.4

(c)

Step 4: Scroll down the page until you find the Files option.

MRCE DEPARTMENT OF CSE 36


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Step 5: Here you see a different version of python along with the operating system.

(d)

To download Windows 32-bit python, you can select any one from the three options:
Windows x86 embeddable zip file, Windows x86 executable installer or Windows x86
web based installer.
To download Windows 64-bit python, you can select any one from the three options:
Windows x86-64 embeddable zip file, Windows x86-64 executable installer or Windows
x86- 64 web based installer.
Here we will install Windows x86-64 web-based installer. Here your first part regarding
which version of python is to be downloaded is completed. Now we move ahead with the
second part in installing python i.e. Installation
Note: To know the changes or updates that are made in the version you can click on the
Release Note Option.

MRCE DEPARTMENT OF CSE 37


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Installation of Python
Step 1: Go to Download and Open the downloaded python version to carry out the installation
process.

(e)

Step 2: Before you click on Install Now, Make sure to put a tick on Add Python 3.7 to PATH.

MRCE DEPARTMENT OF CSE 38


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

(f)

Step 3: Click on Install NOW After the installation is successful. Click on Close.

(g)

With these above three steps on python installation, you have successfully and correctly
installed Python. Now is the time to verify the installation. Note: The installation
process might take a couple of minutes.

Verify the Python Installation


Step 1: Click on Start

Step 2: In the Windows Run Command, type “cmd”.

MRCE DEPARTMENT OF CSE 39


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

(h)

Step 3: Open the Command prompt option.


Step 4: Let us test whether the python is correctly installed. Type python –V and press Enter.

(i)

Step 5: You will get the answer as 3.7.4


Note: If you have any of the earlier versions of Python already installed. You must first
uninstall the earlier version and then install the new one.

MRCE DEPARTMENT OF CSE 40


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Check how the Python IDLE works

Step 1: Click on Start

Step 2: In the Windows Run command, type “python idle”.

(j)
Step 3: Click on IDLE (Python 3.7 64-bit) and launch the program
Step 4: To go ahead with working in IDLE you must first save the file. Click on File > Click
on Save

(k)
Step 5: Name the file and save as type should be Python files. Click on SAVE. Here I have
named the files as Hey World. Step 6: Now for e.g. enter print.

MRCE DEPARTMENT OF CSE 41


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 6
TESTING

MRCE DEPARTMENT OF CSE 42


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

6.1 TESTING

The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies, assemblies and/or a finished product It is the
process of exercising software with the intent of ensuring that the Software system meets
its requirements and user expectations and does not fail in an unacceptable manner. There
are various types of test. Each test type addresses a specific testing requirement.

TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal program
logic is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual software
units of the application .it is done after the completion of an individual unit before
integration. This is a structural testing, that relies on knowledge of its construction and is
invasive. Unit tests perform basic tests at component level and test a specific business
process, application, and/or system configuration. Unit tests ensure that each unique path
of a business process performs accurately to the documented specifications and contains
clearly defined inputs and expected results.
Integration testing
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components
were individually satisfaction, as shown by successfully unit testing, the combination of
components is correct and consistent. Integration testing is specifically aimed at exposing
the problems that arise from the combination of components.

MRCE DEPARTMENT OF CSE 43


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Functional testing
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user
manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key


functions, or special test cases. In addition, systematic coverage pertaining to identify
Business process flows; data fields, predefined processes, and successive processes must
be considered for testing. Before functional testing is complete, additional tests are
identified and the effective value of current tests is determined.
System Testing
System testing ensures that the entire integrated software system meets requirements.
It tests a configuration to ensure known and predictable results. An example of system
testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration
points.
White Box Testing
White Box Testing is a testing in which in which the software tester has knowledge
of the inner workings, structure and language of the software, or at least its purpose. It is
purpose. It is used to test areas that cannot be reached from a black box level.
Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most other
kinds of tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a testing in which

MRCE DEPARTMENT OF CSE 44


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

the software under test is treated, as a black box . you cannot “see” into it. The test provides inputs
and responds to outputs without considering how the software works.

6.2 TESTING METHODOLOGIES


Unit Testing

Unit testing is usually conducted as part of a combined code and unit test phase
of the software lifecycle, although it is not uncommon for coding and unit testing to be
conducted as two distinct phases.

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives

• All field entries must work properly.


• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.
Features to be tested

• Verify that the entries are of the correct format


• No duplicate entries should be allowed
• All links should take the user to the correct page.

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 Results: All the test cases mentioned above passed successfully. No defects encountered.

Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional
requirements.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.

MRCE DEPARTMENT OF CSE 45


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 7
RESULTS

MRCE DEPARTMENT OF CSE 46


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

SCREENSHOTS

Fig 7.1: Command prompt

Fig 7.2: Train model with given face and username

MRCE DEPARTMENT OF CSE 47


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 7.3: Press ‘face Detection’ button to get below output

Fig 7.4: Press ‘q’ key to train face model

MRCE DEPARTMENT OF CSE 48


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 7.5: Face registration completed and now click on Eye blink

Fig 7.6: Press ‘q’ key to train model

MRCE DEPARTMENT OF CSE 49


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 7.7: Eye blink training completed and click on Federated update model
to server button

Fig 7.8: Updating completed and click on face authentication

MRCE DEPARTMENT OF CSE 50


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 7.9: Click ‘q’ key to authenticate face

Fig 7.10: Webcam will started to detect eye blinks

MRCE DEPARTMENT OF CSE 51


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

Fig 7.11: Count and once user recognized

Fig 7.12: U can see both face and eye blink pattern recognized

MRCE DEPARTMENT OF CSE 52


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 8
CONCLUSION

MRCE DEPARTMENT OF CSE 53


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CONCLUSION

In conclusion, the study on Federated Learning (FL) based face and eye blink recognition
demonstrates the effectiveness of FL in maintaining high recognition accuracy while preserving
user privacy. The decentralized nature of FL allows for training robust models without
centralizing sensitive biometric data, significantly reducing privacy risks and ensuring
compliance with privacy regulations. The study shows that FL can achieve competitive
performance metrics comparable to traditional methods, highlighting its potential for largescale
deployment across various devices. However, challenges such as communication overhead,
device heterogeneity, and security vulnerabilities remain. Future research should focus on
optimizing communication protocols, addressing device variability, and developing advanced
security measures to protect against attacks. Additionally, extending FL to incorporate other
biometric modalities and conducting real-world deployments will be crucial in fully realizing
its benefits. Overall, this research underscores the promising potential of FL in creating secure
and efficient biometric recognition systems.

MRCE DEPARTMENT OF CSE 54


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

CHAPTER 9
FUTURE ENHANCEMENTS

MRCE DEPARTMENT OF CSE 55


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

FUTURE ENHANCEMENTS

Here are some potential future enhancements for federated-based face and eye blink
recognition:

1. Improved privacy-preserving techniques: Enhance security and privacy using


advanced encryption methods, like homomorphic encryption or secure multi-party
computation.

2. Edge AI and IoT integration: Expand federated learning to edge devices, like
smart glasses or wearables, for real-time face and eye blink recognition.

3. Multi-modal fusion: Combine face and eye blink data with other modalities, like
voice or gesture recognition, for enhanced biometric verification.

4. Explainable AI (XAI): Develop techniques to interpret and explain federated


model decisions, increasing transparency and trust.

5. Adversarial robustness: Enhance model resilience against adversarial attacks and


data poisoning.

6. Continuous learning: Implement online learning and adaptation to handle


changing environmental conditions and user behaviour.

7. Device-agnostic models: Develop models that can operate seamlessly across


various devices and platforms.

8. Emotion and intent recognition: Expand recognition capabilities to include


emotional states and user intentions.

9. Health monitoring applications: Leverage federated face and eye blink


recognition for health monitoring, like fatigue or stress detection.

[Link] and blockchain-based approaches: Explore decentralized


architectures and blockchain technology for secure and transparent model updates.

These enhancements will further improve the accuracy, security, and applicability of
federated-based face and eye blink recognition systems.

MRCE DEPARTMENT OF CSE 56


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

REFERENCES
[1] McMahan, B., Moore, E., Ramage, D., Hampson, S., & Arcas, B. A. y. (2017).
Communication-efficient learning of deep networks from decentralized data. In Artificial
Intelligence and Statistics (pp. 1273-1282). PMLR.

[2] Kairouz, P., McMahan, H. B., Alistarh, D., et al. (2021). Advances and open problems
in federated learning. Foundations and Trends® in Machine Learning, 14(1–2), 1-210.

[3] Bonawitz, K., Eichner, H., Grieskamp, W., Huba, D., Ingerman, A., Ivanov, V., Kiddon,
C., Konečný, J., Mazzocchi, S., McMahan, H. B., Van Overveldt, T., Petrou, D., Ramage, D.,
& Roselander, J. (2019). Towards federated learning at scale: System design. Proceedings of
the 2nd SysML Conference.

[4] Rieke, N., Hancox, J., Li, W., Milletari, F., Roth, H. R., Albarqouni, S., Bakas, S., Galtier,
M. N., Landman, B. A., Maier-Hein, K., Ourselin, S., Sheller, M., Summers, R. M., Trask,
A., Xu, D., & Cardoso, M. J. (2020). The future of digital health with federated learning. npj
Digital Medicine, 3(1), 1-7.

[5] Mohammadi, M., Al-Fuqaha, A., Sorour, S., & Guizani, M. (2018). Deep learning for
IoT big data and streaming analytics: A survey. IEEE Communications Surveys & Tutorials,
20(4),
2923-2960.

[6] Zhao, Y., Li, M., Lai, T., Suda, N., Civin, D., & Chandra, V. (2018). Federated learning
with non-IID data. arXiv preprint arXiv:1806.00582.

[7] Acar, D. A., Zhao, J., Matas, R., Mattina, M., Whatmough, P., & Saligrama, V. (2021).
Federated learning based on dynamic regularization. In International Conference on Learning
Representations.

MRCE DEPARTMENT OF CSE 57


FEDERATED LEARNING BASED FACE AND EYE BLINK RECOGNITION

[8] Kaissis, G., Makowski, M. R., Rückert, D., & Braren, R. F. (2020). Secure, privacy
preserving and federated machine learning in medical imaging. Nature Machine Intelligence,
2(6), 305-311.

[9] He, C., Anwar, S., & Hong, D. S. (2020). Federated deep reinforcement learning for
Internet of Things with decentralized cooperative edge caching. IEEE Internet of Things
Journal, 7(10),
9441-9455.

[10] Nguyen, D. C., Ding, M., Pathirana, P. N., & Seneviratne, A. (2021). Federated learning
for Internet of Things: A comprehensive survey. IEEE Communications Surveys & Tutorials,
23(2), 1622-1658.

[11] Rawls, S., & MacMahan, B. (2020). Federated learning systems: Design and engineering
challenges. arXiv preprint arXiv:2011.02135.

[12] Lu, Z., Li, H., Liu, D., & Yang, Y. (2020). Privacy-preserving asynchronous federated
learning mechanisms for edge network computing. IEEE Access, 8, 48970-48981.

[13] Bonomi, S., Horne, B., Zhang, Y., & Montgomery, J. (2019). A comparison of face
recognition algorithms in unconstrained environments. arXiv preprint arXiv:1904.03156.

[14] Soukupová, T., & Čech, J. (2016). Real-time eye blink detection using facial landmarks.
21st Computer Vision Winter Workshop.

MRCE DEPARTMENT OF CSE 58

You might also like