Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

SMART ATTENDANCE SYSTEM

Submitted in partial fulfilment of the requirements


of the degree of
BACHELOR OF ENGINEERING
IN
INFORMATION TECHNOLOGY
By
Group 41
Vedant Vinod Jain -118
Pranav Srivastava - 73
Aniket Surve - 129

Supervisor:
Prof. Sanober Sultana Shaikh
(Assistant Professor, Department of Information Technology, TSEC)

Department of Information Technology


Thadomal Shahani Engineering College
Adv. Nari GurSahani Marg, TPS III, Off Linking Road,
Bandra(West), Mumbai
University of Mumbai
(AY 2020-21)
CERTIFICATE

This is to certify that the Mini Project entitled ‘Smart Attendance System’ is a bonafide work of
Vedant Jain (118), Pranav Srivastava (73) and Aniket Surve (129) (submitted to the University
of Mumbai in partial fulfilment of the requirement for the award of the degree of “BACHELOR
of ENGINEERING” in “INFORMATION TECHNOLOGY”.

Prof. Sanober Sultana Shaikh


Supervisor

Dr. Madhuri Rao Dr. G.T. Thampi

Head of Department Principal


Mini Project Approval

This Mini Project entitled ‘Smart Attendance System’ by Vedant Vinod Jain (Roll No-118),

Pranav Srivastava (Roll No-73) and Aniket Surve (Roll No-129) is approved for the degree of

‘BACHELOR of ENGINEERING’ in ‘INFORMATION TECHNOLOGY’.

Examiners

1………………………………………
(Internal Examiner Name & Sign)

2…………………………………………
(External Examiner name & Sign)

Date:

Place:
TABLE OF CONTENTS

1 Introduction 1
1.1 Introduction 1
1.2 Motivation 1
1.3 Problem Statement & Objectives 2
1.4 Organization of the Report 3

2 Literature Survey 4

2.1 Survey of Existing System 4


2.2 Limitation Existing system or research gap 7
2.3 Mini Project Contribution 8

3 Proposed System 9

3.1 Introduction 9
3.2 Architecture/ Framework 10
3.3 Algorithm and Process Design 11
3.4 Experiment and Results 14
3.5 Details of Hardware and Software 24
3.6 Conclusion and Future work. 25

References
ABSTRACT
The main purpose of this project is to build a face recognition-based attendance monitoring system for educational
institution to enhance and upgrade the current attendance system into more efficient and effective as compared to
before. The current old system has a lot of ambiguity that caused inaccurate and inefficient of attendance taking.
Many problems arise when the authority is unable to enforce the regulation that exist in the old system. Thus, by
means of technology, this project will resolve the flaws existed in the current system while bringing attendance taking
to a whole new level by automating most of the tasks.

The technology working behind will be the face recognition system. The human face is one of the natural traits that
can uniquely identify an individual. Therefore, it is used to trace identity as the possibilities for a face to deviate or
being duplicated is low. In this project, face databases will be created to pump data into the recognizer algorithm.
Then, during the attendance taking session, faces will be compared against the database to seek for identity. When an
individual is identified, its attendance will be taken down automatically saving necessary information into a database
system.

In short, this upgraded version of attendance monitoring system not only saved many resources, but also provide huge
convenience to the authority as many processes are automated.
ACKNOWLEGMENT

We would like to take this opportunity to express our sincere gratitude to all those who helped us in various
capacities in undertaking this project and devising the report.
We are privileged to express our sense of gratitude to our respected teacher Prof. Sanober Shaikh, whose
unparalleled knowledge, moral fiber and judgment along with his know-how, was an immense support in
completing the project.
We are also grateful to Dr. Madhuri Rao, Head of Department of Information Technology, for the brainwave
and encouragement given.
We take this opportunity also to thank my friends and contemporaries for their cooperation and compliance.

Vedant Vinod Jain- 118


Pranav Srivastava- 73
Aniket Surve - 129
List of Figures

Sr.No Figure Name of figure Pg No.


No.
1 Fig 3.2.1 Flowchart of proposed system algorithm 10
2 Fig 3.3.1 Haar Cascade classifier features 11
3 Fig 3.3.2 Cascade classifier in facial recognition 12
4 Fig 3.4.1 GUI of proposed system 14
5 Fig 3.4.2 Verification of new user- if user is already present in 14
database
6 Fig 3.4.3 Message box pops up displaying user’s face is already 15
registered in database
7 Fig 3.4.4 Verification of new user- if user is not present in database 15
8 Fig 3.4.5 Message box pops up displaying that user can continue with 16
registration, since user is not present in database
9 Fig 3.4.6 Snapshot of StudentDetails excel file showing details of a 16
registered user
10 Fig 3.4.7 Unique ID verification: If entered ID is already registered, it 16
shows a message box error
11 Fig 3.4.8 On clicking upon Take images button, it captures 5 images 17
of user
12 Fig 3.4.9 New User images are stored in the training images directory 17
of project
13 Fig 3.4.10 Clicking on save profile button 18
14 Fig 3.4.11 Password box pops up for admin verification in order to save 18
new user profile
15 Fig 3.4.12 If wrong admin password is entered, it throws a message box 19
showing invalid password
16 Fig 3.4.13 If correct admin password is entered, user profile is saved 19
successfully in database. Total number of user registrations
increments by one
17 Fig 3.4.14 New user details get stored on the student details csv file 20
18 Fig 3.4.15 User 1 gets recognised from database in webcam 20
19 Fig 3.4.16 If user’s face is present in database, face gets recognised and 21
displays his name in webcam video
20 Fig 3.4.17 Recognised user details is displayed in attendance table on 21
pressing webcam keyboard exit ‘q’
21 Fig 3.4.18 Webcam displays ‘Unknown’ over detected face when an 22
unregistered user shows up
22 Fig 3.4.19 Attendance record is stored in Attendance_(Current- 22
Date).csv file in database
23 Fig 3.4.20 Application Menu-Bar 23
24 Fig 3.4.21 On clicking on Change Password! sub menu button, change 23
password window pops up
25 Fig 3.4.22 On entering old and new password properly, password 23
change confirmation message pops up
1.INTRODUCTION

1.1 Introduction:
Attendance maintenance is a significant function in all the institutions to monitor the performance of the
students. Every institute does this in its own way. Some of these institutes use the old paper or file-based
systems and some have adopted strategies of automatic attendance using some biometric techniques. A
facial recognition system is a computerized biometric software which is suited for determining or
validating a person by performing comparison on patterns based on their facial appearances. Face\
recognition systems have upgraded appreciably in their management over the recent years and this
technology is now vastly used for various objectives like security and in commercial operations. Face
recognition is a powerful field of research which is a computer based digital technology. Face recognition
for the intent of marking attendance is a resourceful application of attendance system. It is widely used in
security systems and it can be compared with other biometrics such as fingerprint or eye iris recognition
systems. As the number of students in an educational institute or employees at an organization increases,
the needs for lecturers or to the organization also increase the complication of attendance control. This
project may be helpful for the explanation of these types of problems. The number of students present in a
lecture hall is observed, each person is identified and then the information about the number of students
who are present maintained.
Use of face recognition for the purpose of attendance marking is the smart way of attendance management
system. Face recognition is more accurate and faster technique among other techniques and reduces
chance of proxy attendance. Face recognition provide passive identification that is a person which is to be
identified does not to need to take any action for its identity.
Face recognition being a biometric technique implies determination if the image of the face of any
particular person matches any of the face images that are stored in a database. This difficulty is tough to
resolve automatically because of the changes that several factors, like facial expression, aging and even
lighting can affect the image. Facial recognition among the various biometric techniques may not be the
most authentic but it has various advantages over the others. Face recognition is natural, feasible and does
not require assistance. The expected system engages the face recognition approach for the automating the
attendance procedure of students or employees without their involvement. A web cam is used for
capturing the images of students or employees. The faces in the captured images are detected and
compared with the images in database and the attendance is marked.
Our system uses face recognition approach to reduce the flaws of existing system with the help of
machine learning, it requires a good quality camera to capture the images of students, the detection
process is done by histogram of oriented gradient. And recognizing perform through deep learning.

1.2 Motivation:
Many attendance management systems that exist nowadays lack efficiency and information sharing.
Therefore, in this project, those limitations will be overcome and also further improved. The key points
which motivate us to develop this project are as follows:
1
 Students will be more punctual on attending classes. This is due to the attendance of a particular
student can only be taken personally where any absentees will be noticed by the system. This can
not only train the student to be punctual as well as avoids any immoral ethics such as signing the
attendance for their friends.
 The institution can save a lot of resources as enforcement are now done by means of technology
rather than human supervision which will waste a lot of human resources for an insignificant
process.
 The smart device can operate at any location as long as there is Wi-Fi coverage which makes the
attendance system to be portable to be placed at any intended location. For an example, the device
can be placed at the entrance of the classroom to take the attendance.
 It saves a lot of cost in the sense that it had eliminated the paper work completely.
 The system is also time effective because all calculations are all automated.
In short, the project is developed to solve the existing issues in the old attendance system.

1.3 Problem Statement & Objectives:


According to the previous attendance management system, the accuracy of the data collected is the
biggest issue. This is because the attendance might not be recorded personally by the original person, in
another word, the attendance of a particular person can be taken by a third party without the realization of
the institution which violates the accuracy of the data. For example, student A is lazy to attend a particular
class, so student B helped him/her to sign for the attendance which in fact student A didn’t attend the
class, but the system overlooked this matter due to no enforcement practiced. Supposing the institution
establish an enforcement, it might need to waste a lot of human resource and time which in turn will not
be practical at all. Thus, all the recorded attendance in the previous system is not reliable for analysis
usage. The second problem of the previous system is where it is too time consuming. Assuming the time
taken for a student to sign his/her attendance on a 3-4 paged name list is approximately 1 minute. In 1
hour, only approximately 60 students can sign their attendance which is obviously inefficient and time
consuming. The third issue is with the accessibility of those information by the legitimate concerned
party. For an example, most of the parents are very concerned to track their child’s actual whereabouts to
ensure their kid really attend the classes in college/school. However, in the previous system, there are no
ways for the parents to access such information. Therefore, evolution is needed to be done to the previous
system to improve efficiency, data accuracy and provides accessibility to the information for those
legitimate party.
In order to solve the drawbacks of the previous system, the existing system will need to evolve. The
proposed system will reduce the paperwork where attendance will no longer involve any manual
recording. The new system will also reduce the total time needed to do attendance recording.

2
1.4 Organization of Report:

This report consists analysis and description of the project – Smart Attendance System. The table captioned
‘List of Figures’ enlists figures/pictures included within this report.
The report also consists of the abstract and acknowledgment concerned with this project. Further the report
consists of three main sections:
i. Introduction
ii. Literature Survey
iii. Proposed System.
Introduction section gives brief idea about the project. Introduction section consists motivation behind the
project. As well it includes the problem statement and objectives of the project.
Literature Survey consists of the survey of existing system, explaining a research paper entitled "Face
Recognition Based Attendance Marking System", by K.SenthamilSelvi, P.Chitrakala.
Limitations of this research study and research gap/scope is also included in this section.
The last section is Proposed System. This section consists of architecture /framework, which includes
flowchart explaining flow of the system.
Algorithm/Flow of project consists of flowchart of the complete project and details of various cases in
application handling.
Experiment/Results contains snapshots/screenshots of project GUI explaining its working and various
constraints included to perfectionize our approach
Details of hardware & software section states the requirements needed within the host system. Conclusion topic
contains our project’s scope and what we’ll be achieve as we get introduced to efficient software techniques.
The report is concluded with references used while making the project ‘Smart Attendance System’.

3
2.LITERATURE SURVEY

2.1 Survey of Existing System:


Traditionally attendance was taken manually which is very time consuming and often leads to human error.
Additionally, there are many uncertainties towards the sources of the attendance records which in fact, most of
the attendance records are not retrieved from the actual situation. The old method that uses paper sheets for
taking student’s attendance can no longer be used. Based on the research, there are many solutions that are
available to solve this issue.
According to research journal “Attendance System Using NFC Technology with Embedded Camera on Mobile
Device” (Bhise, Khichi, Korde,Lokare, 2015). The attendance system is improved by using Near Field
Communication (NFC) technology and mobile application. According to the research paper, each student is
given NFC tag that has a unique ID during their enrolment into the college. Attendance of each class will then
be taken by touching or moving these tags on the lecturer mobile phone. The embedded camera on the phone
will then capture the student’s face to send all the data to the college server to do validation and verification.
The advantages of this method where the NFC is simple to use, and the speed of connection establishment is
very high. It indeed speeds up the attendance taking process a lot. However, this system couldn’t automatically
spot the violation when the NFC tag is not personally tagged by the original owner. Apart from that, the
convenience of the system which uses the mobile phone as the NFC reader was actually an inconvenience to the
lecturer. Imagine if the lecturer had forgotten to bring their mobile phones to work, what would be the backup
procedure for the attendance to be recorded? Moreover, most of the lecturer will not likely to prefer their
personal smart phones to be used in this way due to privacy matter. Hence, unique information about the student
like biometrics or face recognition, which is genuine for a student should be used in replacement of the NFC
tag. This will ensure attendance to be taken originally by the actual student.
The second research journals “Face Recognition Based Attendance Marking System” (Senthamil Selvi,
Chitrakala, Antony Jenitha, 2014) is based on the identification of facerecognition to solve the previous
attendance system’s issues. This system uses camera to capture the images of the employee to do face detection
and recognition. The captured image is compared one by one with the face database to search for the worker’s
face where attendance will be marked when a result is found in the face database. The main advantage of this
system is where attendance is marked on the server which is highly secure where no one can mark the
attendance of other. Moreover, in this proposed system, the face detection algorithm is improved by using the
skin classification technique to increase the accuracy of the detection process. Although more efforts are
invested in the accuracy of the face detection algorithm, the system is yet not portable. This system requires a
standalone computer which will need a constant power supply that makes it not portable. This type of system is
only suitable for marking staff’s attendance as they only need to report their presence once a day, unlike
students which require to report their attendance at every class on a particular day, it will be inconvenient if the
attendance marking system is not portable. Thus, to solve this issue, the whole attendance management system
4
can be developed on an embedded design so that it can be work similarly with just batteries that makes it
portable.
The third research journal “Fingerprint Based Attendance System Using Microcontroller and LabView” (Kumar
Yadav, Singh, Pujari, Mishra, 2015) proposed a solution of using fingerprint to mark the attendance. This
system is using 2 microcontrollers to deal with the fingerprint recognition process. Firstly, the fingerprint
pattern will be obtained through a fingerprint sensor, then the information will be transmitted to microcontroller
1. Next microcontroller 1 will pass the information to microcontroller 2 to do the checking with the database
that resides in it. After finding a student’s match, the details are sent to the PC through serial communication to
be displayed. This design is good as it accelerates development while maintaining design flexibility and
simplifies testing. But again, this system is attached to a PC which make it not portable. Other than that, the
database information cannot be accessible easily. Meaning that, for the parents whom are interested in knowing
their child’s attendance cannot easily or conveniently access the information. Therefore, to provide accessibility
of the student’s information to the legitimate concerned party, the information can be uploaded to a web server
for easy access. While the authentication for the appropriate access can be enforced through a login screen.
According to the fourth research journal “RFID based Student Attendance System” (Hussain, Dugar, Deka,
Hannan, 2014), the proposed solution is almost similar to the first research journal where RFID technology is
used to improve the older attendance system. In this system, a tag and a reader again used as a method of
tracking the attendance of the students. The difference between the first journals with this is where attendance’s
information can be accessed through a web portal. It provides more convenient for information retrieval. Again,
this system is imperfect in the sense that, firstly, it is not portable, as the RFID reader can only work when it is
connected to a PC. Secondly, the RFID tag is not a genuine information that can uniquely identify a student,
thus, resulting in the inaccuracy of the collected attendance information.[1]
The paper Individual Stable Space: An Approach to Face Recognition Under Uncontrolled Conditions by Xin
Geng, says that most face recognition systems need the faces to be fed into it based on certain rules, like under a
controlled illumination, at a particular position, under a particular view angle, and without any obstacles. Such
systems are called face recognition under controlled conditions. These rules restrict the uses of face recognition
in many real time applications because they cannot satisfy these rules. Real time applications need techniques
which does not need any strict control over the human beings for recognizing the face. These types of systems
need face recognition under uncontrolled conditions. So, this paper proposes one such system but the system
needs an image as input and one person per image which is a drawback of the system and provides a hindrance
in using it in real time applications like attendance systems.
In the paper Anti-Cheating Presence System Based on 3WPCA-Dual Vision Face Recognition, Edy Winarno
proposed a system that can predict the cheating in facial recognition-based system like using the photograph of
an authorized person or image similar to the authorized person. They used dual vision camera also called as
stereo vision camera which produces one image from each of its two lenses. After getting the two images they
used half-join method to combine the half of left image and half of right image of a person into a single image
of the person that can then undergo extraction using 3WPCA method. The recognition of cheating using this
system is 98%.
In this paper the author designed and explained improvement of picture-based attendance system capture the
faces of many students and may be the next generation to all the bio-metric devices that are ruling now. Human
face, a differential thing and has a great degree of changing tendency, so it needs to be fast and accurate for
detecting student facial structures. Processing the system will involve registration of students by taking their
5
images and then taking them for setting Attendance. Continuous registration is required to achieve great and
sharp accuracy. In this system. This paper tells the system and lastly evidence will be given to support the
system. The project can be used in online examination for certification. Identification of the student taking the
test.

There are a number of systems for attendance purpose, like traditional methods of data, have drawbacks and
hard to use that list, a biometric presence. There is a lack of human error in the system like fingerprint scan is
not accepted because of wet conditions Fingers, dirty, very dry or peeled fingers. So, the author proposes
Authority to add mobile presence system and face with NFC Safety facility and possibility to store using
Raspberry Pi data in the cloud. The paper reviews relatable works. Attendance management system, NFC, face
authority area, Microcomputers and Cloud area. Then, it provides new Method and design system and planning.
Outcome of this is a system which reduces the usage of paper, ending time and energy wasted by attendance
Mobile Based Attendance System.[2]
Computers are intelligent to communicate with humans in various perspectives. It will be participation If it is
based then it is more acceptable for both humans and computers. On the validation process. The author is
concerned Integrating and developing a student recognition using survival- Ing algorithm. Then embedding is
used in classification of a person's face the system offers a variety of applications such as attendance – Systems,
security etc. After making a system, a resulting display, is shown in the paper.
In this paper Face Recognition based Attendance System using Machine Learning Algorithms by Radhika C.
Damale, the author says identification of a person by facial features Knows facial recognition. A face feature
can be used for various computer-based vision algorithms such as face recognition, emotion detection and
multiple camera surveillance applications. Face recognition system is attracting scholars towards it. In this,
different methods such as SVM, MLP and CNN are discussed. DNN is used to face detection. For SVM and
MLP approaches, the features like PCA and LDA extracted using extraction algorithms. In CNN approach,
images fed directly to CNN Module as a feature. The approach shows Good detection accuracy percentage for
CNN based approaches. SVM, MLP and CNN achieve test accuracy of 87%, 86.5% and 98% on self- generated
databases respectively.[3]

In the paper" Class Attendance framework the on- Face Recognition" composed by Priyanka Wagh. To
distinguish the understudies sitting on the last columns conveniently, the histogram leveling of picture should be
finished. The picture will be passed for individual's face discovery. The productivity of Ada-Boost calculation is
best of all these. In this way, this will paper utilizes this calculation for identifying countenances of understudies
by utilizing the haar highlight classifiers and course ideas of Ada-Boost calculation .Every understudy's face is
trimmed and the different highlights are removed from them like separation between eyes, nose, blueprint of
face, and so forth utilizing these countenances as Eigen includes, the understudy is perceived and by contrasting
them and the face database and their participation are stamped. A database of faces should be made with the end
goal of examination.
In the paper An Attendance Marking System based on Face Recognition" written by Khem Puthea, Rudy
Hartanto and Risanuri Hidayat, says that the proposed system uses a machine learning technique named as
principal component analysis or PCA for face recognition and other machine learning algorithms used in
computer vision. A technique called Haar classifier is used to train the system to detect a face. When the faces
are captured by a camera, they are first converted to grayscale and then to that image subtraction process is
applied. The image after this is stored on the server for further processing which is done later.
6
The author proposed a strategy where the framework was used as an online Web Server, so the participation
results can be open to a verified web customer. The facial acknowledgment is finished by actualizing Local
Binary Patterns (LBP) first handling venture is to identify and edit the locale of intrigue ROI which is the
human face, then apply the Haar Feature-based Cascade calculation After that, the picture highlights are
extricated utilizing LBPs, at that point LBPs calculation contrasts the separated highlights and the prepared
datasets. Later, by clicking c' as in catch on the console framework, the participation results are put away in
MySQL database, so it tends to be available to the web server.[4]

In conclusion, a better attendance monitoring system should be developed based on its portability, accessibility
and the accuracy of the collected attendance information.

2.2 Limitations in the Existing System:


All organizations use attendance management to record their employees initial and final work timings. Some
organizations also save comprehensive records of attendance issues such as who calls in sick and who arrives
late.
Manual time and attendance management systems totally rely on highly skilled persons but the problem being
that humans are not perfect. With manual systems, it is a great pressure on management to be correct in all
details of employees work at all times. It can be easy to accidentally switch details and end up with false entry
of data or in hand written briefings. This error might not end up only with false information but also create
problem in payroll system. Reporting and checking that data can be time taking and expensive. In addition to
tracking when employees work, organizations also need to keep tabs on when employees are not working.
It takes more physical and mental effort to keep track of paper documents, to find information and to keep
details correct. After these unintentional mistakes, corrections are needed. Often a manual transaction must be
completely recreated rather than just updated. With these manual or partly automated systems information often
has to be written down or entered more than once. 

Poor manual systems of time and attendance management can lead to many problems such as:

1. Inconsistency in data entry and generate errors


2. System is fully dependent on skilled individuals
3. Time consuming and costly to produce reports
4. Entry of false information
5. Lack of security
6. Duplication of data entry

There is a reason to be considered before you automate time and attendance management and these are those
good processes must already be in working condition. Putting a new automated system in most cases won’t
successfully implement where one hasn’t existed before. The most effective way to get a positive result from
new automated attendance management software is where a good manual time and attendance management
system already exists and new system automates these. It is also financially benefited to implement automated
time and attendance management software that is too simple, easy to use and understand and requires no
amount of external manual work.
where the NFC is simple to use, and the speed of connection establishment is very high. It indeed speeds up the
attendance taking process a lot. However, this system couldn’t automatically spot the violation when the NFC
tag is not personally tagged by the original owner. Apart from that, the convenience of the system which uses
the mobile phone as the NFC reader was actually an inconvenience to the lecturer. Imagine if the lecturer had
7
forgotten to bring their mobile phones to work, what would be the backup procedure for the attendance to be
recorded? Moreover, most of the lecturer will not likely to prefer their personal smart phones to be used in this
way due to privacy matter. Hence, unique information about the student like biometrics or face recognition,
which is genuine for a student should be used in replacement of the NFC tag. This will ensure attendance to be
taken originally by the actual student.[5]
Fingerprint Based Attendance System is good as it accelerates development while maintaining design flexibility
and simplifies testing. But again, this system is attached to a PC which make it not portable. Other than that, the
database information cannot be accessible easily. Meaning that, for the parents whom are interested in knowing
their child’s attendance cannot easily or conveniently access the information. Therefore, to provide accessibility
of the student’s information to the legitimate concerned party, the information can be uploaded to a web server
for easy access.
RFID based Student Attendance System is imperfect in the sense that, firstly, it is not portable, as the RFID
reader can only work when it is connected to a PC. Secondly, the RFID tag is not a genuine information that can
uniquely identify a student, thus, resulting in the inaccuracy of the collected attendance information.

Mini Project Contribution:


Many attendance management systems that exist nowadays are lack of efficiency and information sharing.
Therefore, in this project, those limitations will be overcome and also further improved.
The impact and the contribution of this project is as follow:
 Students will be more punctual on attending classes. This is due to the attendance of a particular student
can only be taken personally where any absentees will be noticed by the system. This can not only train
the student to be punctual as well as avoids any immoral ethics such as signing the attendance for their
friends.
 The institution can save a lot of resources as enforcement are now done by means of technology rather
than human supervision which will waste a lot of human resources for an insignificant process.
 The smart device can operate at any location as long as there is Wi-Fi coverage which makes the
attendance system to be portable to be placed at any intended location. For an example, the device can
be placed at the entrance of the classroom to take the attendance.
 It saves a lot of cost in the sense that it had eliminated the paper work completely.
 The system is also time effective because all calculations are all automated.
In short, the project is developed to solve the existing issues in the old attendance system.

8
3.PROPOSED SYSTEM
3.1 Introduction:
Human face plays an important role in our day-to-day life mostly for identification of a person. Most of us
remember attendance at schools as the tutor calling out our names/registered numbers and us yelling back
“PRESENT, MA’AM!”. All of that could soon change with the introduction of facial recognition in these
systems. As you may already know, facial recognition systems need a database or a pre-recorded data set to
compare captured images and identify faces. In the same way, these cameras could be used to identify students
and record their attendance in a class. With photos submitted to schools for various forms and documents, the
students’ faces could be added to data sets to record their attendance in the respective classes. Most offices and
government buildings use biometric systems for logging in work hours and restricting access to only those
people that are permitted. Although facial recognition is now being implemented in many countries for this
purpose, they still largely rely on fingerprint sensors because of the lower chance of duplication and fraud. The
downside to this is that recording a fingerprint is a task that requires relatively more effort. By far the most
interesting implementation of facial recognition in attendance systems is that of event attendance. The
deployment of this system poses many benefits, especially for large events. Currently most events such as large
corporate conferences and music concerts still largely rely on tickets, passes, and scanning of barcodes.
Introducing facial recognition would cut down these inefficiencies since most modern facial recognition
systems can perform the task in under two seconds. It is just a matter of collecting images of attendees at the
time of issuing event passes. Face-recognition is a part of biometric identification that extracts the facial
features of a face, and then stores it as a unique face print to uniquely recognize a person. Biometric face
recognition technology has gained the attention of many researchers because of its wide application. Face
recognition technology is better than other biometric based recognition techniques like finger-print, palm-print,
iris because of its non-contact process. Recognition techniques using face recognition can also recognize a
person from a distance, without any contact or interaction with person. The face recognition techniques are
currently implemented in social media websites like Facebook, at the airports, railway stations. The, at crime
investigations. Face recognition technique can also be used in crime reports, the captured photo can be stored in
a database, and can be used to identify a person. Facebook uses the facial recognition technique for automating
the process of tagging people. For face recognition we require large dataset and complex features to identify a
person in all conditions like change of illumination, age, pose, etc. Recent researches show there is a betterment
in facial recognition systems. In the last ten years there is huge development in recognition techniques.
9
But currently most of the facial recognition techniques is able to work fine only if the number of people in one
frame is very few and under controlled illumination, proper position of faces and clear images. For face
recognition purpose, there is a need for large data sets and complex features to uniquely identify the different
subjects by manipulating different obstacles like illumination, pose and aging. During the recent few years, a
good improvement has been made in facial recognition systems. In comparison to the last decade, one can
observe an enormous development in the world of face recognition. Currently, most of the facial recognition
systems perform well with limited faces in the frame. Moreover, these methodologies have been tested under
controlled lighting conditions, proper face poses and non- blurry images. The system that is proposed for face
recognition in this paper for attendance system is able to recognize multiple faces in a frame without any control
on illumination, position of face.

3.2 Architecture/Framework:

10
Fig 3.2.1: Flowchart presenting process flow of proposed system

3.3 Algorithm and Process Design:


We start with importing the necessary libraries. So, we have a directory consisting of a number of images, and I
want the program to iterate through all of them and detect faces in them, if available. Let’s see some of these
11
images first. The image sizes are really large, so before I start processing and viewing them, I should resize them
to a smaller size. Here I could have taken images of fixed sizes like 224x224, but then that would just distort the
original image size. So we’ll resize the image maintaining the original aspect ratio.  Now we bring in the Haar
models for the detection part. The Haar Cascade will be read through the OpenCV library from the GitHub
repository. Looking at the repository once, it has a number of models available. It includes models for face
detector, upper and lower body detector, eye detector, license place detectors etc. We, in this project, will use
the models for face and eye both.

Fig 3.3.1: Haarcascade classifier features

The models are simple XML files with all the data stored in them. OpenCV provides
a CascadeClassifier method which imports the model from its GitHub repository. Then we write a method
which will accept an image, and uses the model to detect the faces in the image. The method first converts the
image to GrayScale format, as ML models generally work on GrayScale data as they consist of a single layer.
Then we use the GrayScale data with the model imported. It produces a list of coordinates for all the faces found
in the photo. We iterate on each of the entries in the coordinate list, it contains the x and the y coordinates and the
width and the height. Then we create a rectangle with these values and fill in with a random color. We then
display the image with the face coordinates in the colored rectangles.
The face model detects the coordinates of a face. We take one coordinate at a time, and get the rectangular data
from the gray image. This serves as the input for the eye model, as the model will be detecting the eye
coordinates within a face. This also produces a list of coordinates for the eyes found. The coordinates again
contain the x and y coordinates, and the width and the height. For each of the entries in the list, we create the
center and the radius for a circle enclosing the eye.[8]

Cascade classifier, or namely cascade of boosted classifiers working with haar-like features, is a special case of
ensemble learning, called boosting. It typically relies on Adaboost classifiers (and other models such as Real
Adaboost, Gentle Adaboost or Logitboost). Cascade classifiers are trained on a few hundred sample images of
image that contain the object we want to detect, and other images that do not contain those images.
How can we detect if a face is there or not ? There is an algorithm, called Viola–Jones object detection
framework, that includes all the steps required for live face detection :
12
 Haar Feature Selection, features derived from Haar wavelets
 Create integral image
 Adaboost Training
 Cascading Classifiers
There are some common features that we find on most common human faces :
 a dark eye region compared to upper-cheeks
 a bright nose bridge region compared to the eyes
 some specific location of eyes, mouth, nose…
The characteristics are called Haar Features.

Fig 3.3.2: Cascade classifier in face recognition

Then, we apply this rectangle as a convolutional kernel, over our whole image. In order to be exhaustive, we
should apply all possible dimensions and positions of each kernel. A simple 24*24 images would typically result
in over 160’000 features, each made of a sum/subtraction of pixels values. It would computationally be
impossible for live face detection. Once the good region has been identified by a rectangle, it is useless to run the
window over a completely different region of the image. This can be achieved by Ada-boost. Compute the
rectangle features using the integral image principle, which is way faster. Now that the features have been
selected, we apply them on the set of training images using Adaboost classification, that combines a set of weak
classifiers to create an accurate ensemble model. With 200 features (instead of 160’000 initially), an accuracy of
95% is achieved. The authors of the paper have selected 6’000 features.
Computing the rectangle features in a convolutional kernel style can be long, very long. For this reason, the
authors, Viola and Jones, proposed an intermediate representation for the image : the integral image. The role of
the integral image is to allow any rectangular sum to be computed simply, using only four values. Suppose we
want to determine the rectangle features at a given pixel with coordinates (x,y). Then, the integral image of the
pixel in the sum of the pixels above and to the left of the given pixel.

where ii(x,y) is the integral image and i(x,y) is the original image.
Although the process described above is quite efficient, a major issue remains. In an image, most of the image is
13
a non-face region. Giving equal importance to each region of the image makes no sense, since we should mainly
focus on the regions that are most likely to contain a picture. Viola and Jones achieved an increased detection
rate while reducing computation time using Cascading Classifiers.
The next step simply is to locate the pre-trained weights. We will be using default pre-trained models to detect
face, eyes and mouth. Depending on your version of Python, the files should be located somewhere over here :
/usr/local/lib/python3.7/site-packages/cv2/data

FACE DETECTION:
The first step is to launch the camera, and capture the video. Then, we’ll transform the image to a gray scale
image. This is used to reduce the dimension of the input image. Indeed, instead of 3 points per pixel describing
Red, Green, Blue, we apply a simple linear transformation:
Ygray = 0.2126R +0.7152G + 0.0722B
Now, we’ll use the faceCascade variable define above, which contains a pre-trained algorithm, and
apply it to the gray scale image.

The second most popular implement for face detection is offered by Dlib and uses a concept called Histogram of
Oriented Gradients (HOG). The idea behind HOG is to extract features into a vector, and feed it into a
classification algorithm like a Support Vector Machine for example that will assess whether a face (or any object
you train it to recognize actually) is present in a region or not.

The features extracted are the distribution (histograms) of directions of gradients (oriented gradients) of the
image. Gradients are typically large around edges and corners and allow us to detect those regions.
First of all, the input images must but of the same size (crop and rescale images). The patches we’ll apply require
an aspect ratio of 1:2, so the dimensions of the input images might be 64x128 or 100x200 for example. The
gradient of an image typically removes non-essential information.

The image is then divided into 8x8 cells to offer a compact representation and make our HOG more robust to
noise. Then, we compute a HOG for each of those cells.

3.4 Experiments and Results:

14
Fig 3.4.1: GUI of proposed system
1) Registering new student:
 On clicking onto verify user, two outcomes are possible:

Fig 3.4.2: If a student has already registered his face in database, it shows registered on webcam

15
Fig 3.4.3: A message box pops up on pressing keyboard exit ‘q’ notifying that users’ face is
already present in database

Fig 3.4.4: If face of user is not present in database, then it shows please register command in webcam

16
Fig 3.4.5: A message box pops up after pressing webcam keyboard exit ‘q’ asking user to continue
registration

Fig 3.4.6: A user with ID= 118 has already been registered onto database

Fig 3.4.7: If new user tries to take images with same ID, it displays an error in message box

17
If above procedure ensures the new user’s face and ID is unique, then new user can register his images in
database:

Fig 3.4.8: On clicking on taking images, webcam software captures 5


images of new user

Fig 3.4.9: The captured images are stored in training base directory

18
Fig 3.4.10: After new user registers onto the database,
he proceeds to saving his profile by clicking on the save profile

Fig 3.4.11: Then the application asks for the admin password for admin verification

19
Fig 3.4.12: If wrong password is entered, it throws an error in message box

Fig 3.4.13: If correct password is entered, user registration is complete. It stores details to trainner.yml file
‘Profile saved successfully’ message label comes up and total number of registration increases by 1

20
Fig 3.4.14: New user details get registered in student details.csv file in database

2) Taking attendance:
 This part of project is where the proposed system revolves.
 Haarcascade software used in the project algorithm is quite glitch, so the user must be present in an
illuminated surroundings with proper lighting
 Since software converts images to grayscale, it must be illuminated properly

Fig 3.4.15: User 1 face recognized from database in webcam

21
Fig 3.4.16: On clicking on take attendance, if software recognizes face from database, it displays name
on webcam video

Fig 3.4.17: After quitting webcam video by pressing ‘q’, it displays the recognized user’s ID, name,
date and time of recognition on the table.

22
Fig 3.4.18: Webcam displays ‘Unknown’ over detected face when an unregistered user shows up while taking
attendance

Fig 3.4.19: Attendance details are recorded in Attendance_(Current-Date).csv file in directory

23
3) Changing admin password:

Fig 3.4.20: Application Menu bar

Fig 3.4.21: On clicking on the Change Password sub-menu button, a window pops up to change to a new
password

24
Fig 3.4.22: On clicking on save button from previous window,
‘Password changed successfully’ message box pops up

3.5 Details of Hardware and Software:


3.5.1 Software:
1. OpenCV:
Open CV (Open Source Computer Vision Library) is a open source computer vision software library for the
purpose of machine learning. Open CV was developed to serve the purpose of computer vision applications and
to stimulate the usage of machine perception in the commercially viable products. Open CV is a BSD- licensed
product which is easy for the utilization and modification of the code. The library contains more than 2500
advanced algorithms including an extensive set of both typical and state-of-the-art computer vision and machine
learning algorithms. These algorithms can be employed for the detection and recognition of faces, identification
of objects, extraction of 3 D models of objects, production of 3 D point clouds from stereo cameras, stitching
images together for production of a high resolution image of an entire scene, finding similar images from an
image database, removing red eyes from images taken using flash, following ye movements, recognition of
scenery and establishing markers to overlay it with intensified reality etc. It includes C++, Python, Java and
MATLAB interfaces and supports Windows, Linux, Android and Mac OS. Open CV mainly involves real-time
vision applications taking advantage of MMX and SSE instructions when available. A full-featured CUDA and
Open CL interfaces are being progressively developed. There are over 500 algorithms and about 10 times
functions that form or back those algorithms. Open CV is written inherently in C++ and has a template interface
that works harmoniously with STL containers.

2. Pandas:

Pandas is an open-source Python package that caters diverse tools for data analysis. The package contains
various data structures that can be used for many diverse data manipulation tasks. It also includes a range of
methods that can be invoked for data analysis, which becomes feasible when working on data science and
machine learning problems in Python.

3. Idle:

IDLE is Pythons Integrated Development and Learning Environment. IDLE is completely coded in Python,
using the tkinter GUI toolkit. It works mostly uniformly on Windows, Unix and macOS. It has a Python shell
window (interactive interpreter) with colorizing of error messages, code input and code output. There is a multi-
window text editor with multiple undo, Python colorizing, smart indent, call tips, auto completion, and other
features. Searching within any window, replacing within editor windows and searching through multiple files is
possible. It also has configuration, browsers and other dialogs as well.

5. Microsoft Excel: Microsoft Excel is a spreadsheet program incorporated in Microsoft Office suite of
applications. Spreadsheets prompt tables of values arranged in rows and columns that can be mathematically
manipulated using both basic and complex arithmetic functions and operations. Apart from its standard
spreadsheet features, Excel also extends programming support via Microsoft Visual Basic for Applications

25
(VBA), the capacity to access data from external sources via Microsoft Dynamic Data Exchange (DDE) and
extensive graphing and charting abilities. Excel being electronic spreadsheet program can be used to store,
organize and manipulate the data. Electronic spreadsheet programs were formerly based on paper spreadsheets
used for accounting purpose. The basic layout of computerized spreadsheets is more or less same as the paper
ones. Related data can be stored in tables – which are a group of small rectangular boxes or cells that are
standardized into rows and columns.

