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

E-Attendance System with Face Recognition

Uploaded by

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

E-Attendance System with Face Recognition

Uploaded by

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

A Minor Project Report

On

E-ATTENDANCE SYSTEM USING FACE RECOGNITION


Submitted for partial fulfillment of the requirements for the award of the degree

BACHELOR OF TECHNOLOGY

IN

COMPUTER SCIENCE AND ENGINEERING

BY

Ms. [Link] CHARITHA (19641A05D4)

Ms. [Link] (19641A05F1)

Mr. P. YESHWANTH SAI (19641A05C4)

Mr. [Link] (19641A05F2)

Under the Guidance of

Mr. SALIM AMIRALI JIWANI

(Associative Professor)

VAAGDEVI COLLEGE OF ENGINEERING


(Autonomous, Affiliated to JNTUH, NAAC ‘A’ Grade and NBA Accredited)

BOLLIKUNTA, WARANGAL – 506005

2019-2023
VAAGDEVI COLLEGE OF ENGINEERING
(Autonomous, Affiliated to JNTUH, NAAC ‘A’ Grade and NBA Accredited)

BOLLIKUNTA, WARANGAL – 506005

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

This is to certify that the project work entitled “E-Attendance System using Face
Recognition” is a bonafide work carried out by

Ms. D. Sai Charitha (19641A05D4),

Ms. P. Likhitha (19641A05F1),

Mr.P. Yeshwanth Sai (19641A05C4),

and Mr. P. Pranay (19641A05F2) in partial fulfillment of the requirements for the
award of degree Bachelor of technology in Computer Science and Engineering from
Vaagdevi college of Engineering (Autonomous) during the academic year 2022-2023.

Mr. SALIM AMIRALI JIWANI Dr. [Link]


Associative Professor Head of the
Department

Project Guide

DECLARATION

We declare that the work reported in the project entitled “E-Attendance System using
Face Recognition” is a record of work done by us in the partial fulfillment for the award
of degree Bachelor of Technology in Computer Science and Engineering, Vaagdevi
college of Engineering (Autonomous), Affiliated to JNTUH, NAAC ‘A’ Grade, under
the guidance of Mr, Salim Amirali Jiwani Assistant Professor, CSE department. We
hereby declare that this project work bears no resemblance to any other project submitted
at Vaagdevi College of Engineering or any other university/college for the award of the
degree.

Ms. D. Sai Charitha (19641A05D4)

Ms. P. Likhitha (19641A05F1)

Mr. P. Yeshwanth Sai (19641A05C4)

Mr. P. Pranay (19641A05F2)


ACKNOWLEDGEMENT

The development of the project though it was an arduous task, it has been made by the
help of many people. We are pleased to express our thanks to the people whose
suggestions, comments, criticisms greatly encouraged us in betterment of the project.

We would like to express our sincere gratitude and indebtedness to my project Guide Mr.
Salim Amirali Jiwani , Assistant Professor, for his valuable suggestions and interest
throughout the course of this project.

We would like to express our sincere thanks and profound gratitude to Dr. K. Prakash,
principal of Vaagdevi College of Engineering, for his support, guidance and
encouragement in the course of our project.

We are also thankful to the Head of the Department Dr. N. Satyawathi Associative
Professor for providing excellent infrastructure and a nice atmosphere for completing this
project successfully.

We are highly thankful to the Project Coordinators for their valuable suggestions,
encouragement and motivations for completing this project successfully.

Finally, we would like to take this opportunity to thank our families for their support
through the work. We sincerely acknowledge and thank all those who gave directly or
indirectly their support in completion of this work.

Ms. D. Sai Charitha (19641A05D4)

Ms. P. Likhitha (19641A05F1)

Mr. P. Yeswanth Sai (19641A05C4)

Mr. P. Pranay (19641A05F2)


TABLE OF CONTENTS

TITLE PAGE NOS.

Abstract............................................................................................................i

List of Figures .............................................................................................. ii

List of Tables .......................................................................................... ...... iii

List of Acronyms…….....................................................................................iv

CHAPTER I

INTRODUCTION 01 - 06

1.1 Objectives 02

1.2 Problem specification 02

1.3 Methodologies 03

1.3.1 Manual Attendance System 03

1.3.2 Automated Attendance System 03 - 04

1.4 Contributions 04 - 05

1.5 Layout of the project 05 - 06

CHAPTER II

LITERATURE SURVEY 07 - 13

2.1 Project Background 07

2.2 Project Work 07 - 12

2.3 Comparative Study 12 - 13

CHAPTER III
SYSTEM ANALYSIS AND DESCRIPTION 14 - 20

3.1 Existing System 14

3.2 Proposed System 15

3.3 Module Description 15 - 16

3.4 Feasibility Study 16 - 17

3.5 SDLC Module 18 - 20

CHAPTER IV

SOFTWARE REQUIREMENT SPECIFICATIONS 21

4.1 Software Requirements 21

4.2 Functional Requirements 21

CHAPTER V

IMPLEMENTATION 22 - 23

5.1 Algorithm 22

5.2 Flowchart 22

5.3 Dataset 23

5.4 User Interfaces or Output 23

CHAPTER VI

TESTING 24 - 28

CHAPTER VII

CONCLUSIONS & FUTURE ENHANCEMENTS 29 - 31

7.1 Observations 29
7.2 Result Analysis 29 -31
7.3 Limitations 32
7.4 Future works & concluding remarks 33
7.4.1 Conclusion 33
7.4.2 Future Enhancement 33
REFERENCES 34
APPENDIX 35 - 51
ABSTRACT

. Nowadays Educational institutions are concerned about regularity of student


attendance. Even in pandemic situation attendance is still a major issue in schools and
colleges. Mainly there are two conventional methods of marking attendance which are
calling out the roll call or by taking student sign on paper. They both were more time
consuming and difficult. Hence, there is a requirement of computer-based student
attendance management system which will assist the faculty for maintaining attendance
record automatically. In this project we have implemented the automated attendance
system using ‘TKINTER’ and ‘PYTHON’. We have projected our ideas to implement an
“E-Attendance System Based on Face Recognition”. The application includes face
identification, which saves time as well as being purely software based it can be flagged
as eco-friendly as it reduces the use of paper. This system also eliminates the chances of
fake attendance because of the face being used as a biometric for authentication. Hence,
this system can be implemented in a field where attendance plays an important role. The
proposed system is designed in TKINTER platform supported with a script of PYTHON
as well as SQL database. The algorithm used in the system is based on image comparison
on the basis of the encoded values of the face from the image from database with the
image recorded by the system in run time. The system has output in the form of excel
sheet.

i
LIST OF FIGURES

Fig.1.1 Block Diagram of the system 05

Fig.2. 1 Block Diagram of previous project#1 08

Fig.2.2 Block Diagram of previous project#2 10

Fig.2.3 Block Diagram of previous project#3 12

Fig.3.1 Waterfall Lifecycle Model 19

Fig.5.1 Flowchart 22

Fig.5.2 Dataset Picture 23

Fig.5.3 User interface and Output screen 23

Fig.7.1 Database before attendance 29

Fig.7.2 Detecting the one student face 30

Fig.7.3 Detecting the triple student’s face 30

Fig.7.4 Click on the attendance which shows at the left side of the interface 31

Fig.7.5 Attendance updated excel sheet 32

ii
LIST OF TABLES

Table1.1: CONTRIBUTION OF TEAM MEMBERS 05

Table2.1: COMPARISION BETWEEN ALL PROJECTS 13

Table6.1: TEST CASES 28

iii
LIST OF ACRONYMS

IMAQ : Image Acquisition boards

LabVIEW : Laboratory Virtual Instrument Engineering Workbench

SVD : Singular Value Decomposition

PCA : Principal Component Analysis

LBP : Local Binary Pattern

SDLC : Software Development Life Cycle

iv
CHAPTER I

INTRODUCTION

Automatic face recognition (AFR) technologies have made many improvements


in the changing world. Smart Attendance using Real-Time Face Recognition is a real-
world solution which comes with day to day activities of handling student attendance
system. Face recognition-based attendance system is a process of recognizing the
students face for taking attendance by using face biometrics based on high - definition
monitor video and other information technology. In my face recognition project, a
computer system will be able to find and recognize human faces fast and precisely in
images or videos that are being captured through a surveillance camera. Numerous
algorithms and techniques have been developed for improving the performance of face
recognition but the concept to be implemented here is Deep Learning. It helps in
conversion of the frames of the video into images so that the face of the student can be
easily recognized for their attendance so that the attendance database can be easily
reflected automatically.

Face recognition is an important application of Image processing owing to its use


in many fields. Identification of individuals in an organization for the purpose of
attendance is one such application of face recognition. Maintenance and monitoring of
attendance records plays a vital role in the analysis of performance of any organization.
The purpose of developing attendance management system is to computerize the
traditional way of taking attendance. Automated Attendance Management System
performs the daily activities of attendance marking and analysis with reduced human
intervention. The prevalent techniques and methodologies for detecting and recognizing
face fail to overcome issues such as scaling, pose, illumination, variations, rotation, and
occlusions. The proposed system aims to overcome the pitfalls of the existing systems
and provides features such as detection of faces, extraction of the features, detection of
extracted features, and analysis of students' attendance. The system integrates techniques
such as image contrasts, integral images, color features and cascading classifier for
feature detection. The system provides an increased accuracy due to use of a large

1
number of features (Shape, Colour, LBP, wavelet, Auto-Correlation) of the face. Faces
are recognized using Euclidean distance and k-nearest neighbor algorithms. Better
accuracy is attained in results as the system takes into account the changes that occur in
the face over the period of time and employs suitable learning algorithms. The system is
tested for various use cases. We consider a specific area such as classroom attendance
for the purpose of testing the accuracy of the system. The metric considered is the
percentage of the recognized faces per total number of tested faces of the same person.
The system is tested under varying lighting conditions, various facial expressions,
presence of partial faces (in densely populated classrooms) and presence or absence of
beard and spectacles. An increased accuracy (nearly 100%) is obtained in most of the
cases considered.

1.1 Objectives

1. Reducing time wastage during conventional class attendance.


2. Utilizing latest trends in machine vision to implement a feasible solution for class
attendance system. 3. Automating the whole process so that we have digital
environment.
3. Preventing fake roll calls as one to one attendance marking is possible only.
4. Encouraging the use of technology in daily lives.

1.2 Problem Specification


a. Uses Pattern Matching algorithm for face detection.
b. Score of minimum 600 required to perfectly match a face.
c. Metric: Camera Resolution.
d. For prototype fixed to 10 users only but scalable design.
e. Requires good lighting condition for better camera capture capability.
f. Attendance sheet is .xlsx format and can be digitally distributed and maintained.

2
1.3 Methodologies
In order to obtain the attendance, positions and face images in lecture, we
proposed the E- Attendance System using Face Recognition in the classroom lecture. The
system estimates the attendance and positions of each student by continuous observation
and recording. Current work is based on the method to obtain the different weights of
each focused seat.

The technology aims in imparting tremendous knowledge oriented technical innovations


these days. Deep Learning is one among the interesting domain that enables the machine
to train itself by providing some datasets as input and provides an appropriate output
during testing by applying different learning algorithms. Nowadays Attendance is
considered as an important factor for both the student as well as the teacher of an
educational organization. With the advancement of the deep learning technology the
machine automatically detects the attendance performance of the students and maintains
a record of those collected. In general, the attendance system of the student can be,

1. Manual Attendance System (MAS)

2. Automated Attendance System (AAS)

1.3.1 Manual Attendance System (MAS)

Manual Student Attendance Management system is a process where a teacher concerned


with the particular attendance manually. Manual attendance may be considered as a time-
consuming process or sometimes it happens for the teacher to miss someone or students
may answer multiple times on the absence of their friends. So, the problem arises when
we think about the traditional process of taking attendance in the classroom.

1.3.2 Automated Attendance System (AAS)

Automated Attendance System (AAS) is a process to student in the classroom by using


face recognition technology. It is also possible to recognize whether the student is
sleeping or awake during the lecture and it can also be implemented in the exam sessions
to ensure the presence of the student. Attendance of students will be taken by a real-time

3
camera positioned at the door which senses anyone entering or exiting the classroom. The
camera is trained in such a way that it differentiates shadows and photos.

The two common Human Face Recognition techniques are,

1. Feature-Based approach

2. Brightness Based approach

 Feature-Based approach
The Feature-based approach also known as local face recognition system, used in
pointing the key features of the face.

 Brightness Based approach


The brightness-based approach also termed as the global face recognition system,
used in recognizing all the parts of the image.

1.4 Contribution of Team Members

As group, we managed to divide the work between us as shown in (Table 1). We were
collaborating and meeting with each other, in order to try our best to work on the project
despite what is happening.

4
1.5 Layout of the project

Camera

Vision Image Pattern


Acquisition Grayscale Extraction

Update Find Match in Feature


Attendance database Extraction
Sheet .xlsx

Fig 1.1: BLOCK DIAGRAM OF THE SYSTEM

The subsystem description is as follows:

Camera: The camera is the only hardware component required to capture live video feed
of class.

Vision Acquisition: This module allows image to be captured by camera into LabVIEW
for programming. It includes IMAQ submodules such as IMAQ Create, IMAQdx Open,
IMAQdx Grab. They all combine to provide Continuous Acquisition of video feed from
camera module.

5
Image to Grayscale: This process is performed using IMAQ ExtractSingleColorPlane
VI to convert a 32/16bit image to 8bit image. This is a requirement for our pattern
matching algorithm to work completely.

Pattern Extraction: This is included in Vision Assistant VI which deals with our face
recognition algorithm. Pattern Extraction is feature in which the image inputted features
are compared using Pattern Matching Algorithm.

Feature Extraction: This feature is used to extract important features out of image. It
compares them with templates, saves in database and provides a score of comparison.

Find Match in database: Our database has preserved templates or images of students
which we aim to recognize and mark attendance. This database can be updated or
appended according to requirement. This database is used for comparison with extracted
feature of image to confirm a successful hit.

Update Attendance [Link]: If match is found our algorithm updates the attendance
of user corresponding to his/her name in excel file of format .xlsx. If not, the system
marks absent in front of his/her name in the same excel file.

CHAPTER II
LITERATURE SURVEY

2.1 Project background

In the face detection and recognition system, the process flow is initiated by being able to
detect the facial features from a camera or a picture store in a memory. The algorithm
processes the image captured and identifies the number of faces in the image by

6
analyzing from the learned pattern and compare them to filter out the rest. This image
processing uses multiple algorithm that takes facial features and compare them with
known database. The motivation behind this project is to simplify the means by which
attendance is taken during lectures and how much time it takes. The use of ID cards or
manually calling out attendance and writing it down on sheets is not productive and
efficient. This system will detect the number of faces on the class and will also identify
them from the store database. With the face detection and recognition system in place, it
will be easy to tell if a student is actually present in the classroom or not.

2.2 Previous Work

PROJECT # 1

This is a project done by students as a final year project at Kingston University London in
2018.

The system will be presented an image either via camera or from memory and it
must detect the number of faces on it automatically. After identifying faces, the system
should crop the faces from the image and store them in memory for image recognition
which will be done in the second step. The system should be able to automatically count
the number of faces detected on the image. The second step will be the recognition part
where the system will be able to match faces from the stored dataset and compare it to the
input data from the first step. A software will be used for this system which automatically
sorts out the faces. The software will be inter-active so to facilitate interaction between
multiple tasks as required. Because the system has two steps, the second phase of the
system will involve the training of images on a dataset that are to be used for recognition.

The system behavior has been explained in the following flowchart

7
Fig 2.1: BLOCK DIAGRAM OF PREVIOUS PROJECT #1

Technology Used

The key algorithms are Viola-Jones for face detection and Hidden Markov Model
with SVD.

8
 The implementation of The Viola-Jones algorithm is available on softwares like
MATLAB, OpenCV and Web Browsers (using adobe flash).
 The existing implementation of the Hidden Markov Model with SVD for face
recognition are available on MATLAB, C++ and OpenCV libraries.

PROJECT #2

This is a project done by students as a final year project at University of Nairobi in 2012.

The system will comprise of two modules. The first module a.k.a face detector is
a mobile component, which is basically a camera that captures student faces and stores
them in a file using computer vision face detection algorithms and face extraction
techniques. The second module is a desktop application that does face recognition of the
captured images (faces) in the file, marks the students register and then stores the results
in a database for future analysis.

Following flowchart explains the process of the flow of information throughout


the process.

9
Fig 2.2: BLOCK DIAGRAM OF PREVIOUS PROJECT #2

Technology Used

The following tools will be used in the implementation of the designed system.
They’ve been divided in to two categories; Mobile and Desktop tools.

 Mobile Tools
The face detection module will use OpenCV library for implementation by use of
the frontal Haar Cascade face detector in either Android studio.

OpenCV for Android Library - (Open Source Computer Vision) is a library of


programming functions mainly aimed at real-time computer vision.

10
Android Studio/ Eclipse IDE - Android Studio is the official IDE for Android
application development, based on IntelliJ IDEA.

 Desktop Tools
EmguCV Library - EmguCV is a cross platform .Net wrapper to the OpenCV image
processing library. OpenCV/EmguCV uses a type of face detector called a Haar Cascade.
The Haar Cascade is a classifier (detector) trained on thousands of human faces.

Visual Studio - Visual Studio is able to build and run the solution examples after a
proper configuration of EmguCV. The desktop software will implement the two sub-
systems (Training set manager and Face recognizer) together with face detector in
windows form.

PROJECT # 3

This is a project done by students as a final year project at Universiti Tunku in 2018.

The approach performs face recognition-based student attendance system. This


method is also similar to others and begins with the input of an image either loaded from
memory or from camera. Then it pre-processes the facial features and extracts it followed
by subjective selecting and then the recognition of the facial images from known
database. Both LBP and PCA feature extraction methods are studied in detail and
computed in this approach in order to make comparisons. LBP is enhanced in this
approach to reduce the illumination effect. An algorithm to combine enhanced LBP and
PCA is also designed for subjective selection in order to increase the accuracy.

11
Fig 2.3: BLOCK DIAGRAM OF PREVIOUS PROJECT #3

The project is completely built in MATLAB with OpenCV libraries implemented in it.

2.3 Comparative Study

Our project is different than all the previous projects made and mentioned above.
They have purely used the core of machine vision to implement a face detection
mechanism. None of the abovementioned projects have realized the power of LabVIEW
programming and LabVIEW Vision modules in which not only pattern matching but
other machine vision algorithms like edge tracking, geometric matching can be
implemented with ease. Though the general mechanism and flow of events is similar in

12
above projects and our current project however, the mechanism of face detection is
completely unique and different.

TABLE 2.1: COMPARISION BETWEEN ALL PROJECTS

Projects 1 2 3 Our Project


Face regonition & ✓ ✓ ✓ ✓
Detection
Communication
GSM, GSM GSM Wi-Fi Wi-Fi
Zigbee,WiFi
Time Saving ✓ ✓
Market Demand ✓ ✓ ✓ ✓

Local Usage in ✓ ✓ ✓
schools
Data Saving in ✓ ✓
Record
(Monitoring)

13
CHAPTER III
3. SYSTEM ANALYSIS AND DECRIPTION

3.1. Existing system:

1) Biometric scan

a. Student’s fingerprints are scanned and stored in the database.


b. To mark their attendance the students must use the biometric system
before every class.
c. A central system holds all the data and is responsible for managing all
student records.
2) ID card swipe system

a. College ID cards are fitted with RFID chips which are scanned by readers
installed in each classroom.
b. The cards are scanned before each class to mark the student’s attendance.
c. The server is updated every ten minutes.
d. Every teaching faculty gets a list of all the students who were present after
every class is over.
e. An online portal allows access to students to view their current attendance.
3) Existing algorithms

a. This algorithm extracts the necessary information from an image and


efficiently encodes it.
b. To obtain variations, a number of pictures of a single person are taken.
c. For the set of images of faces, eigenvectors and its covariance matrix is
calculated and stored.
d. Since every image represents an eigen vector, the data set helps produce
variety for the system. v. A representation of these eigen vectors is called
eigen faces.

14
3.2 Proposed system:

A facial recognition system is a computer application capable of identifying or


verifying a person from a digital image or a video frame from a video source. One of the
ways to do this is by comparing selected facial features from the image and a facial
database. It is typically used in security systems and can be compared to other biometrics
such as fingerprint or eye iris recognition systems. Some facial recognition algorithms
identify facial features by extracting landmarks, or features, from an image of the
subject’s face. For example, an algorithm may analyze the relative position, size, and/or
shape of the eyes, nose, cheekbones, and jaw. These features are then used to search for
other images with matching features. Other algorithms normalize a gallery of face images
and then compress the face data, only saving the data in the image that is useful for face
recognition. A probe image is then compared with the face data. One of the earliest
successful systems is based on template matching techniques applied to a set of salient
facial features, providing a sort of compressed face representation. Recognition
algorithms can be divided into two main approaches, geometric, which looks at
distinguishing features, or photometric, which is a statistical approach that distills an
image into values and compares the values with templates to eliminate variances. Popular
recognition algorithms include Principal Component Analysis using eigenfaces, Linear
Discriminate Analysis, Elastic Bunch Graph Matching using the Fisherface algorithm, the
Hidden Markov model, the Multilinear Subspace Learning using tensor representation,
and the neuronal motivated dynamic link matching.

3.3 Modules Description

This section describes the software algorithm for the system. The algorithm consists of
the following steps
 Image acquisition
 Histogram normalization
 Noise removal
 Skin classification
 Face detection

15
 Face recognition
 Attendance
In the first step image is captured from the camera. There are illumination effects
in the captured image because of different lighting conditions and some noise which is to
be removed before going to the next steps. Histogram normalization is used for contrast
enhancement in the spatial domain. Median filter is used for removal of noise in the
image. There are other techniques like FFT and low pass filter for noise removal and
smoothing of the images but median filter gives good results.

3.4 Feasibility Study

TECHINICAL FEASIBILITY:

Evaluating the technical feasibility is the trickiest part of a feasibility study. This
is because, at this point in time, not too many detailed design of the system, making it
difficult to access issues like performance, costs on (on account of the kind of technology
to be deployed) etc.

A number of issues have to be considered while doing a technical analysis.

i) Understand the different technologies involved in the proposed system:

Before commencing the project, we have to be very clear about what are the

Technologies that are to be required for the development of the new system.

ii) Find out whether the organization currently possesses the required
technologies:
Is the required technology available with the organization?

If so is the capacity sufficient?

For instance –

“Will the current printer be able to handle the new reports and forms required for
the new system?”

16
OPERATIONAL FEASIBILITY:

Proposed projects are beneficial only if they can be turned into information systems
that will meet the organizations operating requirements. Simply stated, this test of
feasibility asks if the system will work when it is developed and installed. Are there
major barriers to Implementation? Here are questions that will help test the operational
feasibility of a project:

 Is there sufficient support for the project from management from users? If the current
system is well liked and used to the extent that persons will not be able to see
reasons for change, there may be resistance.
 Are the current business methods acceptable to the user? If they are not, Users may
welcome a change that will bring about a more operational and useful systems.
 Have the user been involved in the planning and development of the project?
In the existing manual system, the new system was considered to be operational feasible.

ECONOMIC FEASIBILITY:

Economic feasibility attempts 2 weigh the costs of developing and implementing


a new system, against the benefits that would accrue from having the new system in
place. This feasibility study gives the top management the economic justification for the
new system.

A simple economic analysis which gives the actual comparison of costs and
benefits are much more meaningful in this case. In addition, this proves to be a useful
point of reference.

3.5 SDLC Model.

17
THE INCREMENTAL, ITERATIVE SOFTWARE ENGINEERING LIFE
CYCLE:

When we defining and constructing credit card validation systems will uncover
many requirements that may be difficult at outset. Instead knowledge of the system and
requirements will grow as work progress the whole software engineering process is
designed to uncover details and incompatibilities in the requirements that may not be
obvious to customer and bankers at outset.

 WATERFALL LIFECYCLE MODEL:


Waterfall model states that the phases (analysis, design, and coding, testing,
support) are systematized in a linear order and each phase should accomplished entirely
earlier of the next phase begins.

ADVANTAGES:

1. This model is very easy to use and implement.


2. Each phase is completed at a time and processed.
3. This model better works for smaller projects if only the requirements are well
understood.
4. In each phase have deliverables and that must be reviewed.

DISADVANTAGES:

1. If the requirements are gathered are inaccurate then the final product is inaccurate
and the error is known in the final phase of the model. Any sort of errors that
cannot be detected in any previous phase.
2. For long, object-oriented, complex and ongoing projects it’s a poor model.
3. This model has high risks.

Analysis

Requirements
18
specification

Design
Fig 3.1: Waterfall Lifecycle Model

PROTOTYPE MODEL:

In this model the requirements are gathered firstly, and the prototype is deployed
according to the requirements. This prototype is a quick design which goes through the
coding, design and testing. The phases are not done in detail. By seeing this prototype the
client feels like a real system, so that the client understands the entire requirements of the
systems.

ADVANTAGES:

1. During the development process the developers are interestingly engaged.


2. The prototype developed that is used by the users for well understanding of the
methodology.
3. The user involvement is increased and improved.
4. The flaws and faults are identified early.
5. The user’s opinion about the product is known early which leads to an improved
system.

DISADVANTAGES:

1. This model focuses on design quite than functionality.

19
2. The model is implemented firstly and then errors are evaluated later which
becomes a complex process.
3. The model is also known as throw-away prototype.

SYSTEM DESIGN
ER-DIAGRAM

DATA FLOW DIAGRAM (Lvl-0 & Lvl-1)

20
21
CHAPTER IV
4. SOFTWARE REQUIREMENT SPECIFICATIONS

4.1 Software Requirements

● Python: generally the language of choice for machine learning today.

● Tensorflow: an open-source machine learning and neural network toolkit. Tensorflow


is the go-to library for numerical computation and large-scale machine learning.

● scikit-learn: Simple and efficient tools for data mining and data analysis.

● scipy: a free and open source library for scientific and technical computing.

● numpy: a Python library supporting large, multi-dimensional arrays with a large


library of functions for operating on these arrays.

● OpenCV: an open-source library of functions aimed at real-time computer vision.

Hardware Requirements are not applicable in this project.

4.2 Functional Requirements

Many advantages associated to using sqlite3 are,

a. Reading and writing from an SQLite database is often faster than reading and writing
individual files from disk

b. The application only has to load the data it needs, rather than reading the entire file and
holding a complete parse in memory.

c. No application files I/O code to write and debug.

d. SQL queries are many times smaller than the equivalent procedural code

22
e. SQLite database content can be viewed using a wide variety third-party tools.

CHAPTER V
5. IMPLEMENTATION

5.1 Algorithm

We have imported our code in python command window. The project requirement
overall code has been shown in appendix.

5.2 Flowchart

LBP Features extraction Training stage


Input Training image (3x3 blocks) and concatenation

Models

Yes
Classification Face
stage ?
Yes No
Input Text Face
images candida
LBP
No
(3x3 blocks) Non Face Face

Non Face

Figure 5.1 – Flowchart


23
5.3 Dataset

Figure 5.2 - Dataset Pictures


These are the pictures which are trained and stored in a dataset.

5.4 User Interfaces or Output Screens.

24
Figure 5.3 – User Interface and Output Screen

CHAPTER VI
TESTING

Software testing is a critical element of software quality assurance and represents


the ultimate review of specification, design and coding. The increasing visibility of
software as a system element and attendant costs associated with a software failure are
motivating factors for we planned, through testing. Testing is the process of executing a
program with the intent of finding an error. The design of tests for software and other
engineered products can be as challenging as the initial design of the product itself.

There of basically two types of testing approaches.

One is Black-Box testing – the specified function that a product has been
designed to perform, tests can be conducted that demonstrate each function is fully
operated.

The other is White-Box testing – knowing the internal workings of the


product, tests can be conducted to ensure that the internal operation of the product

25
performs according to specifications and all internal components have been
adequately exercised.

White box and Black box testing methods have been used to test this package.
All the loop constructs have been tested for their boundary and intermediate conditions.
The test data was designed with a view to check for all the conditions and logical
decisions. Error handling has been taken care of by the use of exception handlers.

 Testing Strategies:

Testing is a set of activities that can be planned in advanced and conducted


systematically. A strategy for software testing must accommodation low-level tests that
are necessary to verify that a small source code segment has been correctly implemented
as well as high-level tests that validate major system functions against customer
requirements.

Software testing is one element of verification and validation. Verification refers


to the set of activities that ensure that software correctly implements as specific function.
Validation refers to a different set of activities that ensure that the software that has been
built is traceable to customer requirements.

The objective of software testing to uncover errors. To fulfill this objective, a


series of test steps unit, integration, validation and system tests are planned and executed.
Each test step is accomplished through a series of systematic test technique that assist in
the design of test cases. With each testing step, the level of abstraction with which
software is considered is broadened.

 Unit Testing:

Unit testing focuses verification effort on the smallest unit of software design –
the module. The unit test is always white box oriented. The tests that occur as part of
unit testing are testing the module interface, examining the local data structures, testing
the boundary conditions, executing all the independent paths and testing error-handling
paths.

 Integration Testing:

26
Integration testing is a systematic technique for constructing the program structure
while at the same time conducting tests to uncover errors associated with interfacing.
Scope of testing summarizes the specific functional, performance, and internal design
characteristics that are to be tested. It employs top-down testing and bottom-up testing
methods for this case.

 White Box Testing:

The purpose of any security testing method is to ensure the robustness of a system
in the face of malicious attacks or regular software failures. White box testing is
performed based on the knowledge of how the system is implemented. White box testing
includes analyzing data flow, control flow, information flow, coding practices, and
exception and error handling within the system, to test the intended and unintended
software behavior. White box testing can be performed to validate whether code
implementation follows intended design, to validate implemented security functionality,
and to uncover exploitable vulnerabilities.

White box testing requires access to the source code. Though white box testing
can be performed any time in the life cycle after the code is developed, it is a good
practice to perform white box testing during the unit testing phase.

White box testing requires knowing what makes software secure or insecure, how
to think like an attacker, and how to use different testing tools and techniques. The first
step in white box testing is to comprehend and analyze source code, so knowing what
makes software secure is a fundamental requirement. Second, to create tests that exploit
software, a tester must think like an attacker. Third, to perform testing effectively, testers
need to know the different tools and techniques available for white box testing. The three
requirements do not work in isolation, but together.

 Black Box Testing:


Also known as functional testing. A software testing technique whereby the
internal workings of the item being tested are not known by the tester. For example, in a
black box test on software design the tester only knows the inputs and what the expected

27
outcomes should be and not how the program arrives at those outputs. The tester does not
ever examine the programming code and does not need any further knowledge of the
program other than its specifications.

The advantages of this type of testing include:

 The test is unbiased because the designer and the tester are independent of each
other.
 The tester does not need knowledge of any specific programming languages.
 The test is done from the point of view of the user, not the designer.
 Test cases can be designed as soon as the specifications are complete.

 System Testing :

System testing validates software once it has been incorporated into a larger
system. Software is incorporated with other system elements and a series of system
integration and validation tests are conducted. System testing is actually a series of
different test whose primary purpose is to fully exercise the computer- based system.

Once the system has been developed it has to be tested. In the present system we
have to take care of valid property and assessment numbers i.e. there should not exist any
duplicate number in each case. Care should be taken that the appropriate data is retrieved
in response to the queries.

VALIDATION:

The terms verification and validations are used interchangeably we will describe
both these methods. Verification is the process of determining whether or not the
products of given phase of software development fulfill the specifications established in
the previous phase. These activities include proving and reviews.

28
TABLE 6.1: TEST CASES

[Link] Action Inputs Expected Actual Test Result


Output Output

1 Capture A Person’s Images are Images are Pass


Images Face Captured captured and
and Stored stored

2 Train the Stored Create Histograms Pass


image Dataset images of Histograms are created
a face and store and values
values are stored
3 Face A live Name of Name of Pass
Recognition stream of a detected detected
person’s person is person is
face displayed on displayed on
the screen the screen

29
4 Update Multiple Update Update Pass
attendance for faces from Attendance Attendance
multiple a live video for all faces for all
people at once stream detected faces
detected

CHAPTER VII

CONCLUSIONS & FUTURE ENHANCEMENTS

