0% found this document useful (0 votes)
13 views63 pages

Face - Detection - System - Report Final Part-1

The document presents a Face Recognition Attendance System developed by Zuhaib Alam and Zia Ullah as part of their Bachelor of Science in Computer Science program. The system aims to automate attendance marking using facial recognition technology, eliminating errors associated with manual attendance and improving efficiency. It includes various modules for user registration, face recognition, attendance management, and a user-friendly interface, ultimately enhancing the accuracy and reliability of attendance tracking in educational institutions.

Uploaded by

majidkhab85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views63 pages

Face - Detection - System - Report Final Part-1

The document presents a Face Recognition Attendance System developed by Zuhaib Alam and Zia Ullah as part of their Bachelor of Science in Computer Science program. The system aims to automate attendance marking using facial recognition technology, eliminating errors associated with manual attendance and improving efficiency. It includes various modules for user registration, face recognition, attendance management, and a user-friendly interface, ultimately enhancing the accuracy and reliability of attendance tracking in educational institutions.

Uploaded by

majidkhab85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 63

FACE RECOGNITION ATTENDENCE

SYSTEM

Submitted by:
ZUHAIB ALAM– Reg#: 2020-0620-1
ZIA ULLAH– Reg#: 2020-0602-1
Session: 2020-2024

BACHELOR OF SCIENCE IN COMPUTER SCIENCE


FACE RECOGNITION ATTENDENCE
SYSTEM

Submitted by:
ZUHAIB ALAM– Reg#: 2020-0620-1
ZIA ULLAH– Reg#: 2020-0602-1
Session: 2020-2024

BACHELOR OF SCIENCE IN COMPUTER SCIENCE

Supervised by
Mr. ABDUL MUNIM KHAN
Lecturer of Computer Science
DEPARTMENT OF COMPUTER SCIENCE
GOVT DEGREE COLLEGE CHITRAL LOWER

i
CERTIFICATE

This is to certify that all the suggested changes and modification proposed by the external examiner
have been incorporated in the final copy of this thesis and there exists no further
discrepancy in this regard.

SUPERVISORY COMMITTEE:

1. Shakeel Ahmad Khan Assistant Professor Head of Department _____________


2. Abdul Munim Khan Lecturer Supervisor __________________
3. Shakeel Ahmad Khan Lecturer __________________
4. Nasir Mahmood Lecturer Member ____________

ii
DEDICATION

This project is an ardent dedication to our beloved parents, whose incessant hard work, Prayers,
sacrifice, and financial assistance paved a way for the accomplishment. We are greatly indebted to
our respected supervisor, Mr. ABDUL MUNIM KHAN, due to whose direction and constant support
we had been enabled to complete this project; we have developed and could reach success through his
able guidance.
A special appreciation to Mr. NASIR MEHMOOD whose consistency in support and invaluable
Guidance has been a great help through this project. His expertise, along with encouragement, greatly
shaped our path to completeness..

iii
AKNOWLEDGMENT
I would like to thank all those who have been able to help me develop this thesis project, “Face
Recognition Attendance System." It is because of their guidance and encouragement that this research
work became successful.

Thanks also to my supervisor, Sir Abdul Munim Khan, for all the guidance, patience, and support
given during this period. Their insightful comments and recommendations have greatly shaped the
direction of this work.

I am thankful to my favorite sir, Mubarak Amin, for supporting me at all the various stages of my
project.

I would like to extend my gratitude towards my family and friends who were always there to help me
in every manner during this trying moment. Their encouragement was so powerful that it made me
conquer the obstacles that blocked my way and keep in line with my aim.

I am grateful to the developers and contributors whose work made these technologies possible,
namely, OpenCV, deep learning techniques, and the Python libraries that made it easier for me to
develop the face recognition algorithm. Thanks to the open-source community for such powerful
tools.

I thank the faculty members and staff of Government Degree College for cooperation and providing a
good atmosphere for study. At the same time, it would not be wrong to acknowledge the institutional
resources involved in this research work as well.

I am thankful to ChatGPT for supporting me throughout different stages of my project from writing
to improving code, and suggesting modifications of the system design and its implementation.

iv
ABSTRACT
The attendance system for students in institutions through advanced facial recognition technology
would be streamlined in the face recognition attendance system. The system would be free of manual
attendance marking and errors caused by human beings and would provide a secure way of tracking
attendance.

The system is centered on a face recognition algorithm. Based on the OpenCV technique, the system
can analyze the facial features and hence identify and authenticate an individual based on his face
recognition. The system has an integrated set of modules meant to work together, resulting in a
comprehensive attendance management solution.

Sign up Module (sign up.py): This module enables user registration, both for the students and staff.
Once registered, the system records and stores facial images of each individual in the database. This
ensures that individuals are recognized by their faces when marking attendance.

Module (login.py): This login module handles the user validation login process. It makes the process
impossible for unauthorized users because once a user inputs authentic credentials, they are opened
up to the attendance panel.

Main Application (main.py): This is an interface that users interact to get through the different
elements such as attendance, Face recognition, and views all the attendance records. Thus, it
integrates all other functions together in a usable graphical user interface that gets powered by
Tkinter.

Student Management, student.py: It involves the management of information concerning a student.


Users can update, add, or see student records such as names, IDs, and facial recognition data.

Training Module train.py: The training module teaches the facial recognition model on how to
recognize facial pictures. It captures various pictures of faces from the different registered users to
produce robust data that enhances the face recognition model's accuracy.

Face Recognition (FaceRecognize.py): This module contains the implementation of facial recognition
algorithm. It will take in camera feeds from real time and match up with a stored database, and then
marks attendance appropriately.
v
Attendance Management (attendance.py): Attendance module manages and keeps a record of
attendance by student based on facial recognition. It makes reports on both individual student and
classes so that one can efficiently monitor and make reports.

Help Desk (help.py): It is a help desk for the users offering an intuitive interface. Thus, if any
problem comes up, it guides or directs users to contact its contact details and further seek assistance.

Developer Information (developer.py): Information about the development team behind the system
and the team of collaborators who have produced the project. It also contains information on the
objectives of the project and the technologies used.

The Face Recognition Attendance System is an integrated solution for the traditional process of
attendance from the traditional attendance systems, with security and efficiency in the terms of
accuracy with low possibilities of proxy attendance, making it highly efficient in all processes
involved in attending. The benefits of automatic management of attendance include time-saving and
the reduction of administrative work as well as higher transparency and reliability in the attendance
process.

vi
Contents
CERTIFICATE..............................................................................................................................................................ii
DEDICATION...............................................................................................................................................................iii
AKNOWLEDGMENT.................................................................................................................................................iv
ABSTRACT....................................................................................................................................................................v
Chapter 1.........................................................................................................................................................................1
1 INTRODUCTION..................................................................................................................................................1
1.1 Project Definition..............................................................................................................................................1
1.2 Project Objectives.............................................................................................................................................1
1.3 Project Specification.........................................................................................................................................1
1.4 Product Architecture and Components..........................................................................................................2
1.4.1 Functional Diagram......................................................................................................................................2
1.5 Applications.......................................................................................................................................................3
Chapter 2.........................................................................................................................................................................4
2 EXISTING SYSTEM.............................................................................................................................................4
2.1 Project Background..........................................................................................................................................4
2.2 Existing system for Attendance Management................................................................................................4
2.2.1 Manual Attendance Systems........................................................................................................................4
2.2.2 Biometric Attendance Systems....................................................................................................................5
2.2.3 RFID-Based Attendance Systems................................................................................................................5
2.2.4 Web-Based and Mobile Attendance Systems.............................................................................................5
2.3 Limitation of Existing System..........................................................................................................................6
2.4 Proposed system: Attendance System Based on Face Recognition..............................................................6
2.4.1 Introduction to Proposed System................................................................................................................6
2.4.2 Features of the Proposed System................................................................................................................7
2.4.3 Technologies Used.........................................................................................................................................7
2.5 Comparison between Existing and Proposed system.....................................................................................8
2.6 Previous Work on Face Recognition-Based Attendance Systems................................................................8
2.6.1 PROJECT#1..................................................................................................................................................8
2.6.2 PROJECT#2..................................................................................................................................................9
2.6.3 PROJECT#3................................................................................................................................................10
2.7 Comparative Study.........................................................................................................................................11
Chapter 3.......................................................................................................................................................................13
3 REQUIREMENT ANALYSIS AND METHODOLOGY................................................................................13
3.1 Introduction.....................................................................................................................................................13
vii
3.2 Functional Requirements...............................................................................................................................13
3.2.1 User Registration and Authentication......................................................................................................13
3.2.2 Main Dashboard and Navigation..............................................................................................................14
3.2.3 Student Management.................................................................................................................................14
3.2.4 Face Recognition and Attendance Tracking............................................................................................14
3.2.5 Face Recognition Model Training.............................................................................................................15
3.3 Non-Functional Requirements.......................................................................................................................15
3.3.1 Performance Requirements.......................................................................................................................15
3.3.2 Usability Requirements..............................................................................................................................15
3.3.3 Security Requirements...............................................................................................................................16
3.3.4 Reliability and Availability........................................................................................................................16
3.3.5 Maintainability and Extensibility..............................................................................................................16
3.4 Hardware and Software Requirements........................................................................................................16
3.4.1 Software Requirement...............................................................................................................................16
3.4.2 Hardware Requirement.............................................................................................................................16
3.5 Data Flow.........................................................................................................................................................16
3.6 System Architecture........................................................................................................................................17
3.7 Methodology....................................................................................................................................................18
3.7.1 Agile methodology......................................................................................................................................18
3.7.2 Tools and Technologies Used.....................................................................................................................18
3.7.3 Face Recognition Algorithm......................................................................................................................18
3.8 Summary..........................................................................................................................................................19
Chapter 4.......................................................................................................................................................................20
4 SYSTEM DESIGN...............................................................................................................................................20
4.1 Design Constraints..........................................................................................................................................20
4.1.1 Design Constraint: Engineering Standards.............................................................................................20
4.1.2 Design Constraint: Environmental...........................................................................................................20
4.1.3 Design Constraint: Ethical.........................................................................................................................20
4.2 Design Methodology........................................................................................................................................20
4.3 Database Design..............................................................................................................................................21
4.3.1 Overview......................................................................................................................................................21
4.3.2 Tables and their Attributes........................................................................................................................21
4.3.3 Relationship between Tables.....................................................................................................................24
4.4 User interface (UI) Design..............................................................................................................................24
4.4.1 User Registration module (signup.py)......................................................................................................24
4.4.2 User Authentication Module (login.py)....................................................................................................25
4.4.3 Main application module (main.py)..........................................................................................................26
4.4.4 Student Detail module (student.py)..........................................................................................................28

viii
4.4.5 Train photos module (train.py).................................................................................................................29
4.4.6 Face Recognition module (FaceRecognition.py)......................................................................................30
4.4.7 Attendance student module (attendance.py)............................................................................................31
4.4.8 Help module (help.py)................................................................................................................................32
4.4.9 Developer's Contact Information:............................................................................................................34
4.4.10 Developer module (developer.py)..............................................................................................................35
Chapter 5.......................................................................................................................................................................37
5 SYSTEM IMPLEMENTATION........................................................................................................................37
5.1 Introduction.....................................................................................................................................................37
5.2 Overview of the System Modules...................................................................................................................37
5.3 Libraries and algorithms................................................................................................................................38
5.3.1 Tkinter.........................................................................................................................................................38
5.3.2 PIL (Python imaging Library)..................................................................................................................39
5.3.3 OpenCv........................................................................................................................................................41
5.3.4 Training a Face Recognition Model..........................................................................................................44
5.3.5 Saving the Trained Model..........................................................................................................................44
5.3.6 Displaying Processed Image for Training................................................................................................45
5.3.7 Face Recognition using LBPH (Local Binary Patterns Histogram)......................................................45
5.3.8 Face Detection & Recognition in Video Stream......................................................................................45
5.3.9 Attendance Logging....................................................................................................................................46
Chapter 6.......................................................................................................................................................................47
6 SYSTEM TESTING AND ANALYSIS..............................................................................................................47
6.1 Testing Overview.............................................................................................................................................47
6.2 Performance Testing.......................................................................................................................................47
6.2.1 Unit Testing.................................................................................................................................................47
6.2.2 Integration Testing.....................................................................................................................................47
6.2.3 UAT..............................................................................................................................................................47
6.2.4 Performance evaluation Testing................................................................................................................48
6.2.5 Security Testing..........................................................................................................................................48
6.3 Testing Results.................................................................................................................................................48
6.3.1 Face Recognition Accuracy........................................................................................................................48
6.3.2 Attendance Marking...................................................................................................................................48
6.3.3 User Interface..............................................................................................................................................48
6.3.4 System Performance...................................................................................................................................48
6.3.5 Security........................................................................................................................................................48
6.4 Conclusion........................................................................................................................................................49
6.5 System analysis................................................................................................................................................49
6.5.1 Personal Growth Journey..........................................................................................................................49

ix
6.5.2 System Objectives and Scope.....................................................................................................................49
6.5.3 Future Scope and Enhancements..............................................................................................................50
Chapter 7.......................................................................................................................................................................51
7 CONCLUSION AND FUTURE RECOMENDATION....................................................................................51
7.1 Conclusion........................................................................................................................................................51
7.2 Future Recommendations..............................................................................................................................51
8 References.............................................................................................................................................................52

Figure 1: BLOCK DIAGRAM OF THE SYSTEM...............................................................................................2


Figure 2: BLOCK DIAGRAM OF PREVIOUS PROJECT#................................................................................9
Figure 3: BLOCK DIAGRAM OF PREVIOUS PROJECT#2............................................................................10
Figure 4: : BLOCK DIAGRAM OF PREVIOUS PROJECT#3..........................................................................11
Figure 5: COMPERESSION BETWEEN ALL PROJECTS...............................................................................12
Figure 6: DATA FLOW DIAGRAM...................................................................................................................17
Figure 7: SYSTEM ARCHITECTURE...............................................................................................................17
Figure 8: REGISTRATION TABLE...................................................................................................................22
Figure 9: STUDENT DETAIL TABLE...............................................................................................................23
Figure 10: TRAINING DATA TABLE...............................................................................................................24
Figure 11: SCREENSHOT OF SIGNUP WINDOW..........................................................................................25
Figure 12: SCREENSHOT OF LOGIN WINDOW............................................................................................26
Figure 13: SCREENSHOT OF MAIN WINDOW..............................................................................................28
Figure 14: STUDENT MANAGEMENT SYSTEM...........................................................................................29
Figure 15: TRAIN WINDOWS...........................................................................................................................30
Figure 16: FACE DETECTOR............................................................................................................................31
Figure 17: FIGURE OF ATTENDENCE MANAGEMENT SYSTEM.............................................................32
Figure 18: HELP DISK........................................................................................................................................34
Figure 19: ATTENDENCE MANAGEMENT SYSTEM...................................................................................36
Figure 20: COMPERESSION BETWEEN ALL PROJECTS.............................................................................46

x
Chapter 1

1 INTRODUCTION

1.1 Project Definition


This is a project which can automatically mark the students’ attendance in the class. We integrated
face detection and face recognition in the system for marking attendance. The system requires
working video capture device and the algorithm. To begin with, the system identifies the face of the
student and extracts features from the student images. Then he identifies the student’s name, the
student’s roll number, and places attendance in the database to avoid time wastage.

When teachers do attendance in the class on his/her own, chances are there for making errors and also
it consumes good period of class lecture. However, this particular system does not possess any
chances of errors and also saves a lot of time.

1.2 Project Objectives


1. In the conventional attendance system, there are many chances for mistakes. The purpose of
this project is to eliminate those mistakes.
2. In today's world, time is very important, especially in the classroom. The conventional
attendance system wastes a lot of time, so the goal of this software is to reduce that time.
3. Understanding the latest trends in machine vision and how they can be applied to the
attendance system.
4. Another goal of this project is to automate the entire attendance system through this system,
so that we can have a digital environment and make difficult tasks easier.
5. Another aim of this project is to eliminate fake roll calls, as this system only takes attendance
through face recognition.
6. To help people understand the importance of technology and show them how technology can
be used in our daily lives.

1.3 Project Specification


1. A special pattern matching algorithm is used to detect faces, which helps in identifying the
face.
2. To match a face, a score of at least 600 is needed. If the score is less than 600, it may be
difficult to match the face accurately.
1
3. A camera is needed for this, and it should have a good resolution. This means the camera must
have a clear enough resolution to detect and recognize the face.
4. The first version is for only 5 users, but when the full version is released, it will be able to
support more users.
5. Good lighting is necessary to detect faces. This means the area should be well-lit when
detecting a face.
Attendance is recorded in an Excel sheet (.xlsx format), which can be easily shared and
maintained. The attendance will also be shown in the software, which will pull data from the
Excel sheet and display it.

1.4 Product Architecture and Components


1.4.1 Functional Diagram

Figure 1: BLOCK DIAGRAM OF THE SYSTEM

The sub system description is as follows:


 Camera: The camera is the first part of the subsystem, and it is a hardware component. It
captures the image of the student in the class.

 Image Enhancement: The picture taken by the camera should be clear. The system will also
try to enhance the image to make it easier to extract features and recognize the face, ensuring
there are no mistakes when marking attendance.

 Image to Grayscale: In this process, the captured image is converted into grayscale using

2
OpenCv library. This means that a 32-bit or 16-bit image is changed into an 8-bit image so
that our pattern matching algorithm can work accurately.

 Face detection: Face detection algorithm Haar Cascade Classifier will detect the face from the
image. As mentioned above, the image will be converted to grayscale, and then the face will
be detected through Haar Cascade Classifier algorithm.

 Feature Extraction: After detecting the face in the image, the system will now search for
features within that face. This means the Local Binary Pattern (LBP) algorithm will try to
identify and extract the specific features present in that particular face

 Face Database: Once the classifier is trained with the faces and IDs, it is saved to disk for later
use. We use this line of code in train.py for saving the trained model.

 Face Recognition: After the entire process is completed, when a student comes for attendance,
their face will be recognized. To recognize the face, we have used a specific algorithm, which
will be discussed in detail in the upcoming chapters. Recognition means that the student's face
will be checked to see if it matches any of the faces stored in the database. This matching is
based on all the features.

 Update Attendance Sheet.xlsx: If the student’s image matches the one stored in the database,
the algorithm updates the attendance record with the student’s name. The attendance sheet
(Excel file) is also updated accordingly

1.5 Applications
Large Application in Institute Attendance System:
 This is a big application used in institutes to take attendance for different classes. The system
takes attendance quickly and reduces human errors, meaning it lowers the mistakes that
people usually make.
Large Application of Computer Vision:
 Computer vision is being used in many fields, such as Communication, Biomedical
(healthcare), and Automatic Product Inspection (checking product quality). In these areas,
computer vision has become very important and useful, as it helps automate many tasks and
improves efficiency.
3
Chapter 2

2 EXISTING SYSTEM

2.1 Project Background

Traditionally, the management of attendance in institutions of learning has been conducted either
manually or through conventional automated systems. Such systems have inherent problems, such as
time-consuming processes, human error, and inefficiency. This chapter reviews the existing systems
that are employed in tracking attendance and indicates some of the inadequacies in current practices.
Thereafter, the Proposed System—the Face Recognition System (FRS)—is presented as a more
efficient, secure, and automated means of conducting attendance.

The main objective of this project is to make the attendance process easier and faster. The traditional
methods of using ID cards or manually calling out attendance and writing it down are very time-
consuming and inefficient. The system will detect faces in the classroom of students and link them
with stored information within the database. With face detection and identification, it can easily
determine if the student is in the class or not.

2.2 Existing system for Attendance Management


2.2.1 Manual Attendance Systems

The most ancient and widely followed attendance management system in any school is the manual
attendance system. This is the process that occurs in this system:
Process: The instructor begins the class by taking the roll call and noting it down either on paper or
electronic spreadsheets.
2.2.1.1 Challenges

Time-Consuming: Preparing a roll call manually is quite time-consuming, especially in large classes.
Human Error: There is a tendency to forget to mark the students either as present or absent while it
creates wrong records.
Forgery Risk: One of the students may try forging signatures or may get one of his peers to mark as
'present'.
4
Data Loss: Paper based record may be lost or may be damaged or may even get destroyed, that results in
historical data loss.

2.2.2 Biometric Attendance Systems


Most education centers have adopted biometric systems, such as fingerprint or iris scanners, that
substitute the inadequacies of manual attendance recording. Biometric characteristics are used for
identification and marking of attendance.
Procedure: Student needs to fingerprint or iris scan to mark their attendance
2.2.2.1 Problems
Device Dependency: Biometric devices are often costly and require frequent servicing
Problem of Fingerprints: Fingerprint-based readers do not read fingerprints properly, in case the reader is
exposed to dust, moisture, or conditions of the skin.
Privacy Issues: Since biometric data includes sensitive personal information, the storage of biometric
data poses a privacy issue.
Not Scalable: Biometric attendance systems do not scale well to accommodate high numbers of
students, especially in large classrooms.

2.2.3 RFID-Based Attendance Systems


RFID-based systems have also been used in certain educational institutions. In this system:
Process: Students are given RFID cards that they scan at the entrance to record attendance.
2.2.3.1 Challenges
Card Loss or Theft: In case the students lose their RFID cards, their attendance may not be recorded, or
they might be used by others.
Lack of Automation: RFID systems are far from being fully automated, as they require physical
scanning of cards. This can sometimes still lead to errors and missed attendance.
Limited Security: The RFID cards are usually secure, but the swapping of cards between students is
always possible, especially in large classes.

2.2.4 Web-Based and Mobile Attendance Systems


With the increasing use of smart phones and web technologies, a number of institutions are adopting
web-based and mobile applications to manage attendance.
Process: Students log in to an online portal or a mobile application to mark their attendance or scan the
QR codes provided by the teacher.

5
2.2.4.1 Challenges
Poor Connectivity: These systems face connectivity issues with the network, especially in areas of poor
internet connectivity.
Authentication Problems: These systems might still rely on student input, like clicking buttons or
scanning QR codes, which can lead to errors or even intentional misuse, like marking a student's
attendance for their friend.
Security Risks: Online or mobile storage of attendance data opens security risks, since an unauthorized
access or data breach may result in the loss of sensitive information about the students.

2.3 Limitation of Existing System


Existing system are workable but have the following limitations, which affect efficiency, accuracy, and
scalability:
Manual Systems are error-prone, time-consuming, and highly dependent on the accuracy of the teacher.
Biometric Systems, are also accompanied by device failure, student's unwillingness, and high
maintenance costs while using a fingerprint-based system.
RFID-Based Systems face all issues such as card loss, theft, and a lack of automation.
Web and mobile-based systems may be vulnerable to connectivity issues, authentication vulnerabilities,
and security threats.
Against such challenges, the attendance management system should be automated, secure, and accurate.
This brings to the foray the proposed Face Recognition System (FRS) that will eliminate flaws from
existing forms of systems.

2.4 Proposed system: Attendance System Based on Face Recognition


The system is an automated and intelligent one in which it makes use of the facial recognition technology
for marking the attendance of students. Utilizing computer vision and machine learning algorithms, it
correctly detects students and marks their attendance automatically, without manual interference.

2.4.1 Introduction to Proposed System


This proposed system makes use of facial recognition in such a way that attendance management is
allowed to be executed with security and efficiency. It encompasses various key components.
 User authentication: The system will accept the enrollment of facial data in the students through
an initial setup process

6
 Logging Student Attendance: The system registers and logs the attendance of recognized students
with the exact dates and times of every session.
 Database Management: Each data of the students, including photos taken and attendance records
will be stored in a protected database for future access
 Training module: the system supports on-cycle training to update the models periodically as new
students or enhancements are added to them.

2.4.2 Features of the Proposed System


1. Automated Attendance Recording: Students do not need to mark their attendance physically,
but the system records that the student is present by virtue of recognition of his face.
It will give accurate, real-time attendance recording with no scope for any kind of human error
and proxy attendance.
2. Face Recognition Accuracy: Face recognition technology has high accuracy for student
identification. The system can handle various lighting and angles, making it more reliable than
other biometric systems like fingerprint scanning.
3. No dependence on hardware: Unlike a fingerprint-based or RFID system, the proposed system
can be operated using only a camera and software, which would make it cost-effective and easy
to implement.
4. Data security and privacy: The system keeps the facial data safe, and encryption and hashing
techniques use for sensitive personal information. Access to data is only by authorized personnel
therefore high levels of security.
5. Scalability: The system easily accommodates huge databases of students by allowing pictures of
students to have high accuracy in recognition.
6. Real-time Monitoring: The attendance can be monitored directly online by lecturers, and
historical records accessed.
7. Modularity: It is modular, hence easy to add any further functionality at a later time like the
school management software with the same or advanced algorithms on face recognition.

2.4.3 Technologies Used


The proposed system is developed using the following technologies:
1. Python: The programming language to be used for implementing the core logic.
2. OpenCV: For real-time image processing and facial recognition.
3. Tkinter: To create a user-friendly graphical interface for interacting with the system.

7
4. MySQL/SQLite: For storing student and attendance data in a structured database.

2.5 Comparison between Existing and Proposed system


The comparison between the existing system and the proposed system will be seen through the table
given below.

2.6 Previous Work on Face Recognition-Based Attendance Systems


2.6.1 PROJECT#1
The idea for this project was given by a student from Kingston University London in 2018, when they
were searching for a topic for their final year project. They thought of creating a system that could
automatically take student attendance. According to them, such a system would take an image either
from a camera or from memory, and the system would automatically detect the faces in the image. Once
the faces are identified, the system will crop the faces from the image and store them in memory, to be
used later for recognition.
The second step of the system is face recognition, where the detected faces will be matched with the
stored dataset and compared with the data given in the first step. To automatically sort the faces, software
will be used that allows easy interaction between multiple tasks.
Since the system has two steps, the second phase involves training the images in the dataset, which will
later be used for recognition. The goal of this project was to create an automated system that detects

8
faces, crops and stores them, and then compares them for recognition.

The behavior of the system is illustrated in the following flowchart

Figure 2: BLOCK DIAGRAM OF PREVIOUS PROJECT#

Technology Used
This project uses two main algorithms: Viola-Jones algorithm for face detection and Hidden Markov
Model (HMM) with SVD for face recognition.
1. The Viola-Jones algorithm can be implemented in several software programs, such as MATLAB,
OpenCV, and web browsers (using Adobe Flash).
2. The existing implementation of the Hidden Markov Model with SVD for face recognition is
available in MATLAB, C++, and OpenCV libraries

2.6.2 PROJECT#2
In 2012, students at the University of Nairobi developed this project as part of their final year work. The
system consists of two main modules.
The first module, called the face detector, is a portable device that functions as a camera. This camera
captures students' faces and saves them in a file using computer vision algorithms for face detection and
extraction.
The second module is a desktop application that carries out face recognition on the stored images,
records the students' attendance, and saves the results in a database for future use.

9
The following flowchart illustrates how information flows throughout the entire process.

Figure 3: BLOCK DIAGRAM OF PREVIOUS PROJECT#2

Technology Used: The tools used to implement this system are divided into two categories: Mobile
Tools and Desktop Tools.
Mobile Tools: The Face Detection Module will use the OpenCV library, which includes the frontal Haar
Cascade face detector. This will be implemented in Android Studio.
 OpenCV for Android Library - This is an open-source library that provides programming
functions for real-time computer vision.
 Android Studio/Eclipse IDE - Android Studio is the official IDE for Android application
development, based on IntelliJ IDEA.
Desktop Tools
 EmguCV Library - EmguCV is a cross-platform .NET wrapper for the OpenCV image processing
library. OpenCV/EmguCV uses a Haar Cascade face detector, which is a classifier trained on
human faces.
 Visual Studio - Visual Studio is used to build and run solution examples after properly
configuring EmguCV. The desktop software will implement two sub-systems (Training Set
Manager and Face Recognizer), along with the face detector in a Windows form.
In this way, both mobile and desktop tools will be used to complete the system design.

2.6.3 PROJECT#3
In 2019, a student from the Electrical Engineering department at Prince Muhammad Bin Fahd University
worked on a face recognition attendance system. He used LabVIEW programming and the LabVIEW

10
Vision module. He believed that LabVIEW programming and LabVIEW Vision are not only the best for
pattern matching, but can also be used to implement other machine vision techniques like edge tracking
and geometric matching. His main goal was to automate the attendance system, save valuable class time,
and prevent errors that occur with manual attendance systems

The following flowchart illustrates how information flows throughout the entire process:

Figure 4: : BLOCK DIAGRAM OF PREVIOUS PROJECT#3

2.7 Comparative Study


The project we are working on is slightly different from the previous one that we discussed. In our
system, first, the student’s details are entered, such as their name, roll number, etc. Then, this data is
stored in a database. After that, a sample of the student’s face is captured using a face detector algorithm
that is Haar cascade classifier. The system collects around 100 face samples of the student, and then
these samples are trained using LBPH algorithm. Once trained, the system can recognize the face using
the Local binary pattern histogram algorithm. After recognition, the student’s attendance is updated in
the database, marking whether they are present or not.

In our project, we are using MySQL database to store the data. For face detection, we are using the Haar
Cascade Classifier, which is best for real-time face detection. We have also used custom face cropping,
which crops the detected face from the image for further processing. For face recognition and training,
we have used LBPH (Local Binary Pattern Histogram), which is implemented in OpenCV.
11
In this way, our project is a bit different from the previous one.

Figure 5: COMPERESSION BETWEEN ALL PROJECTS