3.6. Conclusion and Future Work:

3.6.1 Conclusion:

Before the development of this project. There are many loopholes in the process of taking attendance using the
old method which caused many troubles to most of the institutions. Therefore, the facial recognition feature
embedded in the attendance monitoring system can not only ensure attendance to be taken accurately and also
eliminated the flaws in the previous system. By using technology to conquer the defects cannot merely save
resources but also reduces human intervention in the whole process by handling all the complicated task to the
machine. The only cost to this solution is to have sufficient space in to store all the faces into the database
storage. Fortunately, there is such existence of micro SD that can compensate with the volume of the data. In
this project, the face database is successfully built. Apart from that, the face recognizing system is also working
well.

This paper features the most productive Open CV face recognition method accessible for Attendance
Management. The system has been implemented using the LBPH algorithm. LBPH excels other algorithms by
confidence factor of 2-5 and has least noise interference. The implementation of the Smart Attendance System
portrays the existence of an agreement between the appropriate recognition rate and the threshold value.
Therefore LBPH is the most authentic and competent face recognition algorithm found in Open CV for the
identification of the students in an educational institute and marking their attendance adequately by averting
proxies.

At the end, the system not only resolve troubles that exist in the old model but also provide convenience to the
user to access the information collected by mailing the attendance sheet to the respected faculty.