7.1 Observations

Verify that the spreadsheet is updated to corresponding present as soon as image


is detected. The “Present” should be marked against the person detected only.

7.2 Result Analysis

The database before the attendance is as shown in fig 7.1(since there is no data
available in the excel sheet).

30
Figure 7.1 – Database Before Attendance

Before taking attendance, an individual has to enroll or register with our


credentials along with our face once per a candidate to get the desired result. The camera
has captured live feed of video as shown in (Figure 7.2 and 7.3). Also, the image captured
is in grayscale and stores the candidate credentials in student details.

Figure 7.3 – Detecting the triple student’s face

After registration has been completed, a faculty or any person who has authority to take
attendance should click on the Take Attendance on the left side of the user interface
shown in the Fig.7.3. Then we were successfully able to detect face using camera and
update the present students in a excel file as shown in Figure 7.4.

31
Figure 7.4 – Click on the Take Attendance which shows at the left side of the
interface

Figure 7.5 – Attendance updated sheet

7.3 Limitations

 COVID-19 played a crucial role while we tried to merge the subsystems,


however it prevented us to do so due to the quarantine. COVID-19 did not
allows us to meet as a group. Then we have proposed this project to mark
attendance for the students.
 The identical twin issue. We were having a challenge of getting different
recognitions for twins.
 The first time setup for camera was easy. By taking guidance manual and
some advisors helped, successful camera setup was built.

32
7.4 Future works & concluding remarks

7.4.1 Conclusion

In this system we have implemented an attendance system for a lecture, section or


laboratory by which lecturer or teaching assistant an record student’s attendance. It saves
time and effort, especially if it is a lecture with huge number of students. The complete
system is implemented in .net. This attendance system shows the use of facial recognition
techniques for the purpose of student attendance and for the further process this record of
student can be used in exam related issues.

7.4.2 Future Enhancement

The future enhancement will be extending our application in online shopping,


where in user need to purchase or buy anything only after verifying his/her credential.
Verification of user credentials can be done through our application to ensure secure
transaction.

33
RFERENCES
The following books were referred during the analysis and execution phase of the
project.

References

[1]A Study of Various Face Detection Methods , [Link] Gupta1 , Mr. Dipesh
Sharma2,ijarcce volume 3[Link] CCE7G%2
0%20a%20varsha%20A%20Study%20of%20Vario us%20F

[2]Face Recognition Based on HOG and Fast PCA Algorithm Xiang-Yu Li(&) and Zhen-
Xian Lin.

[3]Attendance System Using Face Recognition and Class Monitoring System, Arun
Katara1, Mr. Sudesh2, V.Kolhe3[Link] Volume_
5_Issues/February_17_Volume_5_Issue_2/14895658 66_ [Link]

[4] G. Yang and T. S. Huang, “Human face detection in complex background,” Pattern
Recognition Letter, vol. 27, no.1, pp. 53-63, 1994.

[5] C. Kotropoulos and I. Pitas, “Rule-based face detection in frontal views,” Proc. Int’l
Conf. Acoustics, Speech and Signal Processing, vol. 4, pp. 2537-2540, 1997.

[6] Xinjun Ma, Hongqiao Zhang, XinZang, “A face detection algorithm based on
modified skin-color model”, CCC, vol. 1, pp. 3896-3900, IEEE, 2013

34
APPENDIX
############################################# IMPORTING
################################################
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox as mess
import [Link] as tsd
import cv2,os
import csv
import numpy as np
from PIL import Image
import pandas as pd
import datetime
import time
############################################# FUNCTIONS
################################################
def assure_path_exists(path):
dir = [Link](path)
if not [Link](dir):
[Link](dir)
########################################################################
##########
def tick():
time_string = [Link]('%H:%M:%S')

