0% found this document useful (0 votes)
33 views74 pages

Kaustubh Blackbook

Uploaded by

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

Kaustubh Blackbook

Uploaded by

Darshan Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

A

Project report
On

“FACIAL RECOGNITION ATTENDANCE SYSTEM”

Submitted in partial fulfillment of the requirements for the award of Degree of

Diploma in
(Computer Technology)

By
[Link] KATHOLE
[Link] PATIL

Under the guidance of


Prof. MOHAN MALI

DEPARTMENT OF COMPUTER TECHNOLOGY


BHARATI VIDYAPEETH’S INSTITUTE OF TECHNOLOGY,
Sector-7, C.B.D. Belpada,
Navi Mumbai-400614
Academic Year 2024 – 2025

1
DEPARTMENT OF COMPUTER TECHNOLOGY
BHARATI VIDYAPEETH’S INSTITUTE OF TECHNOLOGY,
Sector-7, C.B.D. Belpada,
Navi Mumbai-400614
Academic Year 2024 – 2025

CERTIFICATE

This is to certify that [Link] Vasudev Kathole, [Link]


Sanjay Patil
From BHARATI VIDYAPEETH’S INSTITUTE OF TECHNOLOGY College
having
Enrollment No: 2200270232,2200270139
Has completed Report on the Problem Definition/Semester V
Project Report/Final Projet Report having title FACIAL
RECOGNITION ATTENDANCE SYSTEM Individually/ in a
group consisting of 2 persons under the guidance of the Faculty

Mohan Mali
The mentor from the guidance of the Faculty
Name:……………………………………………..
Telephone: ………………………………………….

2
Acknowledgement

I sincerely express my deep sense of gratitude to my guide [Link]


MALI for his valuable guidance, continuous encouragement and support
whenever required and Head of Department of Computer Technology
[Link] MALI, for his valuable guidance, encouragement and timely
help given to me throughout the course of this work. I would to like to thank
to our Project Coordinator [Link] who had shown us the way towards the
destination.
I also would like to take this opportunity to thank our whole-heartedly
Honorable Principal Mr. P .[Link] and our Faculties of Computer
Technology department who have imparted valuable teaching and guidance
that has inspired me to attain new goals.

Name of Student
TYCM (Computer Technology) - III Year

Kaustubh Kathole

Darshan Patil

3
Facial Recognition Attendance System

ABSTRACT

The Facial Recognition Attendance System (FRAS) is an innovative


solution designed to modernize attendance tracking processes in
educational institutions, corporate offices, and other organizational
settings. Utilizing advanced facial recognition technology, FRAS offers
a seamless and efficient alternative to traditional methods.

FRAS aims to develop a robust system with key components including


user-friendly interfaces, facial recognition algorithms, and a centralized
database for attendance records. Features include facial enrollment,
real-time recognition, attendance management, integration capabilities,
and emphasis on security and privacy.
The implementation of FRAS promises increased accuracy, reduced
administrative burden, and enhanced security. Its adaptability makes it
suitable for diverse organizational needs. In summary, FRAS
revolutionizes attendance management through cutting-edge
technology, offering efficiency, reliability, and security for modern
workplaces and institutions.

Moreover, FRAS offers a user-friendly experience for both


administrators and users, with intuitive interfaces for enrollment,
attendance tracking, and management. Administrators can easily
access attendance data through a centralized dashboard, enabling
quick analysis and decision-making. Meanwhile, users can conveniently
enroll their facial biometric data and seamlessly mark their attendance
without the need for physical tokens or manual processes.

4
Computer Engineering
Facial Recognition Attendance System

INDEX

1 Introduction

1. Introduction
2. Problem Introduction
3. Modules In The Project
2 Requirements Specification

1. Introduction
2. Hardware Requirements
3. Software Requirements
3 Analysis

1. Existing System
2. Proposed System
3. Feasibility Study
4. Software Specification
4 Design

1. System Design
2. Introduction To Uml
3. Uml Diagrams Of Our Project
5 System Implementation

1. Introduction
2. Sample Code
6 Sample Screenshots

7 1. Conclusion

2. Bibliography

5
Computer Engineering
Facial Recognition Attendance System

CHAPTER 1

INTRODUCTION

6
Computer Engineering
Facial Recognition Attendance System

1.1 INTRODUCTION:

In contemporary organizational environments, the management of attendance


records represents a critical aspect of operational efficiency and regulatory
compliance. Traditional methods of attendance tracking, such as manual sign-
in sheets or card-based systems, often prove cumbersome, prone to errors,
and susceptible to fraudulent practices. To address these challenges and
usher in a new era of streamlined attendance management, we introduce the
Facial Recognition Attendance System (FRAS).

FRAS represents a groundbreaking solution designed to revolutionize the way


attendance is tracked and managed across diverse sectors, including
educational institutions, corporate offices, and beyond. Leveraging state-of-
the-art facial recognition technology, FRAS offers a sophisticated yet user-
friendly alternative to conventional attendance methods. By harnessing the
power of biometric data and machine learning algorithms, FRAS provides a
seamless and efficient means of accurately identifying individuals and
recording their attendance in real-time.

The impetus behind the development of FRAS stems from the recognition of the
limitations inherent in traditional attendance tracking systems. These limitations
include the potential for human error, time-consuming administrative tasks, and
the lack of robust security measures to prevent unauthorized access or
tampering with attendance records. FRAS seeks to address these shortcomings
by automating the attendance management process, enhancing accuracy,
efficiency, and security while minimizing administrative overhead.

7
Computer Engineering
Facial Recognition Attendance System

This project aims to develop a comprehensive and customizable solution that


caters to the unique needs and requirements of various organizational settings.
Through a combination of innovative technology, intuitive interfaces, and robust
security measures, FRAS aims to streamline attendance management practices,
mitigate the risk of errors and fraud, and empower organizations to make data-
driven decisions based on accurate attendance data.

In the subsequent sections of this project, we will delve into the technical
specifications, key features, implementation strategies, and potential benefits
of FRAS. By exploring the intricacies of its design and functionality, we aim to
demonstrate how FRAS represents a paradigm shift in attendance
management, poised to drive efficiency, transparency, and accountability in
organizations of all sizes and sectors.

1.2 PROBLEM INTRODUCTION:


Traditional attendance tracking methods like manual sign-in sheets or card-
based systems are inefficient, error-prone, and susceptible to fraudulent
practices, imposing significant administrative burdens on organizations.
Moreover, with the emergence of remote work and evolving regulatory
requirements, there is a pressing need for a more sophisticated and secure
attendance management solution. To address these challenges, we introduce
the Facial Recognition Attendance System (FRAS), leveraging advanced
technology to revolutionize attendance tracking and management. FRAS aims
to streamline processes, enhance accuracy, and ensure compliance with data
protection regulations, thus paving the way for a more efficient, accurate, and
secure approach to attendance management in organizational settings.

8
Computer Engineering
Facial Recognition Attendance System

1.3 OBJECTIVE:

1. Automate attendance tracking: Implementing FRAS aims to automate the


cumbersome process of attendance tracking, reducing administrative
workload.
2. Enhance accuracy: FRAS leverages facial recognition technology to improve
the accuracy and reliability of attendance recording, minimizing errors.
3. Improve security: By utilizing biometric authentication, FRAS enhances
security measures, preventing unauthorized access to attendance data.
4. Ensure compliance: FRAS implements robust privacy measures and
encryption techniques to ensure compliance with data protection regulations.
5. Enhance user experience: FRAS provides intuitive interfaces for
administrators and users, fostering usability and widespread adoption while
optimizing attendance management practices.