3.6.2 Future Work:

Since the development time for this project is very limited, the designed system only consists of the minimum
function required for it to work. However, it can be further improved to maximize the usage and produce a
better system.

The followings are the further developments for the project to be improved.

▪ Provide a better domain name for the webpage.

▪ Improve the face recognition algorithm.

26
▪ Provide better search functions in the webpage.

▪ Improves the system so that it can eliminates the need of lecturer input before the recognition procedure can
start.

▪ Improves the database so that it can also stores the information of the subjects taken by each student to
facilitate the attendance marking procedure.

Also, almost all academic institutions require attendance record of students and maintaining attendance
manually can be hectic as well as time consuming task. Hence maintaining attendance automatically with the
help of face recognition will be very helpful and less prone to errors as compared to manual process. This will
also reduce manipulation of attendance record done by students and it will save time as well. The future scope
of the proposed work can be, capturing multiple detailed images of the students and using any cloud technology
to store these images. The system can be configured and used in Atm machines to detect frauds. Also, the
system can be used at the time of elections where the voter can be identified by recognizing the face.

27
References
[1] “Attendance System Using NFC Technology with Embedded Camera on Mobile Device” (Bhise,
Khichi, Korde,Lokare, 2015)

[2] K.SenthamilSelvi, P.Chitrakala, A.AntonyJenitha, "Face Recognition Based Attendance Marking


System", IJCSMC, Vol. 3, Issue. 2, February 2014.

[3] “Fingerprint Based Attendance System Using Microcontroller and LabView” (Kumar Yadav, Singh,
Pujari, Mishra, 2015)

[4] “RFID based Student Attendance System” (Hussain, Dugar, Deka, Hannan, 2014) [5].
OpenCvDocumentation -https://opencv.org

[5] Smart Attendance System using Computer Vision and Machine Learning Dipti Kumbhar#1 , Prof. Dr.
Y. S. Angal*2 # Department of Electronics and Telecommunication, BSIOTR, Wagholi, Pune,India.

[6] Face Recognition Based Student Attendance System with OpenCV CH. VINOD KUMAR1 , DR. K.
RAJA KUMAR2 1 PG Scholar, Dept of CS& SE, Andhra University, Vishakhapatnam, AP, India.
2Assistant Professor, Dept of CS& SE, Andhra University, Vishakhapatnam, AP, India.

[7] https://towardsdatascience.com/a-guide-to-face-detection-in-python-3eab0f6b9fc1

[8] https://towardsdatascience.com/face-detection-with-haar-cascade-part-ii-50120fd1700

28
29

You might also like