12
Chapter 3

3 REQUIREMENT ANALYSIS AND METHODOLOGY

3.1 Introduction
This chapter intends to analyze in-depth the requirements for the Face Recognition System, which
automates the student attendance process through facial recognition technology. This system is to be
made efficient in educational environments in eliminating the need for taking attendance through manual
methods. This chapter discusses functional requirements, nonfunctional requirements, and system
requirements based on the features presented in the modules of the system.
The FRS has different interdependent modules; every module performs a specific task. These modules
have functions of user authentication, record for students, face recognition, attendance, and help features
from users. This analysis of these modules will make it explicit regarding the required features and the
working requirement of the system.

3.2 Functional Requirements


These are the requirements that the end user specifically demands as basic facilities that the system
should offer. All these functionalities need to be necessarily incorporated into the system as a part of the
contract.
These are represented or stated in the form of input to be given to the system, the operation performed
and the output expected. They are the requirements stated by the user which one can see directly in the
final product, unlike the non-functional requirements.
Based on the modules we have developed for this system, the functional requirements are as follows.
(Gautam Buddh Nagar, 2024)

3.2.1 User Registration and Authentication


Registration Process: Students or admin should be allowed to enter their details such as name, email,
password, etc., into the system.
Login Process: After registration, users should be able to log in successfully with their credentials.
When the user enters their email and password, the system should verify if they are correct. If correct,
access should be granted; if incorrect, an error message should be shown. Additionally, a limit should be
set on the number of attempts.
13
Modules Involved:
 signup.py: We have created the signup module, which is responsible for user registration and
storing passwords.
 login.py: We have created the login module, which is responsible for user login.

3.2.2 Main Dashboard and Navigation


User Interface: When the user or admin successfully logs in, the system should redirect them to a
dashboard. Through this dashboard, they should be able to easily access other parts of the system and
work smoothly on them.
Module Involved:
 main.py: This is a module of our system that brings the user here after login. It functions as a
dashboard that connects navigation between different parts of the system.

3.2.3 Student Management


Add/Update/Delete Student Records: The system should allow the user to add a new student, remove
an existing student, or update a student’s record in the database. Each student’s record should include
personal details such as their name, roll number, and facial image for face recognition during attendance.
Facial Image Enrollment: During registration, the system should have the ability to capture a new
student’s face. The system should also be able to process and store these images so that they can be
recognized during attendance.
Module Involved:
 student.py: This is the module we created to manage student data and allow the enrollment of
student faces into the system.

3.2.4 Face Recognition and Attendance Tracking


Real-Time Face Recognition: The system should perform real-time face recognition to automatically
detect and identify students' faces for attendance. The system should compare the face with the stored
image and have an accuracy threshold to decide if a match is found or not. If the face is identified, the
system will automatically record the student’s attendance.
Attendance Recording: When a student’s face is successfully identified,
1. The system should record the date and time.
2. Attendance records should be stored in the database.
3. The system should provide functionality to view, sort, and filter attendance based on student ID
or date.
14
Modules Involved:
 FaceRecognition.py: This module handles the recognition of students' faces in our system.
 attendance.py: This is the attendance module in our system, which records and tracks the
attendance of recognized students.

3.2.5 Face Recognition Model Training


Training the Recognition Model: The system should allow users (administrators) to train the face
recognition model by enrolling new faces into the system. The system should allow capturing multiple
images for each student and store them in the database. After training, the system must be able to
recognize new images using a trained model.
Update and Retraining: As fresh students are added; the model has to be updated for the facial data of
the new students. The system must support periodic training to enhance accuracy over time as more data
is gathered.
Modules Used:
 Train.py: In my system This module contains train and update of recognition model

3.3 Non-Functional Requirements


Non-functional requirements are the criteria that define how a system should behave, rather than what it
is supposed to do. Unlike functional requirements, which describe specific system functions, non-
functional requirements define aspects like performance, security, usability, reliability, and scalability.
(Krüger, 22)

3.3.1 Performance Requirements


Face recognition speed: This recognition system should be able to identify students within 2-3 seconds
after the camera captures their image. In this way, it would ascertain that the system is accurate during
busy class hours.
Scalability: As the number of enrollments increases, this system will accommodate a large database of
facial images of enrolled students without significant deterioration in recognition performance.

3.3.2 Usability Requirements


User-friendly Interface: The interface needs to be user-friendly: easy-to-use buttons, icons, and
instructions should provide an access point to the user's registration, login, viewing students, and
attendance monitoring
Error Handling: Display error messages when a user does something invalid, like fail to log in or have
15
no face detected, so they are informed of the error.

3.3.3 Security Requirements


Data Security: All sensitive data of the users such as passwords and facial images should be kept safe.
Passwords should be hashed before storing; in case of a database breach, they should not be
compromised. Facial data should be encrypted both in transit (when uploaded or transmitted) and at rest
(while stored in the database).
Access Security: The system should have a role-based access control, thus only authentic users, that is,
administrators, can access functions such as student management and attendance information.

3.3.4 Reliability and Availability


Fault Tolerance: It must last the failure like network fails and camera failure and database failure. It
must recover to less data loss.
Availability: The system should be up and available as much as possible with minimum down-time and
maximum uptime, especially during class sessions.

3.3.5 Maintainability and Extensibility


Modularity: The system should be modular so it can easily have new features added, such as new facial
recognition algorithms or linking up to external databases of students.
Documentation: Comprehensive documentation of the Codebase, API interfaces, and system
architecture to enable future maintenance and enhancement.

3.4 Hardware and Software Requirements


3.4.1 Software Requirement
1. A computer or server capable of running the system.
2. A camera to capture student faces for recognition.
3. Sufficient storage for storing student data and facial images.

3.4.2 Hardware Requirement


1. Python 3.x or later.
2. OpenCV for face recognition.
3. Tkinter for creating the graphical user interface.
4. Database system such as MySQL or SQLite to store student data and attendance records
3.5 Data Flow
UI → Camera Module → Face Recognition Engine → Database → Attendance
Management System → Feedback to User
16
Figure 6: DATA FLOW DIAGRAM

3.6 System Architecture


The face recognition attendance system will have a front-end, which is the interface of the system, and a
back-end, which will be made up of the database and recognition engine. The front-end will include the
dashboard, student management features, and attendance logs, whereas the back-end would include face
recognition, data storage, and processing.
In the model, clients use a client-server model in which the server may address the logic and database
operations of the system, while the client (admin or student) interacts with the system through the front-
end interface. The server will handle face recognition, attendance recording, and user authentication.

Figure 7: SYSTEM ARCHITECTURE

17
3.7 Methodology
We used the agile methodology for developing the Face Recognition Attendance System. Agile is very
ideal for projects where flexibility, iterative development, and development are necessary; that's why
requirements may change. And since this project needed that characteristic of evolution, we applied the
agile methodology.

3.7.1 Agile methodology


The Agile process consists of iterative cycles known as sprints, where small increments of functionality
are developed, tested, and reviewed with stakeholders. Each sprint typically lasts 2 weeks, and the
following activities are performed:
 Sprint Planning: Zia and I, at the beginning of each sprint, would meet with stakeholders to
decide which user stories or features to implement.
 Daily Stand-ups: We would inform stakeholders of our progress, issues, and what's to be done on
a daily basis.
 Sprint Review: The features developed would be showcased at the end of each sprint, and
feedback was sought.
 Sprint Retrospective: After the end of every sprint, we would reflect on the process, understand
what went well, and know what was not so good.
 Rapid prototyping and continuous improvement were the results during the development cycle.

3.7.2 Tools and Technologies Used


3.7.2.1 Programming Language
 Python was selected because it is easier and there are libraries for processing images and face
recognition.
3.7.2.2 Libraries and Frameworks:
 OpenCV for real time face detection, Face recognition and image processing.
 Tkinter for the graphical user interface.
 MySql for database management, it is use to store student data.
 Excel Sheet for attendance tracking.
 Hardware: The system requires a webcam or camera for face detection and recognition.

3.7.3 Face Recognition Algorithm


The face recognition algorithm is an image capture process where the face is detected and then compared

18
to the facial data stored in the system. The system utilizes the LBPH (Local Binary Pattern Histogram)
face recognition algorithm, which is a traditional method based on texture patterns for facial recognition.
3.7.3.1 Step 1: Face Detection
The first step in this process is face detection in an image. This is made possible by the use of Haar
Cascades. It is one of the commonly used object detection methods of OpenCV. The face is likely to be
detected in regions of the image by the Haar Cascade classifier.
3.7.3.2 Step 2: Feature Extraction
Once the face is detected, the system will extract the facial features using the LBPH algorithm. The
LBPH method analyzes the texture in a local neighborhood around each pixel to capture local patterns
and encode them into a histogram that represents the face features. The features are stored as a unique
identifier for each face.
3.7.3.3 Step 3: Compare Faces
The extracted features from the live face image are matched against the stored facial data in the database.
In general, it is performed through the Euclidean distance between the histograms of the detected face
and the stored faces. A small enough distance is used to conclude the successful recognition, as long as
the match confidence is high.
3.7.3.4 Step 4: Attendance Marking
In case a match is found, the system automatically records the student's attendance by logging the
student's ID along with the current date and time. All these data are kept for further reference and
reporting.

3.8 Summary
This chapter has discussed the detailed requirement analysis of the Face Recognition Attendance System
in terms of functional requirements, non-functional requirements, software requirements, and hardware
requirements. The selected agile development methodology was explained, thus giving a structured and
systematic approach for the design, development, and implementation of the system. Additionally, some
key tools and technologies to be used in the development process and the face recognition algorithm
have been emphasized. In the following chapter, the detailed design of the system will be presented.

19
Chapter 4

4 SYSTEM DESIGN

4.1 Design Constraints


The following constraints were taken into account during the project design. This constraint is very
important during the project design.

4.1.1 Design Constraint: Engineering Standards

The database should have more samples to improve detection efficiency. Additionally, the more
expensive the camera, the easier it will be for its algorithm to recognize people.