1.4 SCOPE OF THE PROJECT:

The scope of a Facial Recognition Attendance System (FRAS) encompasses


the development, implementation, and deployment of a comprehensive
solution that utilizes facial recognition technology to automate attendance
tracking processes across various organizational settings. This includes the
design and integration of facial recognition algorithms, user-friendly interfaces
for enrollment and attendance management, secure storage and retrieval of
attendance records, compliance with data protection regulations, and
scalability to accommodate varying organizational needs. Additionally, the
scope involves ensuring robust security measures to protect biometric data,
optimizing usability for administrators and users, and providing adequate
training and support for system deployment and ongoing operation.

9
Computer Engineering
Facial Recognition Attendance System

The scope of a facial recognition attendance system typically includes:

1. *Face Detection:* The system identifies and locates human faces in


images or videos.

2. *Face Recognition:* It recognizes and verifies or identifies individuals


based on their facial features.

3. *Attendance Tracking:* It tracks the attendance of individuals based on


their recognized faces.

4. *Data Management:* It manages and stores attendance data securely.

5. *Integration:* It can integrate with existing attendance systems or databases.

6. *Reporting:* It generates reports on attendance data for administrators.

7. *Security:* It ensures the security and privacy of facial data.

8. *Accuracy and Performance:* It provides high accuracy and performance


in recognizing faces and tracking attendance.

The system can be used in various settings such as schools, offices, and
events to automate attendance management processes.

10
Computer Engineering
Facial Recognition Attendance System

CHAPTER 2

REQUIREMENT SPECIFICATION

11
Computer Engineering
Facial Recognition Attendance System

2.1 INTRODUCTION:

The requirement specification for a Facial Recognition Attendance


System (FRAS) serves as a foundational document outlining the
objectives, functionalities, and technical specifications essential for the
successful development and implementation of the system. In today's
fast-paced and increasingly digitized organizational environments, the
need for efficient and secure attendance management solutions has
become paramount. Traditional methods of attendance tracking are
often labor-intensive, error-prone, and susceptible to fraudulent
practices, necessitating the adoption of innovative technologies to
streamline processes and enhance accuracy. The FRAS project aims to
address these challenges by leveraging advanced facial recognition
technology to automate attendance tracking, improve data accuracy,
and bolster security measures. This requirement specification document
provides a comprehensive overview of the scope, objectives, functional
requirements, technical specifications, and compliance considerations
essential for the development of FRAS, laying the groundwork for a
robust and user-centric solution poised to transform attendance
management practices in diverse organizational settings.

12
Computer Engineering
Facial Recognition Attendance System

2.2 HARDWARE REQUIREMENTS:


The hardware requirements for the Facial Recognition Attendance
System (FRAS) play a crucial role in ensuring the system's
performance, reliability, and scalability. As FRAS leverages advanced
facial recognition technology to automate attendance tracking, selecting
appropriate hardware components is essential to support the system's
computational needs and facilitate seamless integration with existing
infrastructure. This document outlines the specific hardware
components and specifications necessary for the successful
implementation of FRAS, providing a comprehensive overview to guide
the procurement and setup process. By adhering to these hardware
requirements, organizations can ensure optimal performance and
functionality of FRAS, ultimately enhancing efficiency and accuracy in
attendance management practices.

HARDWARE REQUIREMENTS FOR PRESENT PROJECT:


Computing Hardware:
CPU: Intel Core i3 or equivalent, with at least 2 cores.
RAM: 4GB DDR4 or higher for basic data processing.

Storage Hardware:
SSD: 128GB SATA SSD for basic storage needs.
HDD: 500GB SATA HDD for additional storage capacity(optional).

Camera Hardware:
Integrated Webcam: Built-in webcam with 720p resolution.

13
Computer Engineering
Facial Recognition Attendance System

2.3 SOFTWARE REQUIREMENTS:


The software requirements for the Facial Recognition Attendance
System (FRAS) are integral to the successful implementation and
operation of the system. As FRAS relies on advanced facial recognition
technology to automate attendance tracking, selecting appropriate
software components is essential to ensure system functionality,
security, and compatibility. This document outlines the specific software
requirements and dependencies necessary for the development,
deployment, and maintenance of FRAS, providing a comprehensive
overview to guide the selection, installation, and configuration process.
By adhering to these software requirements, organizations can ensure
optimal performance and reliability of FRAS, ultimately enhancing
efficiency and accuracy in attendance management practices.

SOFTWARE REQUIREMENTS FOR PRESENT PROJECT:


 Operating System:

 Windows 10 (64-bit) or Ubuntu 20.04 LTS (64-bit) for


compatibility with common software libraries.
 .Development Tools:

 Python programming language for simplicity and ease of


development.

 Text editor like Visual Studio Code or Sublime Text for writing
and editing code.
 . Facial Recognition Software
 OpenCV for basic image processing and face detection.

 SimpleCV for simplified computer vision tasks.

 Database Management System


SQLite or MS Excel for lightweight database requirements Python

14
Computer Engineering
Facial Recognition Attendance System
programming language for simplicity and ease of
development.

 Text editor like Visual Studio Code or Sublime Text for writing
and editing code.
 . Facial Recognition Software
 OpenCV for basic image processing and face detection.

 SimpleCV for simplified computer vision tasks.

 Database Management System


 SQLite or MS Excel for lightweight database requirements.

15
Computer Engineering
Facial Recognition Attendance System

CHAPTER 3

ANALYSIS

16
Computer Engineering
Facial Recognition Attendance System

3.1 Existing System:


Facial recognition attendance systems are rapidly gaining popularity
in various sectors due to their efficiency and convenience. This
technology utilizes facial recognition algorithms to accurately identify
individuals and record their attendance without the need for manual
check-ins. In the existing system, cameras equipped with facial
recognition software capture images of individuals as they enter a
designated area, such as a workplace or educational institution. The
software then analyzes facial features, such as the distance between
the eyes, nose, and mouth, to create a unique biometric profile for
each person. This profile is compared against a database of stored
profiles to verify the individual's identity and record their attendance.
Facial recognition attendance systems offer several advantages,
including real-time tracking, enhanced security, and reduced
administrative burden. However, concerns regarding privacy,
accuracy, and potential misuse of personal data highlight the need for
careful implementation and regulation of this technology.

3.2 Proposed System:


The proposed facial recognition attendance system aims to revolutionize
traditional attendance tracking processes by leveraging advanced technology
for seamless identification and recording. In this system, individuals' facial
images are captured and processed using high-resolution cameras and facial
recognition algorithms during an initial enrollment phase, creating unique
biometric profiles stored securely in a database. Subsequently, as individuals
enter designated areas, the system automatically captures and analyzes their
facial images to accurately identify them and record their attendance.
Administrators can access a user-friendly interface to manage the system, view
attendance records, and generate reports, while stringent security measures
ensure the protection of sensitive biometric data and compliance with privacy
regulations. With its scalability, flexibility, and integration capabilities, the
proposed system offers organizations a reliable and efficient solution for
attendance tracking while addressing privacy concerns and
regulatory requirements.

17
Computer Engineering
Facial Recognition Attendance System

By implementing the proposed facial recognition attendance system,


organizations stand to benefit from streamlined attendance tracking
processes, enhanced accuracy, and improved security. With its seamless
integration with existing software systems and flexible deployment options,
the system offers scalability to accommodate organizational growth and
adaptability to diverse operational environments. Moreover, its user-friendly
interface empowers administrators with efficient management tools, while
robust security measures safeguard individuals' privacy rights and ensure
compliance with data protection regulations. Overall, the proposed system
represents a transformative solution that not only optimizes attendance
management but also promotes efficiency, security, and regulatory
compliance within organizations.

3.3 Feasibility Study:

 Technical Feasibility:
 Hardware Requirements: High-resolution cameras,
processing units, and networking equipment are readily
available in the market. Compatibility with existing
infrastructure and scalability options ensure technical
feasibility.

 Software Development: Facial recognition algorithms and


database management systems are mature technologies.
Customization and integration with existing software systems
may require additional development effort but are technically
feasible.

 System Integration: Compatibility with various hardware


configurations and operating environments may pose
challenges but can be addressed through thorough testing
and implementation of compatibility measures.
18
Computer Engineering
Facial Recognition Attendance System

 Economic Feasibility:

 Cost Analysis: Initial investment in hardware, software


development, and implementation may be significant.
However, long-term savings from reduced administrative
costs and improved efficiency justify the investment.

 Return on Investment (ROI): The system's potential to


streamline attendance tracking processes and enhance
productivity can result in substantial ROI over time. Cost-
benefit analysis indicates favorable returns, especially for
organizations with large numbers of employees or high
administrative overheads.

 Alternative Solutions: Comparison with alternative


attendance tracking methods, such as manual systems or
RFID-based systems, demonstrates the cost-effectiveness of
the proposed facial recognition system in the long run.

 Operational Feasibility:
 User Acceptance: User training and acceptance testing are
crucial to ensure smooth adoption of the system. A user-
friendly interface and clear communication of benefits
facilitate acceptance among administrators and employees.

 Integration with Existing Processes: Seamless integration with


existing payroll and HR management systems minimizes
disruption to existing processes and ensures operational
continuity. Compatibility with diverse operational
environments enhances adaptability and ease of
implementation.

19
Computer Engineering
Facial Recognition Attendance System

 Scalability: The system's scalability to accommodate


organizational growth and varying attendance requirements
ensures long-term operational viability. Flexible deployment
options and support for multiple locations further enhance
operational feasibility.

 Legal and Regulatory Feasibility:


 Data Protection Compliance: Compliance with data
protection regulations, such as GDPR or CCPA, is essential
to safeguard individuals' privacy rights. Implementation of
robust security measures, data encryption protocols, and
access controls ensures compliance with legal requirements.

 Ethical Considerations: Addressing ethical concerns related


to facial recognition technology, such as consent,
transparency, and bias mitigation, is critical to maintain trust
and ethical integrity. Transparent communication and ethical
guidelines promote responsible use of the system.

Based on the technical, economic, operational, and legal considerations


outlined above, the feasibility study concludes that the proposed facial
recognition attendance system is a viable solution for organizations
seeking to optimize attendance tracking processes, enhance efficiency,
and ensure compliance with legal and regulatory requirements. With
careful planning, implementation, and ongoing monitoring, the system
offers tangible benefits and a favorable return on investment for
organizations of varying sizes and operational complexities.

20
Computer Engineering
Facial Recognition Attendance System

CHAPTER 4
DESIGN

21
Computer Engineering
Facial Recognition Attendance System

4.1 SYSTEM DESIGN:


 System Architecture:
o The system will follow a client-server architecture, with client-side
components consisting of cameras and server-side components
hosting the facial recognition algorithm, database, and user
interface.
o Clients (cameras) will capture facial images and transmit them to
the server for processing.
o The server will perform facial recognition, update the database with
attendance records, and provide a user interface for administrators.
o Alternatively, a simple architecture can also be followed to
generate student data and record attendance on the same system.

 Components:
o Camera Module: Each entry point will be equipped with a camera
capable of capturing facial images. Cameras may include features
such as night vision, wide dynamic range, and high-resolution
sensors for optimal image quality.
o Facial Recognition Module: This module will employ deep learning
techniques, such as Convolutional Neural Networks (CNNs), for
face detection, alignment, and recognition. Pre-trained models like
FacialRecognition, OpenFace, FaceNet, or deep learning
frameworks such as TensorFlow or PyTorch can be used.
o Database Module: The database will store biometric profiles of
individuals, including facial images and associated metadata such
as name, ID, and attendance records. A relational database
management system (RDBMS) like PostgreSQL or MySQL is

22
Computer Engineering
Facial Recognition Attendance System

suitable for efficient data storage and [Link] simplicity basic


database systems like SQLlite or MS Excel can be used.
o User Interface Module: The user interface will be developed using
web technologies (HTML, CSS, JavaScript) or desktop
frameworks (e.g., Electron) for cross-platform compatibility. It will
provide a responsive and intuitive interface for system
administrators to configure settings, monitor attendance, and
manage user [Link] basic python modules can be used
for a simple GUI based system.

 Data Flow:
o When an individual enters the designated area, the camera
captures their facial image and transmits it to the server.
o The facial recognition module processes the incoming images,
detecting and recognizing faces using deep learning algorithms.
o If a match is found with an existing profile in the database, the
attendance record for the identified individual is updated.
o Real-time feedback may be provided to the user interface for
display of recognition results and attendance status.

 Security Measures:
o Data Encryption: All communication between client and server, as
well as data storage in the database, will be encrypted using
TLS/SSL protocols to ensure data security and privacy.
o Authentication and Authorization: Access to system functionalities
and data will be controlled through robust authentication
mechanisms (e.g., OAuth, JWT) and role-based access control
(RBAC).

23
Computer Engineering
Facial Recognition Attendance System

o Secure Storage:Biometric data stored in the database will be


hashed or encrypted to prevent unauthorized access or misuse.

 Integration and Scalability:


o API Integration: RESTful APIs will be developed to facilitate
integration with existing systems such as HR management and
payroll software.
o Horizontal Scalability: The system architecture will support
horizontal scaling by deploying multiple instances of the server to
handle increased load and accommodate growing user bases.
o Containerization and Orchestration: Technologies like Docker and
Kubernetes may be employed for containerization and
orchestration to streamline deployment and management of
system components.

 Deployment:
o On-Premises Deployment: The system can be deployed on the
organization's local servers or data centers, providing full control
over infrastructure and data privacy.

o Cloud Deployment: Alternatively, cloud-based deployment options


such as AWS, Azure, or Google Cloud Platform can offer
scalability, reliability, and ease of management.

By incorporating these components and considerations into the system design,


organizations can implement a robust and scalable facial recognition system that
meets stringent requirements for accuracy, security, and performance.

24
Computer Engineering
Facial Recognition Attendance System

4.2 INTRODUCTION TO UML:

Unified Modeling Language (UML) diagrams are a standardized set of


graphical notations used in software engineering to visually represent
various aspects of a system. UML provides a common language for
software developers, architects, and stakeholders to communicate,
understand, and document complex systems effectively. UML diagrams
facilitate the analysis, design, implementation, and maintenance of
software systems throughout the software development lifecycle.

Unified Modeling Language (UML) is also a standardized visual


modeling language used in software engineering to design, specify,
visualize, and document software systems. It provides a common
language and notation for representing the structure, behavior, and
interactions of complex systems. UML was originally developed by
Grady Booch, James Rumbaugh, and Ivar Jacobson in the mid-1990s
and has since become a widely accepted industry standard.

UML diagrams are graphical representations of various aspects of a


system and can be classified into different types based on their purpose
and the aspects of the system they represent. Some common types of
UML diagrams include:

 Structural Diagrams:
o Class Diagram: Represents the static structure of a system
by showing classes, attributes, methods, and relationships
between classes.
o Object Diagram: Shows instances of classes and the
relationships between them at a specific point in time.