35
[Link](text=time_string)
[Link](200,tick)
########################################################################
###########
def contact():
mess._show(title='Contact us', message="Please contact us on :
'xxxxxxxxxxxxx@[Link]' ")
########################################################################
###########
def check_haarcascadefile():
exists = [Link]("haarcascade_frontalface_default.xml")
if exists:
pass
else:
mess._show(title='Some file missing', message='Please contact us for help')
[Link]()
########################################################################
###########
def save_pass():
assure_path_exists("TrainingImageLabel/")
exists1 = [Link]("TrainingImageLabel\[Link]")
if exists1:
tf = open("TrainingImageLabel\[Link]", "r")
key = [Link]()
else:
[Link]()
new_pas = [Link]('Old Password not found', 'Please enter a new password
below', show='*')
if new_pas == None:
mess._show(title='No Password Entered', message='Password not set!! Please try
again')

36
else:
tf = open("TrainingImageLabel\[Link]", "w")
[Link](new_pas)
mess._show(title='Password Registered', message='New password was registered
successfully!!')
return
op = ([Link]())
newp= ([Link]())
nnewp = ([Link]())
if (op == key):
if(newp == nnewp):
txf = open("TrainingImageLabel\[Link]", "w")
[Link](newp)
else:
mess._show(title='Error', message='Confirm new password again!!!')
return
else:
mess._show(title='Wrong Password', message='Please enter correct old password.')
return
mess._show(title='Password Changed', message='Password changed successfully!!')
[Link]()

########################################################################
###########

def change_pass():
global master
master = [Link]()
[Link]("400x160")
[Link](False,False)

37
[Link]("Change Password")
[Link](background="white")
lbl4 = [Link](master,text=' Enter Old Password',bg='white',font=('times', 12, ' bold
'))
[Link](x=10,y=10)
global old
old=[Link](master,width=25 ,fg="black",relief='solid',font=('times', 12, ' bold
'),show='*')
[Link](x=180,y=10)
lbl5 = [Link](master, text=' Enter New Password', bg='white', font=('times', 12, '
bold '))
[Link](x=10, y=45)
global new
new = [Link](master, width=25, fg="black",relief='solid', font=('times', 12, ' bold
'),show='*')
[Link](x=180, y=45)
lbl6 = [Link](master, text='Confirm New Password', bg='white', font=('times', 12, '
bold '))
[Link](x=10, y=80)
global nnew
nnew = [Link](master, width=25, fg="black", relief='solid',font=('times', 12, ' bold
'),show='*')
[Link](x=180, y=80)
cancel=[Link](master,text="Cancel",
command=[Link] ,fg="black" ,bg="red" ,height=1,width=25 , activebackground
= "white" ,font=('times', 10, ' bold '))
[Link](x=200, y=120)
save1 = [Link](master, text="Save", command=save_pass, fg="black",
bg="#3ece48", height = 1,width=25, activebackground="white", font=('times', 10, ' bold
'))
[Link](x=10, y=120)
[Link]()

38
########################################################################
#############

def psw():
assure_path_exists("TrainingImageLabel/")
exists1 = [Link]("TrainingImageLabel\[Link]")
if exists1:
tf = open("TrainingImageLabel\[Link]", "r")
key = [Link]()
else:
new_pas = [Link]('Old Password not found', 'Please enter a new password
below', show='*')
if new_pas == None:
mess._show(title='No Password Entered', message='Password not set!! Please try
again')
else:
tf = open("TrainingImageLabel\[Link]", "w")
[Link](new_pas)
mess._show(title='Password Registered', message='New password was registered
successfully!!')
return
password = [Link]('Password', 'Enter Password', show='*')
if (password == key):
TrainImages()
elif (password == None):
pass
else:
mess._show(title='Wrong Password', message='You have entered wrong password')

39
########################################################################
##############

def clear():
[Link](0, 'end')
res = "1)Take Images >>> 2)Save Profile"
[Link](text=res)

def clear2():
[Link](0, 'end')
res = "1)Take Images >>> 2)Save Profile"
[Link](text=res)

########################################################################
###############

def TakeImages():
check_haarcascadefile()
columns = ['SERIAL NO.', '', 'ID', '', 'NAME']
assure_path_exists("StudentDetails/")
assure_path_exists("TrainingImage/")
serial = 0
exists = [Link]("StudentDetails\[Link]")
if exists:
with open("StudentDetails\[Link]", 'r') as csvFile1:
reader1 = [Link](csvFile1)
for l in reader1:
serial = serial + 1
serial = (serial // 2)

40
[Link]()
else:
with open("StudentDetails\[Link]", 'a+') as csvFile1:
writer = [Link](csvFile1)
[Link](columns)
serial = 1
[Link]()
Id = ([Link]())
name = ([Link]())
if (([Link]()) or (' ' in name)):
cam = [Link](0)
harcascadePath = "haarcascade_frontalface_default.xml"
detector = [Link](harcascadePath)
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
sampleNum = sampleNum + 1
# saving the captured face in the dataset folder TrainingImage
[Link]("TrainingImage\ " + name + "." + str(serial) + "." + Id + '.' +
str(sampleNum) + ".jpg",
gray[y:y + h, x:x + w])
# display the frame
[Link]('Taking Images', img)
# wait for 100 miliseconds
if [Link](100) & 0xFF == ord('q'):

41
break
# break if the sample number is morethan 100
elif sampleNum > 100:
break
[Link]()
[Link]()
res = "Images Taken for ID : " + Id
row = [serial, '', Id, '', name]
with open('StudentDetails\[Link]', 'a+') as csvFile:
writer = [Link](csvFile)
[Link](row)
[Link]()
[Link](text=res)
else:
if ([Link]() == False):
res = "Enter Correct name"
[Link](text=res)

########################################################################
################

def TrainImages():
check_haarcascadefile()
assure_path_exists("TrainingImageLabel/")
recognizer = cv2.face_LBPHFaceRecognizer.create()
harcascadePath = "haarcascade_frontalface_default.xml"
detector = [Link](harcascadePath)
faces, ID = getImagesAndLabels("TrainingImage")
try:
[Link](faces, [Link](ID))

42
except:
mess._show(title='No Registrations', message='Please Register someone first!!!')
return
[Link]("TrainingImageLabel\[Link]")
res = "Profile Saved Successfully"
[Link](text=res)
[Link](text='Total Registrations till now : ' + str(ID[0]))

########################################################################
####################3

def getImagesAndLabels(path):
# get the path of all the files in the folder
imagePaths = [[Link](path, f) for f in [Link](path)]
# create empth face list
faces = []
# 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
[Link](imageNp)
[Link](ID)
return faces, Ids

43
########################################################################
###################

def TrackImages():
check_haarcascadefile()
assure_path_exists("Attendance/")
assure_path_exists("StudentDetails/")
for k in tv.get_children():
[Link](k)
msg = ''
i=0
j=0
recognizer = [Link].LBPHFaceRecognizer_create() #
[Link]()
exists3 = [Link]("TrainingImageLabel\[Link]")
if exists3:
[Link]("TrainingImageLabel\[Link]")
else:
mess._show(title='Data Missing', message='Please click on Save Profile to reset
data!!')
return
harcascadePath = "haarcascade_frontalface_default.xml"
faceCascade = [Link](harcascadePath);

cam = [Link](0)
font = cv2.FONT_HERSHEY_SIMPLEX
col_names = ['Id', '', 'Name', '', 'Date', '', 'Time']
exists1 = [Link]("StudentDetails\[Link]")
if exists1:

44
df = pd.read_csv("StudentDetails\[Link]")
else:
mess._show(title='Details Missing', message='Students details are missing, please
check!')
[Link]()
[Link]()
[Link]()
while True:
ret, im = [Link]()
gray = [Link](im, cv2.COLOR_BGR2GRAY)
faces = [Link](gray, 1.2, 5)
for (x, y, w, h) in faces:
[Link](im, (x, y), (x + w, y + h), (225, 0, 0), 2)
serial, conf = [Link](gray[y:y + h, x:x + w])
if (conf < 50):
ts = [Link]()
date = [Link](ts).strftime('%d-%m-%Y')
timeStamp = [Link](ts).strftime('%H:%M:%S')
aa = [Link][df['SERIAL NO.'] == serial]['NAME'].values
ID = [Link][df['SERIAL NO.'] == serial]['ID'].values
ID = str(ID)
ID = ID[1:-1]
bb = str(aa)
bb = bb[2:-2]
attendance = [str(ID), '', bb, '', str(date), '', str(timeStamp)]

else:
Id = 'Unknown'
bb = str(Id)
[Link](im, str(bb), (x, y + h), font, 1, (255, 255, 255), 2)

45
[Link]('Taking Attendance', im)
if ([Link](1) == ord('q')):
break
ts = [Link]()
date = [Link](ts).strftime('%d-%m-%Y')
exists = [Link]("Attendance\Attendance_" + date + ".csv")
if exists:
with open("Attendance\Attendance_" + date + ".csv", 'a+') as csvFile1:
writer = [Link](csvFile1)
[Link](attendance)
[Link]()
else:
with open("Attendance\Attendance_" + date + ".csv", 'a+') as csvFile1:
writer = [Link](csvFile1)
[Link](col_names)
[Link](attendance)
[Link]()
with open("Attendance\Attendance_" + date + ".csv", 'r') as csvFile1:
reader1 = [Link](csvFile1)
for lines in reader1:
i=i+1
if (i > 1):
if (i % 2 != 0):
iidd = str(lines[0]) + ' '
[Link]('', 0, text=iidd, values=(str(lines[2]), str(lines[4]), str(lines[6])))
[Link]()
[Link]()
[Link]()

46
######################################## USED STUFFS
############################################

global key
key = ''

ts = [Link]()
date = [Link](ts).strftime('%d-%m-%Y')
day,month,year=[Link]("-")

mont={'01':'January',
'02':'February',
'03':'March',
'04':'April',
'05':'May',
'06':'June',
'07':'July',
'08':'August',
'09':'September',
'10':'October',
'11':'November',
'12':'December'
}

######################################## GUI FRONT-END


###########################################

window = [Link]()
[Link]("1280x720")
[Link](True,False)

47
[Link]("Attendance System")
[Link](background='#262523')

frame1 = [Link](window, bg="#00aeff")


[Link](relx=0.11, rely=0.17, relwidth=0.39, relheight=0.80)

frame2 = [Link](window, bg="#00aeff")


[Link](relx=0.51, rely=0.17, relwidth=0.38, relheight=0.80)

message3 = [Link](window, text="Smart Attendance Tracking System using Face


Detection" ,fg="white",bg="#262523" ,width=55 ,height=1,font=('times', 29, ' bold '))
[Link](x=10, y=10)

frame3 = [Link](window, bg="#c4c6ce")


[Link](relx=0.52, rely=0.09, relwidth=0.09, relheight=0.07)

frame4 = [Link](window, bg="#c4c6ce")


[Link](relx=0.36, rely=0.09, relwidth=0.16, relheight=0.07)

datef = [Link](frame4, text = day+"-"+mont[month]+"-"+year+" | ",


fg="orange",bg="#262523" ,width=55 ,height=1,font=('times', 22, ' bold '))
[Link](fill='both',expand=1)

clock = [Link](frame3,fg="orange",bg="#262523" ,width=55 ,height=1,font=('times',


22, ' bold '))
[Link](fill='both',expand=1)
tick()

head2 = [Link](frame2, text=" For New Registrations ",


fg="black",bg="#3ece48" ,font=('times', 17, ' bold ') )
[Link](row=0,column=0)

48
head1 = [Link](frame1, text=" For Already Registered ",
fg="black",bg="#3ece48" ,font=('times', 17, ' bold ') )
[Link](x=0,y=0)

lbl = [Link](frame2, text="Enter


ID",width=20 ,height=1 ,fg="black" ,bg="#00aeff" ,font=('times', 17, ' bold ') )
[Link](x=80, y=55)

txt = [Link](frame2,width=32 ,fg="black",font=('times', 15, ' bold '))


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

lbl2 = [Link](frame2, text="Enter


Name",width=20 ,fg="black" ,bg="#00aeff" ,font=('times', 17, ' bold '))
[Link](x=80, y=140)

txt2 = [Link](frame2,width=32 ,fg="black",font=('times', 15, ' bold ') )


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

message1 = [Link](frame2, text="1)Take Images >>> 2)Save


Profile" ,bg="#00aeff" ,fg="black" ,width=39 ,height=1, activebackground =
"yellow" ,font=('times', 15, ' bold '))
[Link](x=7, y=230)

message = [Link](frame2, text="" ,bg="#00aeff" ,fg="black" ,width=39,height=1,


activebackground = "yellow" ,font=('times', 16, ' bold '))
[Link](x=7, y=450)

lbl3 = [Link](frame1,
text="Attendance",width=20 ,fg="black" ,bg="#00aeff" ,height=1 ,font=('times', 17, '
bold '))
[Link](x=100, y=115)

49
res=0
exists = [Link]("StudentDetails\[Link]")
if exists:
with open("StudentDetails\[Link]", 'r') as csvFile1:
reader1 = [Link](csvFile1)
for l in reader1:
res = res + 1
res = (res // 2) - 1
[Link]()
else:
res = 0
[Link](text='Total Registrations till now : '+str(res))

##################### MENUBAR #################################

menubar = [Link](window,relief='ridge')
filemenu = [Link](menubar,tearoff=0)
filemenu.add_command(label='Change Password', command = change_pass)
filemenu.add_command(label='Contact Us', command = contact)
filemenu.add_command(label='Exit',command = [Link])
menubar.add_cascade(label='Help',font=('times', 29, ' bold '),menu=filemenu)

################## TREEVIEW ATTENDANCE TABLE ####################

tv= [Link](frame1,height =13,columns = ('name','date','time'))


[Link]('#0',width=82)
[Link]('name',width=130)
[Link]('date',width=133)
[Link]('time',width=133)
50
[Link](row=2,column=0,padx=(0,0),pady=(150,0),columnspan=4)
[Link]('#0',text ='ID')
[Link]('name',text ='NAME')
[Link]('date',text ='DATE')
[Link]('time',text ='TIME')

###################### SCROLLBAR ################################

scroll=[Link](frame1,orient='vertical',command=[Link])
[Link](row=2,column=4,padx=(0,100),pady=(150,0),sticky='ns')
[Link](yscrollcommand=[Link])

###################### BUTTONS ##################################

clearButton = [Link](frame2, text="Clear",


command=clear ,fg="black" ,bg="#ea2a2a" ,width=11 ,activebackground =
"white" ,font=('times', 11, ' bold '))
[Link](x=335, y=86)
clearButton2 = [Link](frame2, text="Clear",
command=clear2 ,fg="black" ,bg="#ea2a2a" ,width=11 , activebackground =
"white" ,font=('times', 11, ' bold '))
[Link](x=335, y=172)
takeImg = [Link](frame2, text="Take Images",
command=TakeImages ,fg="white" ,bg="blue" ,width=34 ,height=1, activebackground
= "white" ,font=('times', 15, ' bold '))
[Link](x=30, y=300)
trainImg = [Link](frame2, text="Save Profile",
command=psw ,fg="white" ,bg="blue" ,width=34 ,height=1, activebackground =
"white" ,font=('times', 15, ' bold '))
[Link](x=30, y=380)

51
trackImg = [Link](frame1, text="Take Attendance",
command=TrackImages ,fg="black" ,bg="yellow" ,width=35 ,height=1,
activebackground = "white" ,font=('times', 15, ' bold '))
[Link](x=30,y=50)
quitWindow = [Link](frame1, text="Quit",
command=[Link] ,fg="black" ,bg="red" ,width=35 ,height=1,
activebackground = "white" ,font=('times', 15, ' bold '))
[Link](x=30, y=450)

##################### END ######################################


[Link](menu=menubar)
[Link]()

########################################################################
############################

52

You might also like