4.1.2 Design Constraint: Environmental

The camera should be able to capture all the students in the class. Every student should be seated in a
way that they are visible to the camera, so their attendance can be marked easily.

4.1.3 Design Constraint: Ethical

Another ethical issue is related to a person's physical appearance. If someone changes their look and
appears different in their photo from what they look like in person, it may be difficult to mark their
attendance.

4.2 Design Methodology

As we mentioned before in (Figure1). The project process is:

1. A camera will take continuous stream.

2. Then, the image will be enhanced.

3. The RGB image will be converted into a grayscale image.

4. A face detection algorithm will be used to find the face in the image.

5. Specific features from the detected face will be extracted using the algorithm.

20
6. The training image will be saved in classifier.xml file.

7. Next, a face recognition algorithm will check if the face is already stored by comparing the
features.

8. Finally, the attendance will be updated in the Excel sheet.

4.3 Database Design


For the Face Recognition system, a structured database is required because it stores the admin
information, student face image features, and student records. This database ensures that data is stored
efficiently; allowing quick access and manipulation of records such as user authentication face
recognition training, and student management.
In this section, we will try to understand the database created for our project, the relationships between
the tables, and also look at the ER diagram. This will help us understand how data is structured and
linked to each other in our system
In my project the name of my database is face_recongnition.

4.3.1 Overview
Our project uses a My SQL database to store the following information.
1. User: it stores personal information along with their face images.
2. Student Records: it is use to stores information about students including their IDs, face images for
recognition and their names.
3. Training Data: it is used to store information for training the recognition model , which is derived
from student images.

4.3.2 Tables and their Attributes


Our database consists of the following tables:
Registration table (userdata)
This table has been created for the login functionality in our project, so the admin can easily sign up and
log in for the first time. The attributes of this table are as follows.
Attributes:
 id (primary_key).
 username.

21
 email:
 password:

SQL Queries:
CREATE TABLE user_data (
id INT AUTO_INCREMENT PRIMARY KEY,email VARCHAR(100) UNIQUE,username
VARCHAR(100),password VARCHAR(100),face_image VARCHAR(255)
);

Figure 8: REGISTRATION TABLE

Students detail table (students)


This table stores student-related data and their face images for identification.
Attributes:
 Student_id (Primary Key).
 Name: Name of the student.
 Roll: The roll number of the student.
 Course: Course in which the student is enrolled.
 Dep: The department the student belongs to.
 Year: The current year of study for the student.
 Sem: The semester the student is currently in.
 Division: The division the student has passed in, such as A, B, or C.
 Gender: The gender of the student, such as male or female.
 DOB: The date of birth of the student.
 Email: The email address of the student.
 Teacher: The teacher who is currently teaching the student.
 Photo Sample: The student's photo used for recognition. This stores the image sample for
face recognition.
 Phone: The student's phone number.
22
SQL Queries:
CREATETABLE students (
Student_id INT AUTO_INCREMENT PRIMARY KEY, Name VARCHAR (100), Roll
VARCHAR (20) UNIQUE,Course VARCHAR(100),Dep VARCHAR(100),PhotoSample
VARCHAR(255),Address VARCHAR(255),Teacher VARCHAR(255),Phone
VARCHAR(255),Gender VARCHAR(255),Division VARCHAR(255),Email
VARCHAR(255),Sem VARCHAR(255)
);

Figure 9: STUDENT DETAIL TABLE

Training Data Table (training_data)


This table stores the data used for training the face recognition model, including the IDs of users/students
and their associated images.
Attributes:
 id (Primary Key): A unique identifier for each training entry.
 user_id (Foreign Key): A reference to the user_id in the Users table.
 student_id (Foreign Key): A reference to the student_id in the Students table.
 image_path: The file path to the face image used for training the model.
SQL Queries:
CREATE TABLE training_data ( train_id INT AUTO_INCREMENT PRIMARY KEY, user_id
INT, student_id INT, image_path VARCHAR(255), label INT, FOREIGN KEY (user_id)
REFERENCES users(user_id), FOREIGN KEY (student_id) REFERENCES
students(student_id));

23
Figure 10: TRAINING DATA TABLE

4.3.3 Relationship between Tables


The database design is structured in a way that each piece of information is stored in a modular fashion,
making it easier to maintain and query. The relationships between the tables are as follows
Users Table to Training Data Table:
One-to-Many: One user can have multiple images used for face recognition training, but each image is
associated with only one user.
The user_id from the Users table is linked to the user_id in the Training Data table
Students Table to Training Data Table:
One-to-Many: A student can have multiple images associated with them for face recognition, but each
image corresponds to only one student.
The student_id in the Students table is linked to the student_id in the Training Data table.
Users Table and Students Table:
Independent: The Users and Students tables are independent of each other. However, a user may also be
a student. If that’s the case, both tables will contain entries for the same Person (email for users, roll
number for students)

Key Relationship:
User’s → Training Data (One-to-Many)
Student’s → Training Data (One-to-Many)

4.4 User interface (UI) Design

Tkinter is Used for creating the GUI elements and PIL (Python Imaging Library) is Used to load and
manipulate images, particularly for resizing images that will be displayed in the GUI.

4.4.1 User Registration module (signup.py)


Main Window:
 A Tk() object is created, which represents the main window for the signup page.
Background Image:

24
 A background image is added using the Label widget and displayed across the entire window.
The image is loaded with ImageTk.PhotoImage().
Main Frame:
 A Frame widget is used as the container for other widgets, with a white background. This frame
is positioned inside the main window.
Input Fields:
 Email, username, password, confirm password are used for input field.
Signup Button:
 A Button widget labeled "Signup" is provided for submitting the form. When clicked, it triggers
the function connect_database, which handles user registration and interaction with the database.
Login Button:
 A Button labeled "Login" is provided, which when clicked, calls the login_page function to
navigate the user to the login page.

Figure 11: SCREENSHOT OF SIGNUP WINDOW

4.4.2 User Authentication Module (login.py)


Username Entry Field:
• An Entry widget allows the user to input their username. It is styled with a light floral
background and firebrick red color for the text.
• The entry box is accompanied by a frame line for a visual separation.
• A placeholder text ("Username") is provided, which disappears when the user clicks into the
field.
Password Entry Field:
25
• Another Entry widget is used for the password input, with similar styling as the username
field.
• A placeholder ("Password") is set, which clears when the user focuses on the field.
Password Visibility Toggle:
• An eye icon button is placed next to the password field. When clicked, the button toggles the
visibility of the password between masked (default) and visible characters.
• Forgot Password Link:A button labeled "Forgot Password?" is included below the password
field, which triggers the password reset functionality.
Login Button:
• A "Login" button is placed below the entry fields. When clicked, it triggers the login
functionality to check user credentials and log in the user.

Figure 12: SCREENSHOT OF LOGIN WINDOW

4.4.3 Main application module (main.py)


Main Window (root):
• The main window (Tk) for the GUI is created, with a size of 1530x790 pixels.
Background:
• An image is used as the background of the application, loaded using the PIL (Pillow) library to
handle the image resizing.
Frames:
• First Frame: Contains buttons for student details, photos, training data, and face detection.
• Contains buttons for attendance, developer information, assistance/help, and exit options.
Buttons:
• Buttons are styled using the Button widget, which triggers specific actions when clicked, such as
opening a new window or executing a function like Train_data(), Attendance_data(), etc.
26
• The buttons are placed on the first_frame and second_frame with distinct functionality.
Canvas for Moving Title:
• The title text "WELCOME TO FACE RECOGNITION ATTENDANCE SYSTEM" scrolls
horizontally across the top of the window. The title moves within the canvas, and its movement is
handled by the move_title() method.
• This provides a dynamic feature that enhances the UI's interaction.

Subsystems for Specific Functionality:

Each button in the frames opens a new window related to a specific subsystem:

Student Details (Student): Opens a new window that handles student data management.

Photos (open_img):

• Opens a directory where photos are stored.

Train Photos (train):

• Opens a window to train the face recognition system with new data.

Face Detector (Face_Detector):

• Opens a window that detects faces using the face recognition model.

Attendance (Atendence):

• Opens a window to manage and mark student attendance.

Developer (Developer):

• Opens a window with information about the system developer.

Help (Help):

• Opens a window providing assistance or instructions to the user.

Exit (exit_program):

• Asks the user to confirm whether they want to exit the application and closes the window if
confirmed.
27
Figure 13: SCREENSHOT OF MAIN WINDOW

4.4.4 Student Detail module (student.py)

The GUI of the Student Management System with Face Recognition consists of the following main
components:

Main Window: The window is set with a title "Face Recognition System" and has a size of 1530x790.

Image Display:

• The top section of the window includes three images displayed horizontally, while a large
background image occupies the rest of the space.

Frames:

• Main Frame: It is the primary container for the layout, which is divided into left and right
sections.

• Left Frame: This frame contains the form for entering student details, including fields for student
ID, name, department, year, and semester. It also includes radio buttons to select whether to take
a photo sample.

• Right Frame: This area displays a table (using a Treeview widget) to show the list of students
with columns for student details, such as ID, name, department, and photo sample status.

Widgets:

28
• Labels: Used for displaying text such as "Department", "Name", "Roll Number", etc.

• Entry Fields: Allow the user to input student details like ID, name, phone number, etc.

• Comboboxes: Dropdown menus for selecting the department, year, and semester.

• Radio Buttons: Allow the user to choose between taking a photo sample or not.

• Buttons: Buttons for saving, updating, deleting, and resetting student information, as well as a
button for capturing photo samples.

Table (Treeview):

• Displays the list of student records, showing relevant details like department, year, semester, and
photo sample status. It includes both horizontal and vertical scrollbars for navigation.

Figure 14: STUDENT MANAGEMENT SYSTEM

4.4.5 Train photos module (train.py)

The GUI of the Student Management System with Train Photos consists of the following main
components:
Window Setup:
• The window is created using the Tk() instance, and the root window is sized to 1530x790 pixels.
• The window title is set to "Face Recognition System".
Label for Title:
• A title label "TRAIN DATA SET" is placed at the top of the window with a custom font and
background color.
Top Image:
• The top image is displayed below the title label. It is resized using the Python Imaging Library
29
(PIL) and is set as the background for a label.
Train Data Button:
• A button labeled "TRAIN DATA" is provided. When clicked, it triggers the train_classifier()
function to start the face recognition model training.
Bottom Image:
• Another image is placed at the bottom part of the window, using the same process of resizing and
displaying as the top image.

Figure 15: TRAIN WINDOWS

4.4.6 Face Recognition module (FaceRecognition.py)

The GUI of the face recognition window System of the following main components:

Main Window:

• The root window is created using the Tk() instance, and it is configured with the title "Face
Recognition System", and a resolution of 1530x790 pixels.

Title Label:

• A label is placed at the top to display the title "FACE DETECTION AND RECOGNITION" in a
large font, with custom background and foreground colors.

Images:

30
• Top Image: A large image is displayed at the top using the PIL library for resizing and displaying
the image.

• Right Image: Another image is displayed to the right side of the screen.

Button for Face Recognition:


• A button labeled "Face Recognition" is placed on the GUI. When clicked, it triggers the
face_recog() function to initiate face recognition and attendance logging.

Figure 16: FACE DETECTOR

4.4.7 Attendance student module (attendance.py)

The GUI of the Attendance Windows with Face Recognition consists of the following main components:

Main Window:

• The main window serves as the container for all other elements. It is sized at 1530x790 pixels,
which is quite large to accommodate various sections of the interface.

Background and Branding:

• The background includes images, such as a school-themed banner and a title header.

• The title of the window is set as "Face Recognition System" and is displayed prominently at the
top.

31
Layout:

The interface is divided into two main sections:

• Left Section: Contains input fields for student attendance details.

• Right Section: Displays an attendance report in the form of a table.

Interactivity:

• The system allows importing and exporting attendance data using CSV files.

• The table supports interactions, where clicking on a row can load the selected record into the
input fields in the left section.

This GUI is designed to be user-friendly and intuitive, with sections clearly separated for data entry and
displaying attendance records. It is part of a broader system where students' attendance is monitored
using facial recognition technology.

Figure 17: FIGURE OF ATTENDENCE MANAGEMENT SYSTEM.

4.4.8 Help module (help.py)

The GUI of the Help disk widows with Face Recognition consists of the following main components:

Main Window Setup:

• Window Size: The window is set to a large size (1530x790 pixels) to ensure that all the elements
fit comfortably without appearing too cramped. This is appropriate for displaying both images
and text clearly.
32
• Window Title: The window’s title is set to "FACE RECOGNITION ALGORITHM," indicating
the purpose of the program.

Title Label:

• Label for Title: A label at the very top of the window is used to display the text "Help Desk" in a
large, bold font (35px, "Times New Roman"). This label serves as the heading of the help desk
section of the GUI.

• Background Color: The title has a white background, making the text stand out.

• Position: It is placed at the top-left corner of the window, occupying the full width but with a
height of 45 pixels.

Top Image:

• Background Image: The window includes a large background image, which occupies the area
from (0, 55) to the bottom of the window (1530x720 pixels).

• Image Handling: The image is loaded using the Pillow (PIL) library. It is resized to fit the
window’s dimensions while maintaining the aspect ratio to ensure it does not get distorted.

• Image Purpose: The image appears to be related to the face recognition topic, perhaps illustrating
the concept of the algorithm or showing something visually related to the system, such as an
example of face recognition.

Canvas for Text:

• Canvas Widget: A Canvas is used to overlay text and other elements over the background image.
It is a powerful widget in Tkinter that allows for drawing shapes, displaying text, and adding
images in a customized way.

• Canvas Placement: The canvas is placed on top of the background image, covering the entire area
of the image (1530x720).

Text Elements:

• The canvas contains a "For assistance, please contact:" text at the center, using an italic font
(20px) with black text color. This serves as an instruction to the user, telling them how to get help
33
or support.

• Below this text, there is a label displaying the developer's contact email
("[email protected]"). This email is prominently displayed in a blue font, providing a
clear method for users to reach out for assistance.

4.4.9 Developer's Contact Information:

• Contact Details: My email address is placed at the bottom of the canvas using a bold, blue-
colored font. This section provides users with a direct way to contact the developer for help or
further questions.

• Font Style: The text is rendered in "Times New Roman" font (30px), making it large enough to
be noticeable but not overwhelming.

• Positioning: The email is centered in the window, positioned at (500, 520) on the canvas. The text
is positioned clearly and prominently for the user to easily spot it.

User Interaction:

• The GUI is designed to be relatively simple and minimalistic. It does not contain interactive
elements like buttons or input fields since its primary function is to provide information (the
contact information and the purpose of the application).

• Static Display: The primary interactive aspect is the display of information about the help desk
and the contact email for assistance. There is no active interaction required from the user beyond
viewing the information.

Figure 18: HELP DISK

34
4.4.10 Developer module (developer.py)

The GUI of the Help disk widows with Face Recognition consists of the following main components:
Main Window Setup:
• Window Size and Position: The window is set to a large size (1530x790 pixels), which is
spacious enough to accommodate both images and text.
• Window Title: The window is titled "Face Recognition System" to indicate the purpose of the
program.
Title Label:
• The title "DEVELOPER" is displayed at the top of the window using a large, bold font (30px) in
green color. This label helps in identifying the section of the app that provides details about the
developers.
• The title is placed in a white background and spans the full width of the window (1530px) with a
height of 45px.
Top Image:
• A large background image is loaded using the Pillow (PIL) library and displayed in the window.
The image is resized to fit the width and height of the window (1530x720 pixels).
• This image, which could be a relevant visual or backdrop related to the project, serves as the
background for the developer information section.
Frame for Developer Info:
• A Frame widget is created inside the background image container to hold the developer details.
This frame is positioned at (1050, 0) with a width of 500px and height of 710px, taking up a
portion of the window on the right side.
• The background color of the frame matches the background color of the image, creating a
seamless visual integration.
Developer Image:
• Within the frame, an image of the developer (possibly a logo or profile picture) is loaded and
resized to 200x200 pixels. This image is placed at the top-right corner of the frame.
• The image is displayed as a Label and serves to visually represent the developers.
Developer Information Labels:
• Several labels are used to provide detailed information about the developers:
• Greeting and Introduction: The first labels welcome the user and greet them with "Assalamu

35
Alikum" and "Welcome to Developer section."
• App Information: Subsequent labels explain that the app is collaboration between the developer
Zia and Zuhaib.
• Each label uses a bold font (15px) and is placed at different vertical positions in the frame to
ensure that the information is displayed in a clear and organized manner.
• The text color is dark blue, and the background color matches the frame's background, ensuring
the content blends well with the overall design.
Additional Developer Image:
• Another image is added below the developer details to further enrich the content. This image is
resized to 500x510 pixels and is placed below the developer information labels.
• Window Size and Position: The window is set to a large size (1530x790 pixels), which is
spacious enough to accommodate both images and text.

Figure 19: ATTENDENCE MANAGEMENT SYSTEM

36
Chapter 5

5 SYSTEM IMPLEMENTATION

5.1 Introduction
In this chapter, we will examine the implementation of our Face Recognition System. This system
integrates several components, such as sign-up, login, face recognition, and more. All these components
are interconnected and work together to complete the system. We developed the Face Recognition
Attendance System using Python, and various libraries were used, such as Tkinter for the GUI, OpenCV
for image processing, PIL library for image handling, and MySQL. connector for database interaction.
We will thoroughly explore all of these libraries in this chapter.

5.2 Overview of the System Modules


The system comprises the following modules:
• signup.py– this module is use Handles the user registration and stores user data.
• login.py – In my project this module Manages user authentication and login functionality.
• main.py–in my project I define this module, is act main entry point of the application where
the home screen and menu options are defined.
• student.py– this module manages the addition and storage of student data, including personal
details and face image.
• train.py– in this module different algorithm use to Trains a face recognition model using the
student data stored in the system.
• FaceRecognition.py– this module also use algorithm, Implements the logic for recognizing
faces using the trained model.
• attendance.py – this module in our project Logs the attendance of students based on face
recognition.
• help.py – this module provides a help desk for the users with contact details.
• developer.py – this module is used to Displays information about the developers of the
system.

37
5.3 Libraries and algorithms
In our project, we have used different libraries such as Tkinter, OpenCV, PIL, and various algorithms
like LBPH and Haar Cascade Classifier. These libraries and algorithms have been used in our modules to
ensure that the system works efficiently and provides the correct output. are used in our project

5.3.1 Tkinter
Tkinter is a standard library in Python used for creating graphical user interfaces (GUIs). For this reason,
we have used Tkinter in every module of our project. Tkinter provides various widgets such as labels,
frames, and other components that we have used in our system.
Importing tkinter: To use Tkinter, we first import it as follows:
Code:
from tkinter import *
from tkinter import ttk
In the beginning of each module, i import tkinter for creating the graphical interface. The ttk module is
used for more modern widgets like comboboxes and styled buttons etc.
5.3.1.1 Creating the Main Window
In my project each of the modules like Signup.py, Login.py, Attendance.py,main.py etc., I set up the
main window where all other widgets (buttons, labels, tables, etc.) are placed. For example, my all
module I use this line of code:
Code:
self.root = Tk()
self.root.geometry("1530x790+0+0") # Define the window size
self.root.title("Face Recognition System") # Set the title of the window
• Tk() it is used to initializes the main window.
• geometry () through this I sets the window's size.
• title () this gives a title to the window.
5.3.1.2 Creating Widgets
Widgets in Tkinter are the building blocks of any GUI. They are used to display information and interact
with the user. Some examples from my code:
Labels: I used labels for displaying text or images in my system.
Code:

38
title_lbl = Label (self.root, text="Help Desk", font=("times new roman", 35, "bold"), bg="white")
title_lbl.place(x=0, y=0, width=1530, height=45)
• Label () creates a label widget with specified text, font, and background color.
• place () is used to position the widget at specific coordinates.
Entry (Textboxes): In my project I used Entry for taking input from the user (like in login, signup,
attendance entry).
Code:
attendance_entry = ttk.Entry(leftInsdide_frame, textvariable=self.var_atten_id, font=("times new
roman", 11, "bold"))
attendance_entry.grid(row=0, column=1, padx=15, pady=9)
• Entry () creates a textbox where the user can type text.
• grid () arranges widgets in a grid layout with specific rows and columns.
Buttons: This are also Used in my project to trigger actions like submitting data, importing/exporting
CSV files, etc. below line of code are used in my project.
Import_csv_btn = Button (btn_fram, text="Import csv", command=self.importCSV, font=("times
new roman", 17, "bold"), width=17, bg="red", fg="white", activebackground="yellow")
Import_csv_btn.grid(row=0, column=0, padx=0)
• Button () in my project it is use to creates a button widget, with text, and an action defined by the
command parameter.
• When clicked, this button calls the method importCSV().
Combobox: In my project Combobox are Used for selecting options from a list (e.g., Attendance status:
Present/Absent). Below line of code is part of my project.
dep_combo = ttk.Combobox(leftInsdide_frame, textvariable=self.var_attend, font=("times new roman",
10, "bold"), state="readonly")
dep_combo["values"] = ("Status", "Present", "Absent")
dep_combo.current(0)
dep_combo.grid(row=3, column=1, padx=2, pady=10)
• Combobox() allows the user to select a value from a dropdown list.

5.3.2 PIL (Python imaging Library)


We have used the PIL (Python Imaging Library) in our system for image processing and handling. This
library is essential for our Face Recognition system. Many modules in our system use PIL to add and

39
process images. We have used PIL in various modules like signup.py, login.py, main.py, student.py, and
others.
5.3.2.1 PIL Library Overview
This library is used for opening, manipulating, and saving various image file formats. In my project, it is
primarily used for:
1. Image resizing and conversion.
2. Displaying images within the GUI (Tkinter).
3. Handling image files for face recognition, capturing images, and processing them.
5.3.2.2 PIL Functionality in Different Modules
main.py (Main GUI and Image Display): In this module, we have used the PIL library. We have used
the PIL library in two important places. Below is the code that we have used in our module.
Code:
img3 = Image.open(r"C:\Users\HP\Desktop\New folder\547464.jpg")
In this, we have used a function, Image.open(). The function's job is to open an image from a specific
path and display it on the system.
Additionally, we have used another place, which is as follows:
Code:
img3 = img3.resize((1537, 780), Image.LANCZOS)
After the image is loaded, the resize () method is used to resize the image to the dimensions 1537x780
pixels. The second argument, Image.LANCZOS, specifies the resampling filter to be used for resizing.
LANCZOS is a high-quality resampling filter that produces smooth results when resizing images.
Student.py: This module, we have also used the PIL library. The two important uses we have
implemented in our module are explained through the code below:
Code:
img = Image.open(r"C:\Users\HP\Desktop\New folder\morskie-oko-tatry.jpg")
The Image.open() function is used to open an image file from specific location. Another use PIL library
in student.py module is:
Code:
self.photoimg = ImageTk.PhotoImage(img):
The ImageTk.PhotoImage() function is used to convert the PIL image into a format that can be displayed
by Tkinter
FaceRecognition.py: In this module, we have also used the PIL library to open an image using the
40
image.open() function. Additionally, we have used PIL to resize the image by applying the
image.resize() function. Another usage is shown in the code below.
Code:
f_lbl = Label (self.root, image=self.photoimg_top)
f_lbl.place(x=0, y=46, width=735, height=690) # Display the resized image on the Tkinter window
The above code has been written in our module to display the resized image.
Train.py: The PIL library is also used in the Train.py module because image processing is involved in
this module as well. In this module, we used the image.open() function to open an image. Additionally,
the image.resize() function was used to resize the image according to the window dimensions.
Furthermore, to display the image, we used the following code with a label.
Code:
self.photoimg_top = ImageTk.PhotoImage(img_top). This is done so the image can be displayed
properly. We also used PIL for another purpose, as shown in the code below
.
img = Image.open(image). convert('L’) # Convert image to grayscale
image_np = np.array(img, 'uint8') # Convert to numpy array for OpenCV
In this line of code, we first converted the image to grayscale so that the image can be set for training.
Attendance.py:In this module, we used the image.open() function to open the image. Additionally, we
resized the image using the following code: Img.resize((800, 330), Image.LANCZOS). We also used PIL
in this module to convert the image into a Tkinter-compatible format, like this.
Code:
self.photoimg = ImageTk.PhotoImage(img).
Help.py and developer.py: In both of these modules, we used PIL for the following tasks:
• To open the image.
• To resize the image.
• To convert the image into a Tkinter-compatible format.
• To display the image.

5.3.3 OpenCv
OpenCv is a huge open-source library for computer vision, machine learning, and image processing.
Now, it plays a major role in real-time operation which is very important in today’s systems. By using it,

41
one can process images and videos to identify objects, faces, or even the handwriting of a human.
We have used OpenCV within our system for image processing because this library is very important for
face recognition systems. We have used this library for various tasks such as face detection, opening the
camera, releasing the camera, training the face, recognizing the face, and many other functions. Through
this, we will see step by step which tasks we performed and how we did them, with the code that we used
in our different modules. (Kiran, 2022)
5.3.3.1 Face Detection
The primary OpenCV functionality used for face detection in my code is the Haar Cascade Classifier.
Loading the Cascade Classifier:
The Haar Cascade Classifier is a pre-trained model that is used to detect faces in images or video frames.
It is loaded using the cv2.CascadeClassifier() method, which loads an XML file containing the trained
face detection model. I have used this for load the cascade classifier by using the code provided below.
Code:
face_classifier = cv2.CascadeClassifier("C:\\Users\\HP\\Desktop\\my project\\
haarcascade_frontalface_default.xml")
Detecting Faces: After loading the classifier,we use in our module the method detectMultiScale() is
used for face detection from the given image. The function detectMultiScale() accepts the image in
grayscale form as input and returns a list of rectangles where faces have been detected. . I have used this
for face detection by using the code provided below.
Code:
faces = face_classifier.detectMultiScale(gray, 1.3, 5)
5.3.3.2 Cropped Face Image:
The faces detected are represented by rectangular coordinates (x, y, w, h) and are used to crop the region
of interest (ROI) from the image. This cropped face can then be processed further (e.g., resized or
saved).we use the bellow line of code to achieve this.
Code:
face_cropped = img[y:y+h, x:x+w]
5.3.3.3 Opening the Camera:
OpenCV cv2.VideoCapture() is used in my student detail module to open the default camera to capture
video frames. The 0 parameter indicates the default camera, but it can be changed to select other
connected cameras. I use the below line of code to open camera.
Code:
42
cap = cv2.VideoCapture(0) # Open default webcam
5.3.3.4 Capturing Frames
The cap.read() function is used in student.py to capture each frame from the camera in real-time. It
returns a boolean (ret) to indicate success and the current frame (my_frame). I use the below line of code
to capture frame.
Code:
ret, my_frame = cap.read()
5.3.3.5 Displaying Captured Frames
OpenCV's cv2.imshow() is used in my module student.py to display the captured frames (or processed
frames) in a window. In my case, it shows the cropped faces as they are detected. Below line of code use
in my module:
Code:
cv2.imshow("Cropped Face", face)
5.3.3.6 Saving the Captured Face Images
After detecting a face, we save captured image. The script saves it as a grayscale image. File path is
dynamically generated with respect to user ID and image ID. This line of code I use in my module.
Code:
cv2.imwrite(file_name_path, face)
The image is saved into the folder defined by the path "C:\\\Users\\\HP\\\Desktop\\my project\\data\\
user." + str(id) + ".\\\" + str(img_id) + ".jpg"
5.3.3.7 Exiting the Capture Loop
The loop captures images until the user either presses the Enter key (key code 13) or until 200 images
have been captured. This ensures the process stops after capturing a set number of face images. Below
line of code are use in my system.
Code:
if cv2.waitKey(1) == 13 or int(img_id == 200): # Exit on Enter or after 200 images
break
5.3.3.8 Image Processing
Image processing is the most important part of face recognition. We have used it in our student detail
module to convert the image into grayscale.
Converting to Grayscale:
The captured face image is converted to grayscale using cv2.cvtColor(), which is essential for face
43
recognition tasks. We use this below line of code to convert face image to grayscale.
Code:
face = cv2.cvtColor(face, cv2.COLOR_BGR2GRAY)
Resizing the Cropped Face:
The cropped face is then resized to a fixed dimension of 450x450 pixels for uniformity before it is saved
or processed. For that, we wrote this line of code in student.py.
Code:
face = cv2.resize(face, (450, 450))
5.3.3.9 Camera Release
After the face detection and data capture process, we released the camera using cap.release(), which is
important for cleaning up resources and freeing the camera device.
Code:
cap.release()

5.3.4 Training a Face Recognition Model


For training, we have used LBPH (Local Binary Patterns Histograms) in the train.py file. (Rosebrock,
2020)
5.3.4.1 LBPH algorithm
cv2.face.LBPHFaceRecognizer_create() is used to create a face recognizer which later trains the
classifier. This is an integral part of the OpenCV face recognition process.
cv2.face.LBPHFaceRecognizer_create() is the face recognition algorithm that creates an LBPH (Local
Binary Patterns Histograms) model. LBPH is effective for face recognition under conditions of various
lighting.
5.3.4.2 Training
The program trains the face recognizer model (LBPHFaceRecognizer) on the gathered faces from the
previous step. It binds every face image with a unique identifier. below line of code use in train.py
Code:
clf = cv2.face.LBPHFaceRecognizer_create() # Create an LBPH face recognizer.
clf.train(faces, ids) # Train with collected faces and their corresponding IDs.

5.3.5 Saving the Trained Model


Once the classifier is trained with the faces and IDs, it is saved to disk for later use. We use this line of
code in train.py for saving the trained model.

44
Code:
clf.write(output_path) # Save the trained model to the specified file path
Loading the Trained Classifier
Now we load the trained classifier. This function loads the previously trained classifier from the XML
file for later use in face recognition. In train.py the code appear like below.
Code:
clf.read(output_path) # Load the trained classifier from file

5.3.6 Displaying Processed Image for Training


While the images are being processed and added to the training set, OpenCV displays each image to
show the training process in real-time. The algorithm we use to display processed image for training are
Code:
cv2.imshow().
cv2.imshow("Training", image_np) # Show the current face being processed
cv2.waitKey(1) # Wait for 1 millisecond before processing next

5.3.7 Face Recognition using LBPH (Local Binary Patterns Histogram)


We use LBPHFaceRecognizer_create() from the OpenCV system in recognition. The model uses data
input by the classifier.xml which includes the face recognition train.
For every detected face, the code uses clf. predict () to predict the person who the face belongs to.
Return: A confidence score. This expresses the likelihood of the face belonging to known faces. Below is
the single line of code that we would write in FaceRecognize.py.
Code:
clf = cv2.face.LBPHFaceRecognizer_create()
clf.read("C:\\Users\\HP\\Desktop\\my project\\classifier.xml") (University, 2023)

5.3.8 Face Detection & Recognition in Video Stream


We use cv2.VideoCapture(0) for opening the webcam to have constant video feed in the module
FaceRecognizer.py.
Face detection along with recognition is done inside every frame of the video. The function
draw_boundary is used to detect face, draw rectangle around it along with annotating the extracted face
with student details such as ID, name, roll, and department.
If the face is detected with a confidence level above 83%, then attendance is recorded for that student;
otherwise, the face is marked as "Unknown". (Howse, 2020)
45
Below is the line of code we used:
Code:
video_cap = cv2.VideoCapture(0)

5.3.9 Attendance Logging


The attendance method logs the attendance of the student based on face recognition. If the student is
recognized within a 60-minute window, their attendance is recorded in the attendance.csv file. If the
attendance of a student had already been recorded within this window, no new record would be added.

Figure 20: COMPERESSION BETWEEN ALL PROJECTS

Provide for regular updates of the system by adding new features as well as security patches.

46
Chapter 6

6 SYSTEM TESTING AND ANALYSIS

6.1 Testing Overview


To check the attendance using the facial recognition System, testing is essential because the system
fulfills all its functional and non-functional requirements. Testing is done to find out the defects, to
ascertain that the system works properly, and to ensure it does the work as desired in different scenarios.
Testing involved ensuring the system performed its work in handling user's input efficiently, recording
attendance, compiling reports, and identifying a face.

6.2 Performance Testing


Performance testing is a non-functional software testing technique that determines how the stability,
speed, scalability, and responsiveness of an application holds up under a given workload. It’s a key step
in ensuring software quality, but unfortunately, is often seen as an afterthought, in isolation, and to begin
once functional testing is completed, and in most cases, after the code is ready to release.
The goals of performance testing include evaluating application output, processing speed, data transfer
velocity, network bandwidth usage, maximum concurrent users, memory utilization, workload
efficiency, and command response times. (Gonnet, 2012)
Types of Testing Conducted

6.2.1 Unit Testing


These tests are done module-specific, such as database interactions, report producing functionalities, and
modules of facial recognition. Each module is ensured to be functioning as expected when applied in
isolation.

6.2.2 Integration Testing


Integration testing ensured that the system worked as a whole, including the database, front-end, back-
end, and facial recognition parts of the system. The entire system was tested to ensure that data was sent
between modules accurately.

47
6.2.3 UAT
The stakeholders carried out UAT for the confirmation of the system's functionality and usability. The
stakeholders verified that the facial recognition was working correctly and that the attendance was
recorded correctly by testing the system.

6.2.4 Performance evaluation Testing


This was done to ensure the system could do face detection and attendance marking in real time without
any error. The system was tested in various lighting conditions and viewpoints for its robustness.

6.2.5 Security Testing


This ensured that the unauthorized users could not alter the attendance records or gain access to the
private information of students. To remove weaknesses in the system, the proper encryption and security
measures were ensured.

6.3 Testing Results


6.3.1 Face Recognition Accuracy
The face recognition algorithm satisfactorily worked in the normal conditions with accuracy well over
90%. Nevertheless, it reduced marginally at extreme angles and with faces in dim light.

6.3.2 Attendance Marking


There was no wrong attendance marked. The process automated was accurate. Excel formatted reports of
attendance were obtained satisfactorily.

6.3.3 User Interface


Administrators could easily handle their users, monitor the presence logs, and make necessary reports by
the friendliness and simplicity of the usage of the user interface

6.3.4 System Performance


No latency was evident regarding processing and the system would perform appropriately under normal
functioning conditions. However, because the current design only allows one user at a time, performance
may suffer if many users attend the classroom at once.

6.3.5 Security
The system was secure, and access to sensitive data was restricted to authorized personnel only. No
vulnerabilities were found during the testing.

48
6.4 Conclusion
The system has gone through all the major testing steps and has proven its ability to automate attendance,
generate very accurate reports, and even operate securely. Though some things could be done better; for
example, managing multiple users at once and improving its performance in dimly lit environments, the
system is good enough to be a point of departure for future development.

6.5 System analysis


It refers to the process of determining the system's advantages and disadvantages along with the probable
areas for improvement. This includes understanding the requirements, functionality, and constraints in
order to ensure that project goals are met or not. It helps to determine how good the system can perform
under different conditions like noticing possible flaws and suggesting some recommendations for future
improvements.

6.5.1 Personal Growth Journey


A Face Recognition Attendance System was something that gave us an opportunity to develop our
technical skills as well as project management skills.
 Tools and Technologies: We become experts in using Python especially with libraries like
OpenCV for facial recognition, Visual Studio Code to work efficiently with debugging.
 Problem-Solving: The problems associated with the accurate detection of a face or errors while
logging have always cropped up in this particular project. Looking at and rewriting the code
several times, while altering the associated parameters to compensate for variables such as
lighting and angle proved effective.
 Teamwork and Time Management: This project is a result of collaboration, effective task
distribution and efficient time management. We balanced the project with academic
responsibilities that taught us how to prioritize tasks and allocate time effectively.
 Teamwork and Time Management: The entire project was a result of collaboration, effective task
distribution and efficient time management. This was balanced with our academic responsibilities
that taught us to prioritize tasks and use the right amount of time to execute them.

6.5.2 System Objectives and Scope


49
Objectives: The main objective of the system was to automatically track attendance in classrooms
through facial recognition technology. The system is designed to avoid human error and improve the
accuracy of attendance records.
Scope: The system uses real-time data taken by a camera of a laptop and doesn't use internet
connectivity. It also generates attendance reports in Excel. However, the system cannot handle multiple
students entering the classroom at one time. Also, it has less recognition accuracy when the lighting is
poor or the students face is tilted to extreme angles. The system is also not designed as a mobile
application.

6.5.3 Future Scope and Enhancements


 Increased Accuracy: To make the system further robust and more accurate regarding the
identification, deep models may be incorporated for improving recognition with adverse
conditions like below par illumination or even for masked or glasses-wearing users.
 Multiple Users Recognition: The system will be improved to identify various users in one frame
so will be able to work quite efficiently for huge classes.
 Mobile Application: Android mobile application will be added for its better usability and user-
convenience.
 Data Privacy: The system might include data encryption that would protect user data and might
be in accordance with privacy regulations like GDPR.

50
Chapter 7

7 CONCLUSION AND FUTURE RECOMENDATION

7.1 Conclusion
By using facial recognition technology, the Face Recognition Attendance System effectively automates
the attendance process, minimizing errors and manual efforts. The system uses Python and OpenCV to
detect and recognize faces, making it a simple and reliable way to manage attendance in schools,colleges
and universities and can be used offices as well. The project achieved its main goals and provided
valuable possibilities for learning about machine learning, programming, and system development. Even
though the system has some limitations, like trouble recognizing faces in low light or in partially
blocked, it is a good starting point for improving attendance management technology.

7.2 Future Recommendations


Future developments could improve the system's capabilities in a number of ways:
1. To increase accuracy and manage difficult situations like dim illumination or partially covered faces,
use other powerful deep learning models, such as Convolution Neural Networks (CNNs).
2. Create a mobile application to improve user comfort and enable distant access to attendance data.
3. Include cloud storage for saleable and safe data management that allows for device syncing and real-
time access.
4. Enhance the system to identify more than one face at simultaneously, which will make it appropriate
for larger groups.
5. To improve security and privacy, implement encryption and make sure data protection regulations are
followed.
6. To develop a complete management solution, increase integration with other systems, such as HR
tools or Learning Management Systems (LMS).
By improving these areas, the system can become more robust, versatile, and widely applicable across

51
different sectors.

8 References
o (n.d.).
o Gautam Buddh Nagar, U. P. (2024, 1022). Retrieved from GeeksforGeeks:
https://www.geeksforgeeks.org/functional-vs-non-functional-requirements/#functional-
requirements
o Gonnet, G. (2012, 01 02). opentext. Retrieved from OpenText: https://www.opentext.com/what-
is/performance-testing#:~:text=Performance%20testing%20is%20a%20non,up%20under%20a
%20given%20workload.
o Howse, J. (2020). OpenCV for Secret Agents. Cincinnati, OH.
o Kiran, M. a. (2022, 4 1). Automated Face Recognition Attendance System using Python Oand
OpenCV.
o Krüger, G. (22, 7 2012). PERFORCE. Retrieved from perforce:
https://www.perforce.com/blog/alm/what-are-non-functional-requirements-examples#what-are-
non-functional-requirements
o Rosebrock, A. (2020). Prectical Pyhton and OpenCv. uk.
o University, R. a. (2023, 2 5). Face Recognization Based Attendance System Using Haar Cacade
and LBPH.

52

You might also like