25
Computer Engineering
Facial Recognition Attendance System

o Component Diagram: Illustrates the physical structure of a


system, including components, interfaces, and
dependencies between them.
o Deployment Diagram: Represents the physical deployment
of software components onto hardware nodes, showing how
the system is distributed across different machines or
environments.

 Behavioral Diagrams:
o Use Case Diagram: Represents the functional requirements
of a system by showing actors, use cases, and relationships
between them.
o Activity Diagram: Illustrates the flow of control or workflow in
a system, including activities, decisions, and transitions
between them.
o State Machine Diagram: Represents the dynamic behavior of
a system by showing states, events, transitions, and actions.

 Interaction Diagrams:
o Sequence Diagram: Shows the interactions between objects
or components in a system over time, illustrating the
sequence of messages exchanged to accomplish a specific
task or scenario.
o Communication Diagram: Similar to a sequence diagram but
focuses more on the relationships between objects or
components and the messages exchanged between them.

26
Computer Engineering
Facial Recognition Attendance System

UML diagrams are typically created using specialized modeling tools


that provide support for creating, editing, and analyzing UML diagrams.
These tools often include features for generating code, performing
model validation, and collaborating with other team members.

In addition to its graphical notation, UML also includes a textual


specification language for specifying detailed aspects of a system,
known as the UML metamodel. The UML metamodel defines a set of
concepts and rules for constructing UML models, ensuring consistency
and interoperability between different UML tools and models.

Overall, UML provides a standardized and widely accepted language for


modeling software systems, facilitating communication, collaboration,
and understanding among stakeholders throughout the software
development lifecycle.

27
Computer Engineering
Facial Recognition Attendance System

4.3 UML DIAGRAMS OF OUR PROJECT:

1. Block Diagrams

Block diagrams are visual representations of systems or processes,


breaking them down into components represented by blocks, and
showcasing the flow of information between these components
through lines. These diagrams simplify complex systems, offering a
high-level overview of their structure and operation. They're
commonly used in system design, analysis, and troubleshooting,
aiding in understanding how different parts of the system interact and
how changes in one part can affect the others. By providing a clear
visual representation, block diagrams enhance communication among
stakeholders, making it easier to discuss and document system
designs and concepts.

In essence, block diagrams serve as powerful tools for engineers and


designers across various fields, helping them conceptualize, plan, and
visualize complex systems and processes. They simplify complexity

28
Computer Engineering
Facial Recognition Attendance System

understanding, and facilitate effective communication, indispensable


in system design, analysis, and documentation.

Fig 4.1 Basic Facial Recognition Block Diagram

29
Computer Engineering
Facial Recognition Attendance System

Fig 4.2 Facial Recognition Attendance System Block Diagram

30
Computer Engineering
Facial Recognition Attendance System

2. Use Case Diagrams

Use case diagrams serve as blueprints for understanding the functional


requirements of a system from the perspective of its users. Actors, represented
as stick figures, depict the various entities interacting with the system, while
ovals represent use cases, illustrating specific functionalities or tasks that the
system provides. Relationships like association, inclusion, and extension clarify
how actors interact with use cases, capturing common behaviors, optional paths,
and conditional extensions within the system. By defining system boundaries and
outlining goals and scenarios, use case diagrams offer a clear and concise
overview of the system's functionalities and user interactions, aiding in
requirements analysis, system design, and effective communication with
stakeholders throughout the software development process.

In essence, use case diagrams act as visual maps that illuminate the user-
system interactions and functionalities required to fulfill user needs. They
streamline the process of requirements engineering by delineating actors'
roles, system functionalities, and their relationships, facilitating a shared
understanding among stakeholders. With their ability to capture the essence
of user-system interactions and requirements, use case diagrams serve as
indispensable tools in guiding system design decisions and ensuring that
software systems align closely with user expectations and needs.

Furthermore, use case diagrams play a crucial role in ensuring that software
development efforts remain focused on delivering value to users. By providing
a visual representation of user requirements and system functionalities, they
help prioritize development tasks, allocate resources effectively, and identify
potential gaps or inconsistencies early in the development process.
Additionally, use case diagrams serve as a foundation for more detailed
analysis and design activities, such as creating detailed use case
specifications, defining system behavior in sequence diagrams, and designing

31
Computer Engineering
Facial Recognition Attendance System

user interfaces. Ultimately, use case diagrams empower software


development teams to build systems that not only meet user needs but also
align with business objectives and contribute to overall project success.

Fig 4.3 Use Case Diagram

32
Computer Engineering
Facial Recognition Attendance System

2. Sequence Diagrams

Sequence diagrams are a type of UML diagram that illustrates the


interactions between objects or components in a system over time.
They provide a dynamic view of how objects collaborate to perform a
specific task or scenario, showing the sequence of messages
exchanged between them. In sequence diagrams, objects are
represented as lifelines, with messages passing between them
depicted as arrows. The vertical dimension represents time, with
interactions progressing from top to bottom. Sequence diagrams are
valuable for understanding the flow of control and communication in a
system, identifying potential bottlenecks or errors, and designing or
troubleshooting system behavior. They are widely used in software
engineering for requirements analysis, system design, and
communication among stakeholders.

Sequence diagrams offer a dynamic view of system behavior by


illustrating the interactions between objects or components over time.
Lifelines represent these entities, with messages exchanged between
them depicted as arrows. Activation bars indicate when objects are
active, and combined fragments allow for modeling of alternative or
parallel behaviors. Return messages show the flow of control back to
the originating object. Sequence diagrams are crucial in software
engineering for requirements analysis, system design, and testing,
enabling stakeholders to understand system dynamics and ensuring
that requirements are met. They facilitate effective communication and
guide development efforts by providing a clear visual representation of
system behavior and interaction patterns.

33
Computer Engineering
Facial Recognition Attendance System

Fig 4.4 Sequence Diagram

34
Computer Engineering
Facial Recognition Attendance System

3. Data Flow Diagrams

Data Flow Diagrams (DFDs) serve as visual tools in software engineering


to illustrate how data moves through a system's components. These
components include processes, which represent activities or
transformations; data flows, indicating the movement of data; data stores,
representing repositories for data storage; and external entities, which
interact with the system but exist outside its boundaries. Through
connections between these components, DFDs delineate the flow of data,
process execution sequence, and access to data stores.

Moreover, DFDs offer multiple levels of abstraction, enabling a


hierarchical representation of system functionality. At the highest level
(Level 0), an overview of the system's major processes, data stores, and
external entities is provided. As DFDs descend to lower levels, they offer
a more detailed view of subprocesses, enriching the understanding of
system behavior and data flow. This hierarchical structure aids in
requirements analysis, system design, and documentation by providing
stakeholders with a nuanced understanding of the system's operations.

Overall, DFDs play a pivotal role in software development by facilitating


effective communication, identifying potential inefficiencies or
bottlenecks, and ensuring alignment with system requirements. By
visually representing the flow of data within a system, DFDs empower
stakeholders to make informed decisions and guide the development
process from conceptualization to implementation, fostering clarity,
efficiency, and collaboration throughout the software engineering
lifecycle.

Additionally, DFDs offer a standardized notation that promotes clarity


and consistency in depicting system architectures across various
projects and stakeholders. This standardized visual representation aids
in communication between technical and non-technical stakeholders,
ensuring a shared understanding of the system's data flow and
functionality. Furthermore, DFDs serve as valuable tools for identifying
opportunities for optimization and improvement within a system, as they
highlight areas where data may be processed inefficiently or
redundantly. Through their ability to capture system complexities in a
structured and intuitive manner, DFDs contribute to the effective
analysis, design, and management of software systems, ultimately
enhancing the quality and reliability of software products.

35
Computer Engineering
Facial Recognition Attendance System

Fig4.5 DFD Level 0

36
Computer Engineering
Facial Recognition Attendance System

Fig 4.6 DFD Level 1

37
Computer Engineering
Facial Recognition Attendance System

CHAPTER 5

SYSTEM

IMPLEMENTATION

38
Computer Engineering
Facial Recognition Attendance System

5.1 Introduction:

The below lines of code depict the basic version of an attendance system
that uses facial recognition to mark attendance. This system uses basic
GUI for a simple user experience of the attendance system. Furthermore,
the system can be enhanced and improved to add security measures
which are incorporated by more advance facial recognition python
modules such as DeepFace,FaceNet,FisherFaces,etc. The GUI can also
be enhanced further using PyQt5,Kivy,etc.

import tkinter as tk
from tkinter import *
import cv2
import csv
import os
import numpy as np
from PIL import Image, ImageTk
import pandas as pd
import datetime
import time

# Window is our Main frame of


system window = [Link]()
[Link]("FAMS-Face Recognition Based Attendance
Management System")

[Link]('1280x720')
[Link](background='grey80')

39
Computer Engineering
Facial Recognition Attendance System

def manually_fill():
global sb
sb = [Link]()
# [Link]('[Link]')
[Link]("Enter subject name...")
[Link]('580x320')
[Link](background='grey80')

def err_screen_for_subject():

def ec_delete():
[Link]()
global ec
ec = [Link]()
[Link]('300x100')
# [Link]('[Link]')
[Link]('Warning!!')
[Link](background='snow')
Label(ec, text='Please enter your subject name!!!', fg='red',
bg='white', font=('times', 16, ' bold ')).pack()
Button(ec, text='OK', command=ec_delete, fg="black", bg="lawn
green", width=9, height=1, activebackground="Red",
font=('times', 15, ' bold ')).place(x=90, y=50)

def fill_attendance():
ts = [Link]()
Date = [Link](ts).strftime('%Y_%m_
%d')

40
Computer Engineering
Facial Recognition Attendance System

timeStamp = [Link](ts).strftime('%H:
%M:%S')
Time = [Link](ts).strftime('%H:%M:
%S')
Hour, Minute, Second = [Link](":")
# Creatting csv of attendance

# Create table for Attendance


date_for_DB = [Link](ts).strftime('%Y_
%m_%d')
global subb
subb = SUB_ENTRY.get()
DB_table_name = str(subb + "_" + Date + "_Time_"
+ Hour + "_" + Minute + "_" + Second)

import [Link]

# Connect to the
database try:
global cursor
connection = [Link](
host='localhost', user='root', password='',
db='manually_fill_attendance')
cursor = [Link]()
except Exception as e:
print(e)

sql = "CREATE TABLE " + DB_table_name + """


(ID INT NOT NULL AUTO_INCREMENT,
ENROLLMENT varchar(100) NOT NULL,
NAME VARCHAR(50) NOT NULL,
41
Computer Engineering
Facial Recognition Attendance System

DATE VARCHAR(20) NOT NULL,


TIME VARCHAR(20) NOT NULL,
PRIMARY KEY (ID)
);
"""

try:
[Link](sql) # for create a table
except Exception as ex:
print(ex) #

if subb == '':
err_screen_for_subject()
else:
[Link]()
MFW = [Link]()
# [Link]('[Link]')
[Link]("Manually attendance of " +
str(subb)) [Link]('880x470')
[Link](background='grey80')

def del_errsc2():
[Link]()

def err_screen1():
global errsc2
errsc2 = [Link]()
[Link]('330x100')
# [Link]('[Link]')

42
Computer Engineering
Facial Recognition Attendance System

[Link]('Warning!!')
[Link](background='grey80')
Label(errsc2, text='Please enter Student &
Enrollment!!!', fg='black', bg='white',
font=('times', 16, ' bold ')).pack()
Button(errsc2, text='OK', command=del_errsc2, fg="black",
bg="lawn green", width=9, height=1,
activebackground="Red", font=('times', 15, ' bold
')).place(x=90, y=50)

def testVal(inStr, acttyp):


if acttyp == '1': # insert
if not [Link]():
return False
return True

ENR = [Link](MFW, text="Enter Enrollment", width=15,


height=2, fg="black", bg="grey",
font=('times', 15))
[Link](x=30, y=100)

STU_NAME = [Link](MFW, text="Enter Student name",


width=15, height=2, fg="black", bg="grey",
font=('times', 15))
STU_NAME.place(x=30, y=200)

global ENR_ENTRY
ENR_ENTRY = [Link](MFW, width=20, validate='key',
bg="white", fg="black", font=('times', 23))
ENR_ENTRY['validatecommand'] = (
ENR_ENTRY.register(testVal), '%P', '%d')

43
Computer Engineering
Facial Recognition Attendance System

ENR_ENTRY.place(x=290, y=105)

def remove_enr():
ENR_ENTRY.delete(first=0, last=22)

STUDENT_ENTRY = [Link](
MFW, width=20, bg="white", fg="black", font=('times', 23))
STUDENT_ENTRY.place(x=290, y=205)

def remove_student():
STUDENT_ENTRY.delete(first=0, last=22)

# get important variable


def enter_data_DB():
ENROLLMENT = ENR_ENTRY.get()
STUDENT = STUDENT_ENTRY.get()
if ENROLLMENT == '':
err_screen1() elif
STUDENT == '':
err_screen1()
else:
time = [Link](
ts).strftime('%H:%M:%S')

" (ID,ENROLLMENT,NAME,DATE,TIME) VALUES (0,


%s, %s, %s,%s)"
VALUES = (str(ENROLLMENT), str(
STUDENT), str(Date), str(time))
try:
44
Computer Engineering
Facial Recognition Attendance System

[Link](Insert_data, VALUES)
except Exception as e:
print(e)
ENR_ENTRY.delete(first=0, last=22)
STUDENT_ENTRY.delete(first=0, last=22)

def create_csv():
import csv
[Link]("select * from " + DB_table_name + ";")
csv_name = 'C:/Users/Pragya
singh/PycharmProjects/Attendace_management_system/Attendance/
Manually Attendance/'+DB_table_name+'.csv'
with open(csv_name, "w") as csv_file:
csv_writer = [Link](csv_file)
csv_writer.writerow(
[i[0] for i in [Link]]) # write
headers csv_writer.writerows(cursor)
O = "CSV created Successfully"
[Link](text=O, bg="Green", fg="white",
width=33, font=('times', 19, 'bold'))
[Link](x=180, y=380)
import csv
import tkinter
root = [Link]()
[Link]("Attendance of " + subb)
[Link](background='grey80')
with open(csv_name, newline="") as file:
reader = [Link](file)
r=0

45
Computer Engineering
Facial Recognition Attendance System

for col in reader:


c=0
for row in col:
# i've added some styling
label = [Link](root, width=18, height=1,
fg="black", font=('times', 13, ' bold '),
bg="white", text=row,
relief=[Link])
[Link](row=r, column=c)
c += 1
r += 1
[Link]()

Notifi = [Link](MFW, text="CSV created Successfully",


bg="Green", fg="white", width=33,
height=2, font=('times', 19, 'bold'))

c1ear_enroll = [Link](MFW, text="Clear",


command=remove_enr, fg="white", bg="black", width=10,
height=1,
activebackground="white", font=('times', 15, '
bold '))
c1ear_enroll.place(x=690, y=100)

c1ear_student = [Link](MFW, text="Clear",


command=remove_student, fg="white", bg="black", width=10,
height=1,
activebackground="white", font=('times', 15, '
bold '))
c1ear_student.place(x=690, y=200)

46
Computer Engineering
Facial Recognition Attendance System

DATA_SUB = [Link](MFW, text="Enter Data",


command=enter_data_DB, fg="black", bg="SkyBlue1", width=20,
height=2,
activebackground="white", font=('times', 15, ' bold
'))
DATA_SUB.place(x=170, y=300)

MAKE_CSV = [Link](MFW, text="Convert to CSV",


command=create_csv, fg="black", bg="SkyBlue1", width=20,
height=2,
activebackground="white", font=('times', 15, ' bold
'))
MAKE_CSV.place(x=570, y=300)

def attf():
import subprocess
[Link](
r'explorer /select,"C:\Users\Pragya Singh\
PycharmProjects\Attendace_management_system\Attendance\
Manually Attendance\-------Check atttendance "')

attf = [Link](MFW, text="Check Sheets", command=attf,


fg="white", bg="black",
width=12, height=1, activebackground="white",
font=('times', 14, ' bold '))
[Link](x=730, y=410)

[Link]()

SUB = [Link](sb, text="Enter Subject : ", width=15, height=2,


fg="black", bg="grey80", font=('times', 15, ' bold '))
[Link](x=30, y=100)

47
Computer Engineering
Facial Recognition Attendance System

global SUB_ENTRY

SUB_ENTRY = [Link](sb, width=20, bg="white",


fg="black", font=('times', 23))
SUB_ENTRY.place(x=250, y=105)

fill_manual_attendance = [Link](sb, text="Fill Attendance",


command=fill_attendance, fg="black", bg="SkyBlue1", width=20,
height=2,
activebackground="white", font=('times', 15, '
bold '))
fill_manual_attendance.place(x=250, y=160)
[Link]()

# For clear textbox

def clear():
[Link](first=0, last=22)

def clear1():
[Link](first=0, last=22)

def del_sc1():
[Link]()

48
Computer Engineering
Facial Recognition Attendance System

def err_screen():
global sc1
sc1 = [Link]()
[Link]('300x100')
# [Link]('[Link]')
[Link]('Warning!!')
[Link](background='grey80')
Label(sc1, text='Enrollment & Name required!!!',
fg='black', bg='white', font=('times', 16)).pack()
Button(sc1, text='OK', command=del_sc1, fg="black", bg="lawn
green", width=9,
height=1, activebackground="Red", font=('times', 15, ' bold
')).place(x=90, y=50)

# Error screen2

def del_sc2():
[Link]()

def err_screen1():
global sc2
sc2 = [Link]()
[Link]('300x100')
# [Link]('[Link]')
[Link]('Warning!!')
[Link](background='grey80')
Label(sc2, text='Please enter your subject name!!!',
fg='black', bg='white', font=('times', 16)).pack()

49
Computer Engineering
Facial Recognition Attendance System

Button(sc2, text='OK', command=del_sc2, fg="black", bg="lawn


green", width=9,
height=1, activebackground="Red", font=('times', 15, ' bold
')).place(x=90, y=50)

# For take images for datasets

def take_img():
l1 = [Link]()
l2 = [Link]()
if l1 == '':
err_screen()
elif l2 == '':
err_screen()
else:
try:
cam = [Link](0)
detector = [Link](
'haarcascade_frontalface_default.xml')
Enrollment = [Link]()
Name = [Link]()
sampleNum = 0
while (True):
ret, img = [Link]()
gray = [Link](img, cv2.COLOR_BGR2GRAY)
faces = [Link](gray, 1.3, 5)
for (x, y, w, h) in faces:
[Link](img, (x, y), (x + w, y + h), (255, 0, 0), 2)
# incrementing sample number

50
Computer Engineering
Facial Recognition Attendance System

sampleNum = sampleNum + 1
# saving the captured face in the dataset folder
[Link]("TrainingImage/ " + Name + "." + Enrollment +
' + str(sampleNum) + ".jpg",
gray)
print("Images Saved for Enrollment :")
[Link]('Frame', img)
# wait for 100 miliseconds
if [Link](1) & 0xFF == ord('q'):
break
#
# # break if the sample number is morethan
100 elif sampleNum > 70:
break

[Link]()
[Link]()
ts = [Link]()
Date = [Link](ts).strftime('%Y-%m-
%d')
Time = [Link](ts).strftime('%H:%M:
%S')
row = [Enrollment, Name, Date, Time]
with open('StudentDetails\[Link]', 'a+') as
csvFile: writer = [Link](csvFile, delimiter=',')
[Link](row)
[Link]()
res = "Images Saved for Enrollment : " + Enrollment + " Name :
" + Name
[Link](
51
Computer Engineering
Facial Recognition Attendance System

text=res, bg="SpringGreen3", width=50, font=('times', 18,


'bold'))
[Link](x=250, y=400)
except FileExistsError as F:
f = 'Student Data already exists'
[Link](text=f, bg="Red",
width=21) [Link](x=450, y=400)

# for choose subject and fill


attendance def subjectchoose():
def Fillattendances():
sub = [Link]()
now = [Link]() # For calculate seconds of video
future = now + 20
if [Link]() <
future: if sub == '':
err_screen1()
else:
recognizer = [Link].LBPHFaceRecognizer_create() #
[Link]()
try:
[Link]("TrainingImageLabel\[Link]")
except:
e = 'Model not found,Please train model'
[Link](
text=e, bg="red", fg="black", width=33, font=('times', 15,
'bold'))
[Link](x=20, y=250)

52
Computer Engineering
Facial Recognition Attendance System

harcascadePath = "haarcascade_frontalface_default.xml"
faceCascade = [Link](harcascadePath) df
= pd.read_csv("StudentDetails\[Link]") cam =
[Link](0)
font = cv2.FONT_HERSHEY_SIMPLEX
col_names = ['Enrollment', 'Name', 'Date', 'Time']
attendance =
[Link](columns=col_names) while True:
ret, im = [Link]()
gray = [Link](im, cv2.COLOR_BGR2GRAY)
faces = [Link](gray, 1.2, 5)
for (x, y, w, h) in faces:
global Id

Id, conf = [Link](gray[y:y + h, x:x + w])


if (conf < 70):
print(conf)
global Subject
global aa
global date
global timeStamp
Subject = [Link]()
ts = [Link]()
date = [Link](
ts).strftime('%Y-%m-%d')
timeStamp = [Link]( ts).strftime('%H:

%M:%S')

aa = [Link][df['Enrollment'] == Id]
['Name'].values global tt

53
Computer Engineering
Facial Recognition Attendance System

tt = str(Id) + "-" + aa
En = '15624031' + str(Id)
[Link][len(attendance)] = [
Id, aa, date, timeStamp]
[Link](
im, (x, y), (x + w, y + h), (0, 260, 0), 7)
[Link](im, str(tt), (x + h, y),
font, 1, (255, 255, 0,), 4)

else:
Id = 'Unknown'
tt = str(Id)
[Link](
im, (x, y), (x + w, y + h), (0, 25, 255),
7) [Link](im, str(tt), (x + h, y),
font, 1, (0, 25, 255), 4)
if [Link]() > future:
break

attendance = attendance.drop_duplicates(
['Enrollment'], keep='first')
[Link]('Filling attedance..', im)
key = [Link](30) & 0xff
if key == 27:
break

ts = [Link]()
date = [Link](ts).strftime('%Y-
%m-%d')
timeStamp = [Link](
54
Computer Engineering
Facial Recognition Attendance System

ts).strftime('%H:%M:%S')
Hour, Minute, Second = [Link](":")
fileName = "Attendance/" + Subject + "_" + date + \
"_" + Hour + "-" + Minute + "-" + Second + ".csv"
attendance = attendance.drop_duplicates(
['Enrollment'], keep='first')
print(attendance)
attendance.to_csv(fileName, index=False)

# Create table for Attendance


date_for_DB =

[Link]( ts).strftime('%Y_%m_%d')

DB_Table_name = str(
Subject + "_" + date_for_DB + "_Time_" + Hour + "_" +
Minute + "_" + Second)
import [Link]

# Connect to the
database try:
global cursor
connection = [Link](
host='localhost', user='root', password='',
db='Face_reco_fill')
cursor = [Link]()
except Exception as e:
print(e)

sql = "CREATE TABLE " + DB_Table_name + """


(ID INT NOT NULL AUTO_INCREMENT,
ENROLLMENT varchar(100) NOT NULL,

55
Computer Engineering
Facial Recognition Attendance System

NAME VARCHAR(50) NOT NULL,


DATE VARCHAR(20) NOT NULL,
TIME VARCHAR(20) NOT NULL,
PRIMARY KEY (ID)
);
"""
# Now enter attendance in Database
insert_data = "INSERT INTO " + DB_Table_name + \
" (ID,ENROLLMENT,NAME,DATE,TIME) VALUES (0, %s,
%s, %s,%s)"
VALUES = (str(Id), str(aa), str(date), str(timeStamp))
try:
[Link](sql) # for create a table
# For insert data into table
[Link](insert_data, VALUES)
except Exception as ex:
print(ex) #

M = 'Attendance filled Successfully'


[Link](text=M, bg="Green", fg="white",
width=33, font=('times', 15, 'bold'))
[Link](x=20, y=250)

[Link]()
[Link]()

import csv
import tkinter
root = [Link]()
[Link]("Attendance of " + Subject)
56
Computer Engineering
Facial Recognition Attendance System

[Link](background='grey80')
cs = 'C:/Users/Pragya
Singh/PycharmProjects/Attendace_management_system/' + fileName
with open(cs, newline="") as file:
reader = [Link](file)
r=0

for col in reader:


c=0
for row in col:
# i've added some styling
label = [Link](root, width=10, height=1,
fg="black", font=('times', 15, ' bold '),
bg="white", text=row,
relief=[Link])
[Link](row=r, column=c)
c += 1
r += 1
[Link]()
print(attendance)

# windo is frame for subject


chooser windo = [Link]()
# [Link]('[Link]')
[Link]("Enter subject name...")
[Link]('580x320')
[Link](background='grey80')
Notifica = [Link](windo, text="Attendance filled Successfully",
bg="Green", fg="white", width=33,
height=2, font=('times', 15, 'bold'))

57
Computer Engineering
Facial Recognition Attendance System

def Attf():
import subprocess
[Link](
r'explorer /select,"C:\Users\Pragya Singh\PycharmProjects\
Attendace_management_system\Attendance\-------Check atttendance
------ "')

attf = [Link](windo, text="Check Sheets", command=Attf,


fg="white", bg="black",
width=12, height=1, activebackground="white",
font=('times', 14, ' bold '))
[Link](x=430, y=255)

sub = [Link](windo, text="Enter Subject : ", width=15, height=2,


fg="black", bg="grey", font=('times', 15, ' bold '))
[Link](x=30, y=100)

tx = [Link](windo, width=20, bg="white",


fg="black", font=('times', 23))
[Link](x=250, y=105)

fill_a = [Link](windo, text="Fill Attendance", fg="white",


command=Fillattendances, bg="SkyBlue1", width=20, height=2,
activebackground="white", font=('times', 15, ' bold '))
fill_a.place(x=250, y=160)
[Link]()

def admin_panel():
win = [Link]()
# [Link]('[Link]')

58
Computer Engineering
Facial Recognition Attendance System

[Link]("LogIn")
[Link]('880x420')
[Link](background='grey80')

def log_in():
username = un_entr.get()
password = pw_entr.get()

if username == 'pragya':
if password == 'pragya123':
[Link]()
import csv
import tkinter
root = [Link]()
[Link]("Student Details")
[Link](background='grey80')

cs = 'C:/Users/Pragya
Singh/PycharmProjects/Attendace_management_system/StudentDetai
ls/[Link]'
with open(cs, newline="") as file:
reader = [Link](file)
r=0

for col in reader:


c=0
for row in col:
# i've added some styling
label = [Link](root, width=10, height=1,
fg="black", font=('times', 15, ' bold '),

59
Computer Engineering
Facial Recognition Attendance System

bg="white", text=row,
relief=[Link])
[Link](row=r, column=c)
c += 1
r += 1
[Link]()
else:
valid = 'Incorrect ID or Password'
[Link](text=valid, bg="red", fg="white",
width=38, font=('times', 19, 'bold'))
[Link](x=120, y=350)

else:
valid = 'Incorrect ID or Password'
[Link](text=valid, bg="red", fg="white",
width=38, font=('times', 19, 'bold'))
[Link](x=120, y=350)

Nt = [Link](win, text="Attendance filled Successfully", bg="Green",


fg="white", width=40,
height=2, font=('times', 19, 'bold'))
# [Link](x=120, y=350)

un = [Link](win, text="Enter username : ", width=15, height=2,


fg="black", bg="grey",
font=('times', 15, ' bold '))
[Link](x=30, y=50)

pw = [Link](win, text="Enter password : ", width=15, height=2,


fg="black", bg="grey",
font=('times', 15, ' bold '))
60
Computer Engineering
Facial Recognition Attendance System

[Link](x=30, y=150)

def c00():
un_entr.delete(first=0, last=22)

un_entr = [Link](win, width=20, bg="white",


fg="black", font=('times', 23))
un_entr.place(x=290, y=55)

def c11():
pw_entr.delete(first=0, last=22)

pw_entr = [Link](win, width=20, show="*",


bg="white", fg="black", font=('times', 23))
pw_entr.place(x=290, y=155)

c0 = [Link](win, text="Clear", command=c00, fg="white",


bg="black", width=10, height=1,
activebackground="white", font=('times', 15, ' bold '))
[Link](x=690, y=55)

c1 = [Link](win, text="Clear", command=c11, fg="white",


bg="black", width=10, height=1,
activebackground="white", font=('times', 15, ' bold '))
[Link](x=690, y=155)

Login = [Link](win, text="LogIn", fg="black", bg="SkyBlue1",


width=20,
height=2,
activebackground="Red", command=log_in, font=('times',
15, ' bold '))
61
Computer Engineering
Facial Recognition Attendance System

[Link](x=290, y=250)
[Link]()

# For train the model


def trainimg():
recognizer = [Link].LBPHFaceRecognizer_create()
global detector
detector =
[Link]("haarcascade_frontalface_default.xml")
try:
global faces, Id
faces, Id = getImagesAndLabels("TrainingImage")
except Exception as e:
l = 'please make "TrainingImage" folder & put Images'
[Link](text=l, bg="SpringGreen3",
width=50, font=('times', 18, 'bold'))
[Link](x=350, y=400)

[Link](faces, [Link](Id))
try:
[Link]("TrainingImageLabel\[Link]")
except Exception as e:
q = 'Please make "TrainingImageLabel" folder'
[Link](text=q, bg="SpringGreen3",
width=50, font=('times', 18, 'bold'))
[Link](x=350, y=400)

res = "Model Trained" # +",".join(str(f) for f in Id)


[Link](text=res, bg="olive drab",
62
Computer Engineering
Facial Recognition Attendance System

width=50, font=('times', 18, 'bold'))


[Link](x=250, y=400)

def getImagesAndLabels(path):
imagePaths = [[Link](path, f) for f in [Link](path)]
# create empth face list
faceSamples = []
# create empty ID
list Ids = []
# now looping through all the image paths and loading the Ids and
the images
for imagePath in imagePaths:
# loading the image and converting it to gray scale
pilImage = [Link](imagePath).convert('L')
# Now we are converting the PIL image into numpy
array imageNp = [Link](pilImage, 'uint8')
# getting the Id from the image

Id = int([Link](imagePath)[-1].split(".")[1])
# extract the face from the training image sample
faces = [Link](imageNp)
# If a face is there then append that in the list as well as Id of
it for (x, y, w, h) in faces:
[Link](imageNp[y:y + h, x:x +
w]) [Link](Id)
return faceSamples, Ids

window.grid_rowconfigure(0, weight=1)
63
Computer Engineering
Facial Recognition Attendance System

window.grid_columnconfigure(0, weight=1)
# [Link]('[Link]')

def on_closing():
from tkinter import messagebox
if [Link]("Quit", "Do you want to quit?"):
[Link]()

[Link]("WM_DELETE_WINDOW", on_closing)

message = [Link](window, text="Face-Recognition-Based-


Attendance-Management-System", bg="black", fg="white", width=50,
height=3, font=('times', 30, ' bold '))

[Link](x=80, y=20)

Notification = [Link](window, text="All things good", bg="Green",


fg="white", width=15,
height=3, font=('times', 17))

lbl = [Link](window, text="Enter Enrollment : ", width=20,


height=2, fg="black", bg="grey", font=('times', 15, 'bold'))
[Link](x=200, y=200)

def testVal(inStr, acttyp):


if acttyp == '1': # insert
if not [Link]():

64
Computer Engineering
Facial Recognition Attendance System

return False
return True

txt = [Link](window, validate="key", width=20,


bg="white", fg="black", font=('times', 25))
txt['validatecommand'] = ([Link](testVal), '%P', '%d')
[Link](x=550, y=210)

lbl2 = [Link](window, text="Enter Name : ", width=20, fg="black",


bg="grey", height=2, font=('times', 15, ' bold '))
[Link](x=200, y=300)

txt2 = [Link](window, width=20, bg="white",


fg="black", font=('times', 25))
[Link](x=550, y=310)

clearButton = [Link](window, text="Clear", command=clear,


fg="white", bg="black",
width=10, height=1, activebackground="white",
font=('times', 15, ' bold '))
[Link](x=950, y=210)

clearButton1 = [Link](window, text="Clear", command=clear1,


fg="white", bg="black",
width=10, height=1, activebackground="white",
font=('times', 15, ' bold '))
[Link](x=950, y=310)

AP = [Link](window, text="Check Registered students",


command=admin_panel, fg="black",

65
Computer Engineering
Facial Recognition Attendance System

bg="SkyBlue1", width=19, height=1,


activebackground="white", font=('times', 15, ' bold '))
[Link](x=990, y=410)

takeImg = [Link](window, text="Take Images", command=take_img,


fg="black", bg="SkyBlue1",
width=20, height=3, activebackground="white",
font=('times', 15, ' bold '))
[Link](x=90, y=500)

trainImg = [Link](window, text="Train Images", fg="black",


command=trainimg, bg="SkyBlue1",
width=20, height=3, activebackground="white",
font=('times', 15, ' bold '))
[Link](x=390, y=500)

FA = [Link](window, text="Automatic Attendance", fg="black",


command=subjectchoose,
bg="SkyBlue1", width=20, height=3,
activebackground="white", font=('times', 15, ' bold '))
[Link](x=690, y=500)

quitWindow = [Link](window, text="Manually Fill Attendance",


command=manually_fill, fg="black",
bg="SkyBlue1", width=20, height=3,
activebackground="white", font=('times', 15, ' bold '))
[Link](x=990,y=500)
[Link]()

66
Computer Engineering
Facial Recognition Attendance System

CHAPTER 6

SAMPLE SCREENSHOTS

67
Computer Engineering
Facial Recognition Attendance System

70
Information Technology
Facial Recognition Attendance System

71
Computer Engineering
Facial Recognition Attendance System

CHAPTER 7

CONCLUSION

72
Computer Engineering
Facial Recognition Attendance System

7.1 CONCLUSION:

In conclusion, the implementation of a facial recognition-based


attendance monitoring system offers a promising solution for efficient
and accurate attendance tracking in various settings. By harnessing
advanced technology, such a system streamlines the attendance
process, mitigates the potential for errors, and enhances security
measures. Moreover, it fosters a seamless experience for both
administrators and attendees, ultimately contributing to increased
productivity and accountability within organizations. As technology
continues to evolve, the continued refinement and integration of facial
recognition systems hold great potential for revolutionizing attendance
monitoring practices across diverse sectors.

73
Computer Engineering
Facial Recognition Attendance System

7.2 BIBLIOGRAPHY

I. Jain, A. K., Ross, A., & Nandakumar, K. (2016). Introduction to biometrics.


Springer.
II. Li, H., Wang, C., & Liu, Y. (2019). Facial Recognition Attendance System
Based on Deep Learning. In 2019 International Conference on Robotics,
Intelligent Control and Artificial Intelligence (RICAI) (pp. 214-218). IEEE.
III. Singh, D., & Singh, V. P. (2019). Real-Time Attendance Management
System Using Face Recognition. In Proceedings of the International
Conference on Intelligent Sustainable Systems (ICISS 2019) (pp.
803-811). Springer.

IV. Huang, G. B., Mattar, M., Berg, T., & Learned-Miller, E. (2008). Labeled
faces in the wild: A database for studying face recognition in unconstrained
environments. University of Massachusetts, Amherst, Tech. Rep, 07-49.
V. Taigman, Y., Yang, M., Ranzato, M., & Wolf, L. (2014). DeepFace: Closing
the gap to human-level performance in face verification. In Proceedings of
the IEEE conference on computer vision and pattern recognition (pp.
1701-1708).
VI. Turk, M., & Pentland, A. (1991). Eigenfaces for recognition. Journal
of cognitive neuroscience, 3(1), 71-86.
VII. Ghosh, P., & Prakash, N. (2019). Biometric Attendance System Using
Facial Recognition. In Intelligent Systems Design and Applications
(pp. 449-458). Springer, Cham.
VIII. Zhou, D., Krishnan, S., & Kumar, A. (2019). Real-time Automated
Attendance System using Facial Recognition. In 2019 4th International
Conference on Computational Systems and Information Technology
for Sustainable Solutions (CSITSS) (pp. 1-6). IEEE.
IX. National Institute of Standards and Technology (NIST) - Biometric
Testing and Evaluation: [Link]

74
Computer Engineering
Facial Recognition Attendance System
projects/biometric-testing-and-evaluation
X. OpenCV Documentation - Facial Recognition:
[Link]
[Link]
XI. PyImageSearch - Facial Recognition with OpenCV, Python, and deep
learning: [Link]
recognition-with-opencv-python- and-deep-learning/
XII. IEEE Xplore Digital Library: [Link]
XIII. SpringerLink - Biometrics:
[Link]
XIV. ACM Digital Library: [Link]

These websites offer valuable resources, tutorials, research papers, and


articles for further exploration and understanding of facial recognition-based
attendance systems.

75
Computer Engineering
Facial Recognition Attendance System

76
Computer Engineering

You might also like