Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Automated Attendance System Using Computer Vision

2022 Second International Conference on Computer Science, Engineering and Applications (ICCSEA) | 978-1-6654-5834-4/22/$31.00 ©2022 IEEE | DOI: 10.1109/ICCSEA54677.2022.9936266

Harshit Kesharwani Tamoshree Mallick Ayushi Gupta Gaurav Raj


Scholar, CSE Department, Scholar, CSE Department, Scholar, CSE Department Associate Professor,
School of Engineering and School of Engineering and ABES Institute of Technology, CSE Department,
Technology Technology Ghaziabad, India School of Engineering and
Sharda University, Greater Noida Sharda University, Greater Noida ayushi2020cs140@abesit.edu.in Technology
harshitkesharwani18@gmail.com tamoshree.mallick.24@gmail.com Sharda University, Greater Noida
gaurav.raj@sharda.ac.in

Abstract— Automated attendance system using computer vision is


a model based on real-time facial recognition which works on deep A Face tracking component is used for the separation and
learning algorithms. This automated system efficiently manages tracking in a video stream
time with excellent accuracy. To reduce human effort, our model
will precisely recognise the image and according to the label
assigned to that particular image, the attendance will be marked
accordingly. The concerned faculty can also retrieve the database B. Face Alignment:
of present students on a particular day. This reduces the time Face alignment allows us to find the best localization and
required for managing the manual attendance and also eliminates normalization.
the chances of proxy attendance. Moreover, our model uses In which a bare estimation of the facial features happens in
OpenCV and Dlib as the major libraries and Principal component detection, and only the face outline happens such as outlines of
analysis (PCA) algorithm. Traditional facial recognition systems
the face shape, eyes nose ears, and mouth. After which the face
only recognise one face at a time, but this paper deals with the
automated attendance system which could detect multiple faces at
is normalized with respect to geometric transforms.
a time and mark their presence simultaneously. In our paper, we
have done multiple experiments with our model and the results are C. Feature Extraction:
excellent with accuracy ranging from 75 to 100 %.
After completion of face detection and face alignment steps,
Keywords—PCA, Dlib, Deep learning, computer vision feature extraction is the most important step and it gives
effective information that is useful to compare faces and find
I. INTRODUCTION their differences.

Biometric recognition is one of the most promising


authentication techniques. It has its application in multiple D. Face Matching:
domains. The fingerprint authentication technique is one of the As the features are extracted, the extracted features are then
most accurate biometric authentication techniques but it takes used to compare with the already stored database of the facial
time to process and could not process the authentication of features and are compared for finding out the matching faces,
multiple persons at a time using a single device. This could be which is done using the match score.
tackled using another biometric authentication technique i.e.,
Facial recognition The facial recognition system is an evolving
technology replacing the other biometrics and the manual The major contributions this paper presents in this field are:
attendance system effectively as it enables faster authentication I. It can recognize multiple faces at a time/
using a single device. II. It could recognize multiple faces and mark their
attendance at a time without any delay.
This automated system is a universal biometric solution as III. The accuracy of the tested result is far better than the
this does not require user intervention and each individual has a previously proposed system.
unique face which makes everyone unique from each other. The IV. The model training data required for using the model is
model can be used in mostly 3 basic domains: attendance and just a single labelled image per person.
employee management, visitors management, access control and
authorization systems. This model will mainly be focusing on
the automated attendance of the students to replace the hectic II. LITERATURE WORK
schedules of the manual attendance system. The system records By doing the literature survey on facial recognition, we found it
the presence of the enrolled students and makes a log file of all is a two-step process of face detection and its recognition. The
the enrolled students to a universal system time respectively. first and the most important part is encoding the image and
classifying it into the facial and non-facial regions.
A. Face detection:
There are many methods used for facial reorganization i.e.,
In face detection, the facial features are separated from the
holistic approach, feature-based approach and appearance-
background image.
based approach. The entire face is considered as input in a
holistic approach while in the case of a feature-based approach

978-1-6654-5834-4/22/$31.00 ©2022 IEEE

Authorized licensed use limited to: GLA University. Downloaded on January 08,2023 at 18:29:23 UTC from IEEE Xplore. Restrictions apply.
the characteristics such as the nose, and eyes are divided and are eigenvectors. These systems are accurate up to a certain extent
taken as input. but they are time-consuming and the facial recognition
proposed could detect one face at a time.
There are many facial recognition algorithms such as
Convolutional Neural Network (CNN), Eigenfaces, Fisher The proposed system deals with these disadvantages with
faces, Kernel Methods: PCA and SVM Three-Dimensional some major advantages.
Recognition, etc. There are many projects and research done in 1. It could detect multiple faces at a time and mark the
this field. In any organization, especially institutions, attendance simultaneously.
attendance is one of the most crucial papers. Some of the 2. It deals with multiple algorithms and included the Facial
previous proposed works are discussed below: recognition library python which is 99.38% accurate.[4]

