Professional Documents
Culture Documents
Biometrics Project Final32132313131313
Biometrics Project Final32132313131313
Recognition
A PROJECT REPORT
Submitted by
JEET JATIN SHAH [Reg No:RA2111003010034]
RAHUL GUPTA [Reg No: RA2111003010047]
SARANSH [Reg No:RA2111003010050]
RUPAJ SEN [Reg No: RA2111003010064]
RISHABH RAJ [Reg No: RA2111003010068]
HARSH RAJA [Reg No: RA2111003010070]
Under the Guidance of
Dr. S. DEEPAJOTHI
Associate Professor, Department of Computing Technologies
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
Certified that 18CSE357T project report titled “Attendance Management System using
the project work under my supervision. Certified further, that to the best of my knowledge the
work reported here in does not form part of any other thesis or dissertation on the basis of which
a degree or award was conferred on an earlier occasion for this or any other candidate.
I/We here by certify that this assessment compiles with the University’s Rules and
Regulations relating to Academic misconduct and plagiarism, as listed in the University
Website, Regulations, and the Education Committee guidelines.
I / We confirm that all the work contained in this assessment is our own except where
indicated, and that we have met the following conditions:
▪ Clearly references / listed all sources as appropriate, Referenced and
put in inverted commas all quoted text (from books, web,etc.)
▪ Given the sources of all pictures, data etc that are not my own.
▪ Not made any use of the report(s) or essay(s) of any other
student(s)either past or present, Acknowledged in appropriate places
any help that I have received from others (e.g fellow students,
technicians, statisticians, external sources)
▪ Compiled with any other plagiarism criteria specified in the Course
hand book / University website
I understand that any false claim for this work will be penalized in accordance with the
University policies and regulations.
DECLARATION:
I am aware of and understand the University’s policy on Academic misconduct and
plagiarism and I certify that this assessment is my / our own work, except where indicated
by referring, and that I have followed the good academic practices noted above.
Date:
Student 1 Signature: Jeet Jatin Shah
Student 2 Signature: Rahul Gupta
Student 3 Signature: Saransh
Student 4 Signature: Rupaj Sen
of Science and Technology, for the facilities extended for the project work and his continued
support.
We extend our sincere thanks to Dean-CET, SRM Institute of Science and Technology, Dr.
Computing, SRM Institute of Science and Technology, for her support throughout the project
work.
We are incredibly grateful to our Head of the Department, Dr. M. Pushpalatha, Professor,
Department of Computing Technologies, SRM Institute of Science and Technology, for her
We register our immeasurable thanks to our Course Faculty, Dr. S DEEPAJOTHI, Assistant
The benefits of the Attendance Management System using Facial Recognition are
numerous, including increased accuracy and security of attendance data, cost savings,
improved productivity, and compliance with legal requirements. The system is
customizable to fit the unique needs of each organization and is designed to be user-
friendly and intuitive.
However, there may be obstacles in the development and implementation of the system,
such as technical challenges, data privacy concerns, and potential resistance from
employees.
Nevertheless, with the right resources, expertise, and a well-designed implementation
plan, the Attendance Management System using Facial Recognition can bring significant
benefits to organizations seeking to improve their attendance management processes.
TABLE OF CONTENTS
ABSTRACT vi
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF SYMBOLS AND ABBREVIATIONS xi
1. INTRODUCTION 1
1.1 General 1
1.2 Machine Learning and Deep Learning 2
1.3 Difference Between Machine Learning and Deep Learning 4
2 LITERATURE SURVEY 11
2.1 Motivation 12
2.2 Objective 13
3 ARCHITECTURE AND ANALYSIS OF LEPROSY 15
DETECTION
3.1 Architecture Diagram 15
3.2 Frontend Design 16
3.3 Backend Design 19
4 DESIGN AND IMPLEMENTATION OF LEPROSY 22
DETECTION USING EXPLAINABLE AI
4.1 Dataset 23
4.2 Image Preprocessing 25
5 RESULTS AND DISCUSSION 39
5.1 Performance Analysis using Various Metrics 39
5.2 Comparison Between Existing Models 45
6 CONCLUSION AND FUTURE SCOPE 48
6.1 Conclusion 49
6.2 Future Scope 49
REFERENCES 50
1.
A
p
p
e
n
d
i
c
e
s
LIST OF TABLES
INTRODUCTION
The idea for this project came to us in class as we saw the amount of time
that has to be skipped for attendance and the nonchalance of students who
had already marked their attendance which leads to the method being
delayed further, we then decided that this would be a good and interesting
field to delve into for our Project as the field of Image processing,
recognition etc; has a world of scope and would help us inculcate our skills
and make us a tad bit ready for any or most challenges ahead.
.
REFERENCES
[1] Hernández, E.; Sanchez-Anguix, V.; Julian, V.; Palanca, J.; Duque, N. Rainfall prediction: A
deep learning approach. In International Conference on Hybrid Artificial Intelligence Systems;
Springer: Cham, Switzerland, 2016; pp. 151–162.
[2] Goswami, B.N. The challenge of weather prediction. Resonance 1996, 1, 8–17.
[3] Nayak, D.R.; Mahapatra, A.; Mishra, P. A survey on rainfall prediction using artificial neural
network. Int. J. Comput. Appl. 2013, 72, 16.
[4] Kashiwao, T.; Nakayama, K.; Ando, S.; Ikeda, K.; Lee, M.; Bahadori, A. A neural network-
based local rainfall prediction system using meteorological data on the internet: A case study using
data from the Japan meteorological agency. Appl. Soft Comput. 2017, 56, 317–330.
[5] Mislan, H.; Hardwinarto, S.; Sumaryono, M.A. Rainfall monthly prediction based on artificial
neural network: A case study in Tenggarong Station, East Kalimantan, Indonesia. Procedia Comput.
Sci. 2015, 59, 142–151.
[6] Muka, Z.; Maraj, E.; Kuka, S. Rainfall prediction using fuzzy logic. Int. J. Innov. Sci. Eng.
Technol. 2017, 4, 1–5.
3
TABLE OF CONTENTS
1 ABSTRACT
2 PROBLEM STATEMENT
4 IDENTIFYING REQUIREMENTS
11 DEVELOPMENT OF TESTING
FRAMEWORK/USER INTERFACE
13 ARCHITECTURE/DESIGN/FRAMEWORK/IMPLE
-MENTATION
14 CONCLUSION REFERENCES
15 APPENDIX (CODE)
4
ABSTRACT
The Attendance Management System using Facial Recognition is a project aimed at developing
a reliable and efficient attendance management system for organizations. The system uses facial
recognition technology to automate attendance tracking and streamline payroll and HR
processes. It is implemented using Python programming language and utilizes OpenCV, CMake,
Pandas, and other Python libraries for facial recognition. The system also incorporates databases
such as MongoDB and utilizes SQL queries for data management. The collected attendance data
is reported in an Excel sheet for further analysis.
The system's architecture consists of multiple modules such as a facial recognition module,
attendance tracking module, and reporting module. It also incorporates security measures to
protect the collected data and ensure compliance with laws and regulations related to attendance
tracking and data protection.
The benefits of the Attendance Management System using Facial Recognition are numerous,
including increased accuracy and security of attendance data, cost savings, improved
productivity, and compliance with legal requirements. The system is customizable to fit the
unique needs of each organization and is designed to be user-friendly and intuitive.
However, there may be obstacles in the development and implementation of the system, such as
technical challenges, data privacy concerns, and potential resistance from employees.
Nevertheless, with the right resources, expertise, and a well-designed implementation plan, the
Attendance Management System using Facial Recognition can bring significant benefits to
organizations seeking to improve their attendance management processes
6
Aim
To Frame a project team, analyze and identify a Software project. To create a business case
and Arrive at a Problem Statement for the Attendance Management System using Facial Recognition.
Project Description
This project aims to develop an Attendance Management System using Facial Recognition
technology. The system will be implemented using Python programming language, along with
the use of OpenCV, CMake, Pandas, and various other Python libraries for facial recognition.
The system will also incorporate databases such as MongoDB, and will utilize SQL queries for
data management. The collected attendance data will be reported in an Excel sheet for further
analysis.
Business Case
The business case for this project is to provide an efficient and secure method of attendance
management for organizations. By using facial recognition technology, the system eliminates
the need for traditional methods such as punch cards or manual sign-ins, which can be prone
to errors and manipulation. Additionally, the system will save time for employees and
administrators by automating the attendance tracking process.
Another benefit of this system is that it can be integrated with existing databases, such as a
company's payroll system, to streamline the process of tracking attendance and calculating
employee hours. This will save HR and payroll staff time and effort in tracking attendance
records and preparing reports.
The use of facial recognition technology also provides a higher level of security, as it ensures
that only authorized individuals are able to sign in, reducing the risk of fraud or errors. This
can be particularly useful for organizations that have sensitive information or restricted access
areas.
7
Result
Thus, the project team formed, the project is described, the business case was prepared
and the problem statement was arrived.
8
SUBMITTED
RUPAJ SEN
BY
THE PROJECT
In bullet points, describe the problem this project aims to solve or the opportunity it aims to develop.
This project aims to address the issues of inefficiency and inaccuracy in attendance management
within organizations by creating a secure and automated system utilizing facial recognition
technology. The system will help save time for employees and administrators, as well as integrate
seamlessly with existing databases and improve the security of attendance tracking by only
allowing authorized individuals to sign in.
THE HISTORY
In bullet points, describe the current situation.
Currently, many organizations still rely on traditional methods such as punch cards or manual sign-
ins for attendance tracking, which are known to be time-consuming, error-prone, easily
manipulated and lack the necessary security measures. But as technology has advanced,
organizations are beginning to recognize the limitations of these traditional methods and are starting
to adopt new technologies such as facial recognition to improve the accuracy, security, and
efficiency of attendance tracking, However, these new technologies are not yet widely adopted
and many organizations still rely on traditional methods.
LIMITATIONS
List what could prevent the success of the project, such as the need for expensive equipment, bad weather,
lack of special training, etc.
There are several factors that could prevent the success of the Attendance Management System
using Facial Recognition project, including: the high cost of equipment and hardware, lack of
technical expertise, privacy concerns, limited accuracy of the facial recognition technology,
resistance to change, scalability limitations, difficulties with integrating the system with existing
systems, data security challenges, and legal considerations such as compliance with laws and
regulations.
APPROACH
List what is needed to complete the project.
To complete the Attendance Management System project, the organization will need necessary
hardware, software, database, technical expertise, resources, integration with existing systems,
data security measures, and compliance with laws related to facial recognition technology and
data protection.
BENEFITS
In bullet points, list the benefits that this project will bring to the organization.
The implementation of the Attendance Management System using Facial Recognition can
automate the attendance tracking process, increase the accuracy and security of attendance
data, and streamline payroll and HR processes, resulting in cost savings, increased productivity and
compliance with laws and regulations. Additionally, the system can be tailored to fit the specific
needs of the organization.
10
Aim
To identify the appropriate Process Model for the project and prepare
Stakeholder and User Description.
Incorporate information to below table regarding stakeholders of the project [Make use
of below examples]
Result
Thus the Project Methodology was identified and the stakeholders were
described.
14
Aim
To identify the system, functional and non-functional requirements for the project.
System Requirements:
To run the Attendance Management System using Facial Recognition, the minimum system
requirements include:
Hardware:
A computer with a dual-core processor or higher
A webcam with a resolution of 720p or higher
2GB of RAM
A graphics card with at least 128MB of VRAM
Software:
Windows 7 or later, or MacOS 10.12 or later
Python 3.x
OpenCV 4.x
cmake 3.x
The facial recognition library
Software:
Windows 10 or later, or MacOS 11 or later
Python 3.x
OpenCV 4.x
cmake 3.x
The facial recognition library
15
In general, a higher-end system will allow for more efficient and accurate processing of the facial
recognition data.
Functional Requirements
Functional Requirements are the specific features and capabilities that a system must have in order
to meet the needs and expectations of the stakeholders. For the Attendance Management System
using Facial Recognition project, some functional requirements may include:
Facial recognition: the ability to accurately and efficiently recognize the face of an employee to
track attendance.
Real-time tracking: the ability to track attendance in real-time and immediately update the
database.
User Management: the ability to create, modify, and delete user accounts, and assign permissions
for different levels of access.
Attendance Report: the ability to generate attendance reports, including daily, weekly, and
monthly reports, and to export the data to an excel sheet.
Integration with Payroll/HR systems: the ability to integrate the Attendance Management
System with existing payroll or HR systems to streamline the process of tracking attendance and
calculating employee hours.
Data security: the ability to store and secure the data collected by the facial recognition system,
including measures to protect sensitive information.
User-friendly interface: the ability to provide an intuitive, user-friendly interface for employees
to log in and view their attendance records.
Customization: the ability to customize the Attendance Management System to fit the unique
needs of the organization.
Scalability: the ability to handle a large number of employees and a high volume of transactions,
and to expand the system as the organization grows.
Compliance with laws and regulations: the ability to comply with laws and regulations related
to facial recognition technology and data protection.
16
Non-Functional Requirements
Non-Functional Requirements for the Attendance Management System using Facial Recognition
project could include:
User-friendliness: The system should be easy to use and navigate, with a clear and intuitive
interface.
Scalability: The system should be able to handle a large number of employees and transactions.
Performance: The system should be able to perform facial recognition quickly and accurately,
with minimal latency.
Data Security: The system should have robust security measures in place to protect the data
collected by the facial recognition system.
Legal Compliance: The system should comply with laws and regulations related to facial
recognition technology and data protection.
Data Integrity: The system should be able to store and manage attendance data accurately and
securely.
Integration: The system should be able to integrate with existing payroll or HR systems to
streamline the process of tracking attendance and calculating employee hours.
Support and Maintenance: The system should have adequate support and maintenance in place
to ensure its longevity and effectiveness.
Result
Thus the requirements were identified and accordingly described.
18
Aim
To Prepare Project Plan based on scope, Calculate Project effort based on resources, Find Job
roles and responsibilities
Stakeholder Identifying
Analyzing
Engagement
Management Plan
2. Estimation
2.1. Effort and Cost Estimation
20
In this matrix, "R" stands for "Responsible", "A" stands for "Accountable", "I" stands for "Informed",
and "-" stands for "Not involved".
"PM" stands for "Project Manager", "BA" stands for "Business Analyst", "SA" stands for "Solution
Architect", "DBA" stands for "Database Administrator", "FED" stands for "Front-end Developer", "BED"
stands for "Back-end Developer", "QA" stands for "Quality Assurance Engineer", "TW" stands for
"Technical Writer", "DO" stands for "DevOps Engineer", and "SS" stands for "Security Specialist".
Reference
1. https://www.pmi.org/
2. https://www.projectmanagement.com/
3. https://www.tpsgc-pwgsc.gc.ca/biens-property/sngp-npms/ti-it/ervcpgpm-dsfvpmpt-
eng.html
Result:
Thus, the Project Plan was documented successfully
24
Aim
To Prepare Work breakdown structure, Timeline chart and Risk identification table
5. Testing
5.1 Develop test cases
5.2 Perform unit testing
5.3 Perform integration testing
5.4 Perform system testing
6. Deployment
6.1 Install and configure the system
6.2 Train users and administrators
6.3 Develop user manuals and system documentation
7. Maintenance and Support
7.1 Provide ongoing system maintenance and support
7.2 Address user support requests and issues
7.3 Perform regular system backups and updates
Timeline Chart:
26
Risk Table:
Result:
Thus, the work breakdown structure with timeline chart and risk table were formulated
successfully.
28
Aim
To Design a System Architecture, Use case and Class Diagram
SYSTEM ARCHITECTURE
29
Detect
CLASS DIAGRAM
Result:
Thus, the system architecture, use case and class diagram created successfully.
31
Aim
To create the Entity Relationship Diagram
ER Diagram
32
33
34
Result:
Thus, the entity relationship diagram was created successfully.
35
What is ER Model?
- ER Model stands for Entity Relationship Model is a high-level conceptual data model
diagram. ER model helps to systematically analyze data requirements to produce a well-
designed database.
- ER Model represents real-world entities and the relationships between them. Creating an ER
Model in DBMS is considered as a best practice before implementing your database.
- ER Modeling helps you to analyze data requirements systematically to produce a well-
designed database. So, it is considered a best practice to complete ER modeling before
implementing your database.
ER Diagram – Notations
- Rectangles represent entity sets.
- Diamonds represent relationship sets.
- Lines link attributes to entity sets and entity sets to relationship sets.
- Ellipses represent attributes
- Double ellipses represent multivalued attributes.
- Dashed ellipses denote derived attributes.
- Underline indicates primary key attributes
36
ADDITIONAL NOTES
- Express the number of entities to which another entity can be associated via a relationship
set.
- Most useful in describing binary relationship sets.
- We express cardinality constraints by drawing either a directed line (->), signifying “one,” or
an undirected line (—), signifying “many,” between the relationship set and the entity set.
Cardinality
- For a binary relationship set the mapping cardinality must be one of the following types:
1. One to one
A customer is associated with at most one loan via the relationship borrower. A loan is
associated with at most one customer via borrower
2. One to many
A loan is associated with at most one customer via borrower, a customer is associated with
several (including 0) loans via borrower
3. Many to one
A loan is associated with several (including 0) customers via borrower, a customer is associated
with at most one loan via borrower
4. Many to many
A loan is associated with several (including 0) customers via borrower, a customer is associated
with several loans (including 0) via borrower
separately for each loan. Although each payment entity is distinct, payments for different loans
may share the same payment number. Thus this entity set does not have a primary key.
Discriminator
- The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes
among all the entities of a weak entity set
Example: discriminator of weak entity set payment is the attribute payment_number since for
each loan a payment number uniquely identifies one single payment for that loan.
Specialization-Generalization-ISA
- E-R model provides means of representing these distinctive entity groupings
- Process of designating subgroupings within an entity set is called specialization depicted by
triangle component labelled ISA (“is a”)
- Bottom up design process in which multiple entity sets are synthesized into higher level entity
set - Generalization
- ISA relationship may also be referred to as superclass-subclass relationship
- Higher and lower level entity sets are designated by the terms superclass and subclass.
- Specialization and generalization are simple inversions of each other; they are represented in
an E-R diagram in the same way.
Cardinality limits
- Cardinality limits can also express participation constraints
- Minimum and maximum cardinality is expressed as l..h where l is the minimum and h is the
maximum cardinality
- Minimum value of 1 indicates total participation of entity set in relationship set
- Maximum value of 1 indicates entity participates in atmost one relationship set.
- Maximum value of * indicates no limit
Role indicator
- Entity sets of a relationship need not be distinct
- The labels “manager” and “worker” are called roles; they specify how employee entities
interact via the works-for relationship set.
- Roles are indicated in E-R diagrams by labeling the lines that connect diamonds to rectangles.
- Role labels are optional, and are used to clarify semantics of the relationship
Disjoint Generalization
- Disjointness constraint requires that an entity belong to more than one lower level entity set.
Example: account entity can satisfy only one condition for account_type attribute ; entity can
either be savings or chequing account but not both.
39
Aim
To develop the data flow diagram up to level 1 for the attendance management system
using facial recognition.
The DFD takes an input-process-output view of a system. That is, data objects flow into the
software, are transformed by processing elements, and resultant data objects flow out of the
software. Data objects are represented by labeled arrows, and transformations are represented
by circles (also called bubbles). The DFD is presented in a hierarchical fashion. That is, the
first data flow model (sometimes called a level 0 DFD or context diagram) represents the
system as a whole. Subsequent data flow diagrams refine the context diagram, providing
increasing detail with each subsequent level.
The data flow diagram enables you to develop models of the information domain and functional
domain. As the DFD is refined into greater levels of detail, you perform an implicit functional
decomposition of the system. At the same time, the DFD refinement results in a corresponding
refinement of data as it moves through the processes that embody the application.
A few simple guidelines can aid immeasurably during the derivation of a data flow diagram:
(1) Level 0 data flow diagram should depict the software/system as a
single bubble;
41
Result:
Thus, the data flow diagrams have been created for the Attendance Management system
using facial recognition.
43
Aim
To create the sequence and collaboration diagram for the Attendance Management
System using facial recognition.
Sequence Diagram:
44
Collaboration Diagram:
Result:
Thus, the sequence and collaboration diagrams were created for the Attendance
Management System using facial recognition.
45
*/ For Example
Sequence Diagram
Collaboration Diagram
47
Aim
To develop the testing framework and/or user interface framework for the attendance
management system using facial recognition system.
Scope of testing:
1. Functional testing: Focus on testing the core functionality of the system, such as
capturing and storing images, recognizing faces, and displaying attendance records.
2. Performance testing: Focus on testing the speed and accuracy of the facial recognition
system, especially in scenarios where a large number of users need to be recognized
quickly.
3. Security testing: Focus on testing the system's ability to prevent unauthorized access
and protect sensitive data, such as implementing secure login and access controls.
4. Usability testing: Focus on testing the user interface's ease of use, especially in
scenarios where users may be less familiar with the technology, such as providing clear
instructions and guidance.
5. Regression testing: Focus on testing the system's ability to maintain its functionality
after changes or updates are made, such as verifying that new features do not break
existing functionality.
6. Integration testing: This type of testing focuses on testing the integration of the facial
recognition system with other systems or applications. You may test the system's
ability to integrate with the organization's existing attendance management system,
payroll system, or other systems.
48
Result:
Thus, the testing framework/user interface framework has been created for the
attendance management system using facial recognition system.
50
Aim
To develop the test cases manual for the Attendance management system using facial
recognition system.
Result: Thus, the test case manual has been created for the Attendance management system
using facial recognition system.
53
Aim
To prepare the manual test case report for the Attendance Management System using
facial recognition system.
Test Steps:
Launch the attendance management system and navigate to the facial recognition section.
Click on the "Load Face" button and position the camera to capture a clear image of a face.
Click on the "Recognize" button and verify that the system correctly identifies the person in
the image.
Repeat the test with different individuals and verify that the system accurately recognizes all
faces.
Expected Results:
The system should properly integrate with the facial recognition system.
The system should be able to accurately recognize faces with a high degree of accuracy.
The system should produce consistent results when tested with different individuals.
General Uses:
This test case ensures that the facial recognition system is functioning correctly and accurately
identifies individuals in the attendance management system.
It helps to ensure the system can be used to automate the process of attendance tracking
using facial recognition technology.
54
As we are currently in the first test phase, the testing team has developed and executed test
cases for functional and non-functional requirements of the Attendance Management System
using Facial Recognition project. The team has identified several defects and issues that need
to be addressed before proceeding to the next phase of testing. Overall, the testing phase is
progressing according to the planned timeline, and the team is working to ensure that all
identified defects are resolved before the next phase of testing.
There are several potential obstacles that could arise when proceeding further with the
Attendance Management System using Facial Recognition project. These may include
technical challenges such as difficulty integrating the system with existing payroll or HR
systems, or ensuring the accuracy and reliability of the facial recognition technology. There
may also be legal and ethical concerns related to data privacy and compliance with
regulations surrounding the use of facial recognition technology. Additionally, the project may
face resource constraints such as lack of funding, personnel, or time. Finally, there may be
potential user adoption issues or resistance to change from employees who are used to
traditional attendance tracking methods.
Result:
Thus, the test case report has been created for the Attendance Management System
using facial recognition system.
56
Aim
To provide the details of architectural design/framework/implementation
Abstract:
The Attendance Management System using Facial Recognition is a project aimed at developing
a reliable and efficient attendance management system for organizations. The system uses
facial recognition technology to automate attendance tracking and streamline payroll and HR
processes. It is implemented using Python programming language and utilizes OpenCV,
CMake, Pandas, and other Python libraries for facial recognition. The system also incorporates
databases such as MongoDB and utilizes SQL queries for data management. The collected
attendance data is reported in an Excel sheet for further analysis.
The system's architecture consists of multiple modules such as a facial recognition module,
attendance tracking module, and reporting module. It also incorporates security measures to
protect the collected data and ensure compliance with laws and regulations related to
attendance tracking and data protection.
The benefits of the Attendance Management System using Facial Recognition are numerous,
including increased accuracy and security of attendance data, cost savings, improved
productivity, and compliance with legal requirements. The system is customizable to fit the
unique needs of each organization and is designed to be user-friendly and intuitive.
However, there may be obstacles in the development and implementation of the system, such
as technical challenges, data privacy concerns, and potential resistance from employees.
Nevertheless, with the right resources, expertise, and a well-designed implementation plan, the
Attendance Management System using Facial Recognition can bring significant benefits to
organizations seeking to improve their attendance management processes.
57
Introduction:
The Attendance Management System using Facial Recognition project is aimed at developing
an efficient and accurate system for tracking attendance using facial recognition technology.
The manual attendance tracking process is often time-consuming and prone to errors, leading
to discrepancies in the recorded data. The system developed in this project will eliminate these
issues, resulting in a streamlined attendance management process.
The system will be developed using Python programming language, incorporating various
libraries for facial recognition such as OpenCV, CMake, and Pandas. It will utilize databases
like MongoDB and SQL for data management and storage, with attendance data being reported
in an Excel sheet for further analysis.
Requirement Analysis:
Here are the requirements analysis of the Attendance Management System using Facial
Recognition project:
• The system should be able to recognize and match the faces of individuals in real-time.
• The system should be able to track the attendance of individuals accurately and reliably.
• The system should be able to store attendance data securely in a database for future use.
• The system should provide a user-friendly interface for users to interact with the system
and access attendance data.
• The system should be able to integrate with existing payroll or HR systems to
streamline the process of calculating employee hours and compensation.
• The system should comply with laws and regulations related to attendance tracking and
data protection.
• The system should be able to handle multiple users and process attendance data
simultaneously.
• The system should have a high level of accuracy in facial recognition and attendance
tracking, with minimal errors or false positives.
• The system should be scalable and adaptable to fit the unique needs of the organization.
• The system should be able to generate reports and analytics on attendance data for
further analysis and decision-making.
Architecture:
58
The architecture for the Attendance Management System using Facial Recognition involves a
client-server model, where the client is the system interface and the server is responsible for
the facial recognition processing. The system will be developed using Python programming
language, and will utilize various libraries such as OpenCV, CMake, and Pandas for facial
recognition. The system will also incorporate databases such as MongoDB, and will utilize
SQL queries for data management. The system will have a modular design, with separate
modules for capturing images, facial recognition, data storage, and user interface. The system
will be able to integrate with existing payroll or HR systems to streamline attendance tracking
and calculating employee hours. The architecture will also have security measures in place to
protect the data collected by the facial recognition system, and will comply with laws and
regulations related to facial recognition technology and data protection.
Framework:
The framework of the project involves the use of Python programming language, along with
various Python libraries such as OpenCV, CMake, Pandas, etc. for facial recognition. The
system utilizes databases such as MongoDB and SQL queries for data management.
The attendance management system using facial recognition involves the following key
components:
• Data Collection: Capturing facial images of employees and storing them in the
database.
• Facial Recognition: Processing the captured images to recognize the employees and
mark their attendance.
• Database Management: Storing and managing the attendance data in databases such as
MongoDB or SQL.
• Reporting: Generating attendance reports in Excel sheets for further analysis.
The system architecture is designed in a way that ensures scalability, flexibility, and
maintainability of the system. The implementation involves a modular approach, where each
component is developed separately and then integrated to form the complete system. The
system is designed to be user-friendly, efficient, and secure, with features such as access control
and data encryption to protect the attendance data.
Implementation:
Screen 1
59
Screen 2
Screen 3
60
Screen 4
61
Screen 5
Source Code:
import threading
from functools import partial
from kivy.clock import Clock
from kivy.graphics.texture import Texture
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
import cv2
import numpy as np
import os
from datetime import datetime
from PIL import Image
from kivy.core.window import Window
import pandas as pd
Window.clearcolor = (.8, .8, .8, 1)
class AttendenceWindow(Screen):
pass
class DatasetWindow(Screen):
pass
class WindowManager(ScreenManager):
pass
kv = Builder.load_file("my.kv")
class MainApp(App):
running = False
Dir = os.path.dirname(os.path.realpath( file ))
def build(self):
62
font = cv2.FONT_HERSHEY_DUPLEX
rec = 0
id = 0
face_numbers = 5
camera = cv2.VideoCapture(0)
camera.set(3, 1920)
camera.set(4, 1080)
minWidth = 0.001*camera.get(3)
minHeight = 0.001*camera.get(4)
blink = 0
is_eye = False
while self.running:
rtrn, image=camera.read()
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
faces = face.detectMultiScale(
gray,
scaleFactor = 1.3,
minNeighbors = face_numbers,
minSize = (int(minWidth), int(minHeight)),
)
63
if (int(df.loc[df['id'] == id,
date].iloc[0]))==0:
df.loc[df['id'] == id, date]=1
df.to_csv(self.Dir +
'/Attendance/Attendance.csv', index=False)
kv.get_screen('main').ids.info.text =
"Attendence entered successfully."
else:
kv.get_screen('main').ids.info.text =
"Attendence already exist."
else:
df[date] = coll
df.loc[df['id'] == id, date]=1
df.to_csv(self.Dir +
'/Attendance/Attendance.csv', index=False)
kv.get_screen('main').ids.info.text =
"Attendence entered successfully."
else:
kv.get_screen('main').ids.info.text = "Attendence
not entered."
camera.release()
cv2.destroyAllWindows()
except Exception as e:
kv.get_screen('main').ids.info.text = "Some error
occured. Try again!"
print(e)
def display_frame(self, frame, dt):
texture = Texture.create(size=(frame.shape[1],
frame.shape[0]), colorfmt='bgr')
texture.blit_buffer(frame.tobytes(order=None),
colorfmt='bgr', bufferfmt='ubyte')
texture.flip_vertical()
kv.get_screen('main').ids.vid.texture = texture
def dataset(self):
dataset_path = path = os.path.join(self.Dir, 'dataset')
if not (os.path.isdir(dataset_path)):
os.mkdir(dataset_path)
try:
name = kv.get_screen('second').ids.user_name.text
face_id = kv.get_screen('second').ids.user_id.text
snap_amount = int(kv.get_screen('second').ids.snap.text)
camera = cv2.VideoCapture(0)
camera.set(3, 1920)
camera.set(4, 1080)
face = cv2.CascadeClassifier(self.Dir +
'/haarcascade_frontalface_default.xml')
if len(face_id)<=0 or len(name)<=0 or snap_amount <=0:
kv.get_screen('second').ids.info.text = "All Fields
Required"
else:
count = 0
while(True):
rtrn, image=camera.read()
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
faces = face.detectMultiScale(gray, 1.3, 5)
65
for(x,y,w,h) in faces:
cv2.rectangle(image,
(x,y),(x+w,y+h),(255,0,0),2)
count+=1
cv2.imwrite(self.Dir +
"/dataset/"+str(name)+"_" + str(face_id) + '_' + str(count) +
".jpg", gray[y:y+h,x:x+w])
cv2.imshow('image', image)
id=int(os.path.split(imagePath)[-1].split("_")[1])
faces = face.detectMultiScale(img_numpy)
faces,ids=self.getImage_Labels(dataset,face)
recog.train(faces, np.array(ids))
recog.write(self.Dir + '/trainer/trainer.yml')
kv.get_screen('main').ids.info.text =
str(len(np.unique(ids))) + " face trained."
kv.get_screen('second').ids.info.text =
str(len(np.unique(ids))) + " face trained."
Result: