0% found this document useful (0 votes)
75 views6 pages

Automated Attendance Using Open CV

This document summarizes a research paper on a smart attendance system using OpenCV based on facial recognition. The system uses facial recognition technology to automate the attendance marking process for students or employees. It captures images of faces using a webcam, detects faces in the images, and compares them to a database of registered faces to identify the person and mark their attendance in a spreadsheet, which can then be converted to a PDF file. The system is trained using a database of images of authorized students or employees. Local Binary Patterns Histograms (LBPH) algorithm is used to extract features from the faces for recognition purposes. This automated attendance system aims to simplify and make the attendance marking process more efficient compared to traditional paper-based methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views6 pages

Automated Attendance Using Open CV

This document summarizes a research paper on a smart attendance system using OpenCV based on facial recognition. The system uses facial recognition technology to automate the attendance marking process for students or employees. It captures images of faces using a webcam, detects faces in the images, and compares them to a database of registered faces to identify the person and mark their attendance in a spreadsheet, which can then be converted to a PDF file. The system is trained using a database of images of authorized students or employees. Local Binary Patterns Histograms (LBPH) algorithm is used to extract features from the faces for recognition purposes. This automated attendance system aims to simplify and make the attendance marking process more efficient compared to traditional paper-based methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Published by : International Journal of Engineering Research & Technology (IJERT)

http://www.ijert.org ISSN: 2278-0181


Vol. 9 Issue 03, March-2020

Smart Attendance System using OPENCV based


on Facial Recognition
Sudhir Bussa Shruti Bharuka
Department of Electronics and Telecommunication, Department of Electronics and Telecommunication,
Bharati Vidyapeeth (Deemed to be) University, Bharati Vidyapeeth (Deemed to be) University,
College of Engineering, College of Engineering,
Dhankawadi, Pune, India. 411043. Dhankawadi, Pune, India. 411043.

Ananya Mani Sakshi Kaushik


Department of Electronics and Telecommunication, Department of Electronics and Telecommunication,
Bharati Vidyapeeth (Deemed to be) University, Bharati Vidyapeeth (Deemed to be) University,
College of Engineering, College of Engineering,
Dhankawadi, Pune, India. 411043. Dhankawadi, Pune, India. 411043.

Abstract - Face is the crucial part of the human body that educational institute or employees at an organization
uniquely identifies a person. Using the face characteristics as increases, the needs for lecturers or to the organization also
biometric, the face recognition system can be implemented. The increase the complication of attendance control. This project
most demanding task in any organization is attendance marking. may be helpful for the explanation of these types of problems.
In traditional attendance system, the students are called out by
the teachers and their presence or absence is marked
The number of students present in a lecture hall is observed,
accordingly. However, these traditional techniques are time each person is identified and then the information about the
consuming and tedious. In this project, the Open CV based face number of students who are present I maintained.
recognition approach has been proposed. This model integrates
a camera that captures an input image, an algorithm for II. OVERVIEW
detecting face from an input image, encoding and identifying Face recognition being a biometric technique implies
the face, marking the attendance in a spreadsheet and determination if the image of the face of any particular person
converting it into PDF file. The training database is created by matches any of the face images that are stored in a database.
training the system with the faces of the authorized students.
The cropped images are then stored as a database with
This difficulty is tough to resolve automatically because of the
respective labels. The features are extracted using LBPH changes that several factors, like facial expression, aging and
algorithm. even lighting can affect the image. Facial recognition among
Keywords - LBPH, OpenCV, camera, attendance, biometric, face the various biometric techniques may not be the most
recognition, spreadsheet authentic but it has various advantages over the others. Face
recognition is natural, feasible and does not require
I. INTRODUCTION assistance. The expected system engages the face recognition
Attendance maintenance is a significant function in all the approach for the automating the attendance procedure of
institutions to monitor the performance of the students. Every students or employees without their involvement. A web cam
institute does this in its own way. Some of these institutes use is used for capturing the images of students or employees.
the old paper or file based systems and some have adopted The faces in the captured images are detected and compared
strategies of automatic attendance using some biometric with the images in database and the attendance is marked.
techniques. A facial recognition system is a computerized
biometric software which is suited for determining or III. IMAGE PROCESSING
validating a person by performing comparison on patterns The facial recognition process can be split into two major
based on their facial appearances. Face recognition systems stages: processing which occurs before detection involving
have upgraded appreciably in their management over the face detection and alignment and later recognition is done
recent years and this technology is now vastly used for using feature extraction and matching steps.
various objectives like security and in commercial operations.
Face recognition is a powerful field of research which is a 1. FACE DETECTION
computer based digital technology. Face recognition for the The primary function of this step is to conclude whether the
intent of marking attendance is a resourceful application of human faces emerge in a given image, and what is the
attendance system. It is widely used in security systems and it location of these faces. The expected outputs of this step are
can be compared with other biometrics such as fingerprint or patches which contain each face in the input image. In order
eye iris recognition systems. As the number of students in to get a more robust and easily designable face recognition
an system.

IJERTV9IS030122 www.ijert.org 54
(This work is licensed under a Creative Commons Attribution 4.0 International
License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 03, March-2020

Face alignment is performed to rationalise the scales and iii. Grid X:


orientation of these patches. The number of cells along the horizontal direction is
represented as Grid X. With the increase in number of cells
2. FEATURE EXTRACTION the grid becomes finer which results in increase of
Following the face detection step the extraction of human face dimensional feature vector.
patches from images is done. After this step, the conversion iv. Grid Y:
of face patch is done into vector with fixed coordinates or a The number of cells along the vertical direction is
set of landmark points. represented as Grid Y. With the increase in number of cells
the grid becomes finer which results in increase of
3. FACE RECOGNITION dimensional feature vector.
The last step after the representation of faces is to identify
them. For automatic recognition we need to build a face B. ALGORITHM TRAINING:
database. Various images are taken foe each person and their For the training purpose of the dataset of the facial images of
features are extracted and stored in the database. Then when the people to be recognized along with the unique ID is
an input image is fed the face detection and feature extraction required so that the presented approach will utilize the
is performed and its feature to each face class is compared and provided information for perceiving an input image and
stored in the database. providing the output. Same images require same ID.
C. COMPUTATION OF THE ALGORITHM:
IV. ALGORITHM The intermediate image with improved facial characteristics
which corresponds to the original image is created in the first
There are various algorithms used for facial recognition. step. Based on the parameters provided, sliding window
Some of them are as follows: theory is used in order to achieve so.
1. Eigen faces Facial image is converted into gray scale. A 3x3 pixels
2. Fisher faces window is taken which can also be expressed as a 3x3 matrix
3. Local binary patterns histograms which contains the intensity of each pixel (0-255). After this
we consider the central value of the matrix which we take as
1. EIGEN FACES the threshold. This value defines the new values obtained
This method is a statistical plan. The characteristic which from the 8 neighbours. A new binary value is set for each
influences the images is derived by this algorithm. The neighbour of the central value. For the values equal to or
whole recognition method will depend on the training greater than the threshold value 1 will be the output
database that will be provided. The images from two otherwise 0 will be the output. Only binary values will be
different classes are not treated individually. present in the matrix and the concatenation is performed at
2. FISHER FACES each position to get new values at each position. Then the
Fisher faces algorithm also follows a progressive approach conversion of this binary value into a decimal value is done
just like the Eigen faces. This method is a alteration of Eigen which is made the central value of the matrix. It is a pixel of
faces so it uses the same principal Components Analysis. The the actual image. As the process is completed, we get a new
major conversion is that the fisher faces considers the image which serves as the better characteristics of the original
classes. As mentioned previously, the Eigen faces does not image.
differentiate between the two pictures from two differed D. EXTRACTION OF HISTOGRAM:
classes while training. The total average affects each picture. The image obtained in the previous step uses the Grid X and
A Fisher face employs Linear Discriminant Analysis for Grid Y parameters and the image is split into multiple grids.
distinguishing between pictures from a different class. Based on the image the histogram can be extracted as below:
1.The image is in gray scale and each histogram will consist
3. LOCAL BINARY PATTERNS HISTOGRAMS of only 256 positions (0-255) which symbolises the
This method needs the gray scale pictures for dealing with existences
the
training part. This algorithm in comparison to other of each pixel intensity.
algorithms is not a holistic approach. 2.After this each histogram is created and a new and bigger
A. PARAMETERS: histogram is done. Let us suppose that there are 8x8 grids,
LBPH uses the following parameters: then there will be 16.384 positions in total in the final
i. Radius: histogram. Ultimately the histogram signifies the features of
Generally 1 is set as a radius for the circular local binary the actual image.
pattern which denotes the radius around the central pixel. E. THE FACE RECOGNITION:
ii. Neighbours: The training of the algorithm is done. For finding the image
The number of sample points surrounding the central pixel which is same as the input image, the two histograms are
which is generally 8.The computational cost will increase compared and the image corresponding to the nearest
with increase in number of sample points. histogram is returned. Different approaches are used for the
calculation of distance between the two histograms. Here we
use the Euclidean distance based on the formula:
IJERTV9IS030122 www.ijert.org 55
(This work is licensed under a Creative Commons Attribution 4.0 International
License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 03, March-2020

𝑛
the recording of the frontal face. The number of frame to be
taken for consideration can be modified for accuracy levels.
𝐷=√∑ (ℎ𝑖𝑠𝑡1𝑖 − ℎ𝑖𝑠𝑡2𝑖)2 These images are then stored in the database along with the
𝑖=1 Registration ID.
TRAINING OF FACES:
Hence the result of this method is the ID of the image which The images are saved in gray scale after being recorded by a
has the nearest histogram. It should return the distance camera. The LBPH recognizer is employed to coach these
calculated in the form of ‘confidence’. Then the threshold and faces because the coaching sets the resolution and therefore
the ‘confidence’ can be used to automatically evaluate if the the recognized face resolutions are completely variant. A part
image is correctly recognized. If the confidence is less than of the image is taken as the centre and the neighbours are
the given threshold value, it implies that the image has been thresholded against it. If the intensity of the centre part is
well recognized by the algorithm. greater or equal than it neighbour then it is denoted as 1 and 0
if not. This will result in binary patterns generally known as
ACE FACE LBP codes.
Confidence factor It is 100-400.
based on output is FACE DETECTION:
2,000-3,000.
Threshold value is Threshold value Threshold value is The data of the trained faces is stored in .py format. The faces
4,000. is 400 7. are detected using the Haar cascade frontal face module.
Principle of dataset It is component It is pixel based. FACE RECOGNITION:
generation based. The data of the trained faces are stored and the detected faces
is component
based. are compared to the IDs of the students and recognized. The
Basic principle is Basic principle is Basic principle is recording of faces is done in real time to guarantee the
PCA. LDA. Histogram. accuracy of the system. This system is precisely dependant on
Background noise is Background noise Background noise the camera’s condition.
maximum. is medium. is minimum.
Efficiency Efficiency is Efficiency is
is minimum. greater maximum. VI. FLOW CHART
Eigen face.
Table 1. Comparison of LBPH withthan other algorithms.

ADVANTAGES OF USING LBPH ALGORITHM:


1. It is one of the simplest algorithms for face recognition.
2.The local features of the images can be characterized by this
algorithm.
3. Using this algorithm, considerable results can be obtained.
4. Open CV library is used to implement LBPH algorithm.

V. BLOCK DIAGRAM

Fig 2. Flow-chart of the methodology used for Training Process

The training process starts with traversing of the training data


directory. Each image in the training date is converted into
gray scale. A part of the image is taken as center and
threshold its neighbours against it. If the intensity of the
middle part is more or equal than its neighbour then denote it
with 1 and 0 if not. After this the images are resized. Then the
Fig 1. Block Diagram
images are converted into a numpy array which is the central
data structure of the numpy library. Each face in the image is
DATABASE CREATION: detected. Creation of separate lists of each face is done and
The first step in the Attendance System is the creation of a the faces are appended into them along with their respective
database of faces that will be used. Different individuals are IDs. The faces are then trained with their respective IDs.
considered and a camera is used for the detection of faces and

IJERTV9IS030122 www.ijert.org 56
(This work is licensed under a Creative Commons Attribution 4.0 International
License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 03, March-2020

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 Python’s 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,
Fig 3. Flow-chart of the methodology used for Face Detection replacing within editor windows and searching through
and Recognition
multiple files is possible. It also has configuration, browsers
and other dialogs as well.
The input image is read by the camera of the phone. After the
4. Microsoft Excel
image is read it is converted into gray scale. The faces in the
Microsoft Excel is a spreadsheet program incorporated in
image are detected using the Haar Cascade frontal face
Microsoft Office suite of applications. Spreadsheets prompt
module. Using the LBPH algorithm, the faces in the image
tables of values arranged in rows and columns that can be
are predicted. After the images are predicted, the recognized
mathematically manipulated using both basic and complex
faces are shown in a green box along with their names.
arithmetic functions and operations. Apart from its standard
spreadsheet features, Excel also extends programming support
VII. SOFTWARE DESCRIPTION via Microsoft’s Visual Basic for Applications (VBA), the
1. OpenCV capacity to access data from external sources via Microsoft’s
Open CV (Open Source Computer Vision Library) is a open
Dynamic Data Exchange (DDE) and extensive graphing and
source computer vision software library for the purpose of charting abilities. Excel being electronic spreadsheet program
machine learning. Open CV was developed to serve the can be used to store, organize and manipulate the data.
purpose of computer vision applications and to stimulate the
Electronic spreadsheet programs were formerly based on
usage of machine perception in the commercially viable paper spreadsheets used for accounting purpose. The basic
products. Open CV is a BSD- licensed product which is easy layout of computerized spreadsheets is more or less same as
for the utilization and modification of the code. The library
the paper ones. Related data can be stored in tables - which
contains more than 2500 advanced algorithms including an are a group of small rectangular boxes or cells that are
extensive set of both typical and state-of-the-art computer standardized into rows and columns.
vision and machine learning algorithms. These algorithms can
be employed for the detection and recognition of faces, VIII. RESULT ANALYSIS
identification of objects, extraction of 3 D models of objects, The interface for the Smart Attendance System has been
production of 3 D point clouds from stereo cameras, stitching created. Using the interface the images of the individual
images together for production of a high resolution image of students is being recorded and stored in the training dataset.
an entire scene, finding similar images from an image Simultaneously their information is stored in the database i.e.
database, removing red eyes from images taken using flash, excel sheet. Finally the images of the students is being tracked
following eye movements, recognition of scenery and and recognized.
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

IJERTV9IS030122 www.ijert.org 57
(This work is licensed under a Creative Commons Attribution 4.0 International
License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 03, March-2020

Fig 4. The different folders have been created .


Fig 8. The names of the students have been stored in the
StudentDetails excel sheet.

Fig 5. The interface for the Face Recognition Based Attendance System in
which the Id and Name of the respective students are stored.
Fig 9. The images of the students is trained.

Fig 6. The images are stored in a folder named “TrainingImages”.


Fig 10. After tracking the images are attendance of the students is marked.

Fig 7. The excel sheet for the student details is created.


Fig 11. The excel sheet for attendance of the students is created.

IJERTV9IS030122 www.ijert.org 58
(This work is licensed under a Creative Commons Attribution 4.0 International
License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 03, March-2020

X. REFERENCES
1 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 1 [email protected] , 2 [email protected]
2 ATTENDANCE SYSTEM USING MULTI-FACE RECOGNITION
1P. Visalakshi, 2Sushant Ashish 1Assistant Professor 1,2Department
of Computer Science and Engineering SRM Institute of Science and
Technology, Chennai, Tamil Nadu, INDIA
3 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.
Fig 12. The students attendance record is stored in the excel
4 Automatic Attendance System Using Face Recognition. Ashish
sheet.
Choudhary1,Abhishek Tripathi2,Abhishek Bajaj3,Mudit Rathi4 and
IX. CONCLUSION B.M Nandini5 1,2,3,4,5 Information Science and Engineering, The
This paper features the most productive Open CV face National Institue of Engineering,
recognition method accessible for Attendance Management. 5 Face Recognition based Attendance Management System using
Machine Learning Anushka Waingankar1, Akash Upadhyay2, Ruchi
The system has been implemented using the LBPH algorithm. Shah3, Nevil Pooniwala4, Prashant Kasambe5
LBPH excels other algorithms by confidence factor of 2-5 6 https://www.superdatascience.com/blogs/opencv-face-recognition
and has least noise interference. The implementation of the 7 https://towardsdatascience.com/face-recognition-how-lbph-works-
Smart Attendance System portrays the existence of an
90ec258c3d6b
agreement between the appropriate recognition rate and the 8 https://www.pyimagesearch.com/2018/09/24/opencv-face-
threshold value. Therefore LBPH is the most authentic and
competent face recognition algorithm found in Open CV for recognition/
[10] https://iopscience.iop.org/article/10.1088/1757-
9 http://nxglabs.in/cloud/impact-biometric-attendance-system-
the identification of the students in an educational institute 899X/263/4/042095/pdf
and marking their attendance adequately by averting proxies. 11 http://www.ijsrp.org/research-paper-0218/ijsrp-p7433.pdf
educational-institutes.html
12 https://
www.theseus.fi/bitstream/handle/10024/132808/Delbiaggio_
Nicolas.pdf?sequence=1&isAllowed=y

IJERTV9IS030122 www.ijert.org 59
(This work is licensed under a Creative Commons Attribution 4.0 International
License.)

You might also like