Jadhav, Akshara et al. [1] proposed the work which depicts the
use of the classification learning algorithm SVM (Support III. PROPOSED WORK
Vector Machine) for the classification and distinction of The proposed model involves real-time face recognition and
features by the usage of PCA technique for the detection of the simultaneous entry into the database. The system is completely
facial lines and the students’ face. After that, Backpropagation developed using python as the programing language in which
Neural Network (BPNN) is utilized for the recognition of the we are importing Face recognition, NumPy, OS, Cv2 and
face. Yudhisthir Ware, Hemantkumar Rathod, Suresh Raulo, DateTime library.
Vishal Pakhare, Snehal Sane and Imdad A. Rizvi et al. [2] made
an attendance management system that calculates each student's
A. Technologies invloves
attendance by continuously clicking photos for a period of time
and selecting the best-localised image for processing. The The face Recognition library itself is a vast library based
system allows the instructor to automatically verify student on multiple facial recognition algorithms and
attendance without any additional expense or effort, although technologies. Few are discussed below.
the suggested system requires only a few basic items, such as a
camera, laptop or personal computer, and a local network. This i. Dlib: It is an open-source C++ library that deals with
procedure is safe, dependable, and simple to apply. The entire major machine learning algorithms methods and
system is written in MATLAB. Naman Gupta, Vikas Deep, classes for machine learning. It includes algorithms
Purushottam Sharma and Vinod Kumar Shukla, et al. [3] had like regression, clustering, data transformation, and
created an automated attendance system to address the flaws in structured prediction. K-Means clustering, Bayesian
the traditional manual frameworks used in schools and colleges. Networks [10]. It is considered the best library for
The use of picture handling mechanisms in homeroom is image processing involving the implementation of
demonstrated in this participation framework. This framework algorithms like SURF, HOG, and FHOG feature
can not only aid in the participation framework, but it can also extraction algorithms.
boost an organization's generosity and significantly reduce time
and paper waste. Jules-Raymond Tapamo, Louis Mothwa and ii. PCA: Principal Component Analysis is an
Temitope Mapayi et al. [4] present a smart model for a student unsupervised learning approach of machine learning to
attendance tracking system based on face recognition. The reduce dimensionality.
presence of students for the whole lecture duration is iii. It is a statistical method of turning the observation of
determined via real-time facial recognition combined with correlated features into a set of linear non-correlated
frequent updates of attendance information. This can motivate data.
pupils to arrive on time and work well in class. R. Kishor
Kumar, Reshma Upadhyaya, C. Ganesh Prasad, & Rahul A. iv. Deep learning: Deep learning is the most advanced
Aithal et al. [5] developed an automatic attendance system Artificial intelligence technique which includes neural
using face detection methods such as Face Landmark networks. Learning can be supervised, semi-
Estimation and Histogram of Oriented Gradients (HOG) supervised or unsupervised.
followed by face identification using a deep convolutional
neural network. A database comprising the photographs of the NumPy is a python library for multidimensional arrays and
students is established in the system. The picture of all the derived objects Arrays, masked arrays, matrices, and
students in the classroom is captured by a camera mounted in routines that accelerate array operations.
the classroom. To recognise faces and automatically mark
attendance on an excel sheet, this image is analysed using
machine learning techniques. [6] Human biometrics can be used
to track attendance in a variety of ways, including face
recognition. Basheer and Raghu demonstrated a fingerprint-
based attendance system in which a fingerprint mechanism is
used to uniquely identify pupils. Vyas [7] proposed the
principal component analysis (PCA) technique, in which facial
images are juxtaposed into a space that conveys differentiation
between realized faces. Face photos that are the most effective.
Face space is structured by eigenface strategies, i.e.,
eigenvectors of face sets, which are probable to be linked to

Authorized licensed use limited to: GLA University. Downloaded on January 08,2023 at 18:29:23 UTC from IEEE Xplore. Restrictions apply.
With the initialization of the program, the program will
search for the training images present in the training
image repository, will encode them and store them in
a list, then the list of the names of the training images
get stored in a list. Then the OS module will initiate the
camera and live video encoding will be done by
Biergarten's facial and non-facial regions [14].
The live video and trained data are compared and if the
faces from the training data are found in the real-time
video, then the unique ID with the time is mentioned
in the CSV file [15].

In this, cv2 is used to load an image from the


specified file.
Syntax:
cv2.imread(path, flag)
Parameters:
* Path: It is a string which represents the path of the
image which is to be read.
* Flag: It is used to specify how the image should be
read.
Figure 1. The complete flow chart of the proposed model.
The default value is cv2.IMREAD_COLOUR
iii. Backend coding and technical aspects
Cv2 is the import statement for OpenCV-python. It is an When we consider the coding part, first we are importing
opensource library with multi language like python, C++, the libraries like cv2, NumPy, face recognition,
Java etc. This library provide support for computer vison, Operating system, date and time. Now we assign images
machine learning, image processing. [11] as the student’s system id and this data is stored in the
path (Folder name) [16]. The webcam takes the image of
OS module in python provides the portable way for using the students, even multiple people's face is recognized at
the operating system dependent functionality. It also the same time [17]. The images taken by the webcam are
provides the convenient way of utilizing the system stored temporarily to compare and give attendance to the
resources.[12] students. The temporarily stored data is now compared
with the data stored in the path (folder name) [18]. Then
Datetime module support current date time extraction the attendance is marked accordingly and the data is
along with arithmetic operation support on date and time. saved along with their system ID and time date when the
attendance was marked (Unique Id provided to every
B. Model Implementation person)
To build our face recognition-based attendance
system, steps needed are follows: IV. EXPERIMENTAL DATA SET AND RESULT
1) Face detection in training image For experimental purposes, images of 5 students from the class
2) Facial and no facial region classification are taken as training data, which contains two male and three
3) Facial region encoding train a face recognition female persons, of which two are twin sisters. Each image is
model on the encoding labelled with its unique system IDs.
4) Finally recognize faces in both image or video
streams with OpenCV
5) Encoding comparison of trained Image and live
stream videos.

i. Implementation as per user View


With the initialization of the program, mounted camera
will start capturing the live video then the video
received will be classified into facial region and non-
facial region [13]. Non facial region will be discarded
and the facial region will be compared with the present
encoded trained data images and will display the
unique ID on the screen forming a square on the
identified faces adding their Unique ID into the
database. Figure 2. The Primary Key for Test Dataset
ii. Implementation as per system view

Authorized licensed use limited to: GLA University. Downloaded on January 08,2023 at 18:29:23 UTC from IEEE Xplore. Restrictions apply.
The steps which are taken for experimental purposes are
mentioned below:
1. Face Detection:
Live video capture from camera
Begin:
//Pre-process the captured videos and extract face images
//Encoded the captured face image
and compared with existing values of encoded faces in
the database.
//If the encoded value does not match with the database,
temporarily stored face data is bypassed and starts searching
for another face in the live video.
//If encoded image value matches with the database step
2 will begin.
Figure 4. Recognition of known dataset
END
Below the result is discussed for 5 test training images:
Table 1: Accuracy Testing of Student as Per System ID

System ID No. of Time Tested Accuracy

2020508807 10 100%

2020442638* 15 86.66%

2020442645* 7 93%

2020538328 12 100%

2020526742 5 100%

Unknown** 12 75%

*Twins System IDs


**When an unknown person whose data is not
mentioned in the data set is kept in front of the camera,
Figure 3. Depicting unknown datasets then 8 out of 12 times, the person is undetected while
in the other 4 cases the person is detected by some other
system IDs.
2. Face Recognition:
Using the face recognition library python, the following
steps would be followed for face recognition:
Accuracy
Begin:
100
// Matching the encoded information from the face image
Accuracy in %

to the encoding stored in the list, taking the index of the 80


matched encoded data. 60
40
//Taking the value stored at the particular index in the
20
Unique ID list.
0
// update the CSV file with the System ID and
system time and date at the time of completion of
attendance.
End;
System ID

Figure 5. Graphical Representation of Data Vs Accuracy

Authorized licensed use limited to: GLA University. Downloaded on January 08,2023 at 18:29:23 UTC from IEEE Xplore. Restrictions apply.
[8] Bhattacharya, Shubhobrata, et al. "Smart attendance monitoring system
(SAMS): a face recognition based attendance system for classroom
The above graph represents the accuracy of the model environment." 2018 IEEE 18th International Conference on Advanced
when tested multiple conditions with respect to multiple Learning Technologies (ICALT). IEEE, 2018.
times mentioned in table 1. From the graph, we can observe [9] Sutabri, Tata, Ade Kurniawan Pamungkur, and Raymond Erz Saragih.
that for the known datasets, the average accuracy of face "Automatic attendance system for university student using face
recognition based on deep learning." International Journal of Machine
recognition is above 95%. However, if the face is not Learning and Computing 9.5 (2019): 668-674.
registered in the dataset, the face may be recognized as a [10] Agarwal, Rakshanda, et al. "Automatic attendance system using face
false image. recognition technique." Proceedings of the 2nd International Conference
on Data Engineering and Communication Technology. Springer,
Singapore, 2019.
V. CONCLUSION AND FUTURE WORK [11] Khan, Sikandar, Adeel Akram, and Nighat Usman. "Real Time Automatic
Attendance System for Face Recognition Using Face API and
To sum up, we proposed an automated attendance system OpenCV." Wireless Personal Communications 113.1 (2020): 469-480.
model based on computer vision to record the presence of [12] Shah, Kunjal, Dhanashree Bhandare, and Sunil Bhirud. "Face recognition-
individual students in the classroom. The system recognized the based automated attendance system." International Conference on
Innovative Computing and Communications. Springer, Singapore, 2021.
multiple faces present in the frame, and mention their unique
IDs in the CSV file with the time when their attendance was [13] Joseph, Dona, et al. "Automatic Attendance System using Face
Recognition." International Journal for Research in Applied Science and
marked. The experimental result of the paper shows a Engineering Technology 8 (2020): 769-773.
satisfactory result with an accuracy ranging from 75 to 100. The [14] . Helmi, Rabab Alayham Abbas, et al. "Face recognition automatic class
proposed model is very much practical to real-life conditions attendance system (FRACAS)." 2019 IEEE International Conference on
and could be implemented in school &college by designing a Automatic Control and Intelligent Systems (I2CACIS). IEEE, 2019.
GUI desktop or mobile application for convenience. For future [15] Kowsalya, P., et al. "Attendance monitoring system using face detection
scope of improvement, the author is intended to improve the & face recognition." International Research Journal of Engineering and
recognition system and develop a mechanism which could Technology (IRJET) 6.03 (2019): 6629-6632.
differentiate between the real human face and the picture shown [16] Bah, Serign Modou, and Fang Ming. "An improved face recognition
algorithm and its application in attendance management system." Array 5
to the camera. The author is also abided to provide a feature of (2020): 100014.
manual attendance marking, in case the automated system fails [17] Sanli, Onur, and Bahar Ilgen. "Face detection and recognition for
to recognize an Individual. automatic attendance system." Proceedings of SAI Intelligent Systems
Conference. Springer, Cham, 2018.
REFERENCES [18] Madhu, Shrija, et al. "Face recognition based attendance system using
machine learning." Int J Mang, Tech and Engr 9 (2019).
[1] Jadhav, Akshara, et al. "Automated attendance system using face
recognition." International Research Journal of Engineering and
Technology (IRJET) 4.01 (2017).
[2] Hemantkumar Rathod, Yudhisthir Ware, Snehal Sane, Suresh Raulo,
Vishal Pakhare and Imdad A. Rizvi, et al. " Automated Attendance
System using Machine Learning Approach." 2017 International
Conference on Nascent Technologies in the Engineering Field (ICNTE-
2017).
[3] Naman Gupta, Purushottam Sharma, Vikas Deep and Vinod Kumar
Shukla, et al. " Automated Attendance System Using OpenCV." 2020 8th
International Conference on Reliability, Infocom Technologies and
Optimization (Trends and Future Directions) (ICRITO) Amity University,
Noida, India. June 4-5, 2020.
[4] Louis Mothwa, Jules-Raymond Tapamo and Temitope Mapayi, et al. "
Conceptual Model of the Smart Attendance Monitoring System Using
Computer Vision." 2018 14th International Conference on Signal-Image
Technology & Internet-Based Systems (SITIS).
[5] R. Kishor Kumar, C. Ganesh Prasad, Reshma Upadhyaya & Rahul A.
Aithal, " Automated Attendance Marking System Using Computer Vision
and Deep Learning," 2020 Proceedings of the 2nd International
Conference on Data Science, Machine Learning and Applications
(ICDSMLA 2020), 2020, pp. 1267-1276, doi: 10.1007/978-981-16-3690-
5_121.
[6] M. Sajid, R. Hussain and M. Usman, "A conceptual model for automated
attendance marking system using facial recognition," Ninth International
Conference on Digital Information Management (ICDIM 2014), 2014, pp.
7-10, doi: 10.1109/ICDIM.2014.6991407.
[7] Sawhney, Shreyak, et al. "Real-time smart attendance system using face
recognition techniques." 2019 9th International Conference on Cloud
Computing, Data Science & Engineering (Confluence). IEEE, 2019.

Authorized licensed use limited to: GLA University. Downloaded on January 08,2023 at 18:29:23 UTC from IEEE Xplore. Restrictions apply.

You might also like