Smart Attendance System using Face Recognition

Face recognition offers a wide range of valuable applications in social media, security, and surveillance contexts. The software used for building facial recognition algorithms is Python and OpenCV. "Attendance using Face Recognition" is a method for tracking and managing attendance that makes use of facial recognition technology. By seamlessly integrating the 'Face Recognition' module, a native Python feature, and the OpenCV library, our system excels in accuracy and dependability. The system then stores attendance records in a database and provides real-time reports. In this article, we demonstrate how to create a face recognition system in Python utilizing the built-in "Face Recognition" module and the OpenCV library. Our results show that our system achieves high accuracy and robustness while being efficient and scalable, catering to a wide spectrum of educational institutions, organizations, and enterprises.


Introduction
Face recognition has gotten a part of consideration due to its convenience in numerous diverse areas.It includes identifying and recognizing people from facial pictures or recordings [1].In computer vision and machine learning, face recognition has grown in popularity, and numerous algorithms have been created over time [2].The main idea is to naturally distinguish or confirm a person based on their facial highlights.Python and OpenCV are popular tools for implementing face recognition algorithms, with many libraries and modules available for use.Using facial recognition technology, "Attendance using Face Recognition" is a system created to make the procedure of recording attendance automatic.A camera is used by the model to capture images of people entering specific locations, their identities are then verified and processed using deep learning algorithms.
The model stores the attendance records in a database to provide real time reports to the administrators.It provides an easy way to keep track of people and manage their attendance [3].This implementation offers a more efficient and accurate way to manage attendance records compared to other traditional methods such as paper-based systems or manual data entry.
The primary achievements of this endeavour are outlined as follows: 1. Creation of an independent attendance management system which depends on detecting facial features present within human faces.2. Demonstration of facial feature extraction within group settings as a focal point of this study.3. Implementation of the complete operational model in the form of a web application, ensuring straightforward accessibility.

Disadvantages of Manual Attendance System
Manual attendance systems have several drawbacks.Firstly, they are time-consuming as it requires employees to sign in and out which causes delays.Secondly, they are error-prone, with issues like misreading handwriting and discrepancy in recording attendance at times lead inaccuracies [4].Lastly, these systems raise security concerns, as they are vulnerable to fraud and manipulation by employees, resulting in inaccurate attendance records.This can impact financial and tracking processes.

Benefits of Smart Attendance System
Implementing face recognition technology for attendance tracking comes with several advantages.Firstly, it significantly saves time by automatically identifying individuals and recording their attendance thereby eliminating the need for manual processes and paperwork.Secondly, it enhances accuracy by minimizing the likelihood of errors in attendance records.Moreover, this technology provides real-time attendance data allowing administrators to make quick decisions related to staffing, scheduling, or absenteeism [5].Additionally, it bolsters security measures, as it is difficult to impersonate someone else's face, reducing the risk of fraudulent attendance entries.In summary, adopting face recognition for attendance offers improved precision, time efficiency, realtime insights, and heightened security compared to traditional manual systems.

Literature Survey
Face Recognition System Technology by Sagar et al [6] discussed biometric and face recognition as a domain that begins with face detection and extraction of features.It explained the scope and benefits of the project along with related works and challenges in face recognition due to limited datasets.It concludes that face recognition is an emerging technology that will only become more accurate and efficient.
A deep neural network and set-based face recognition method was proposed by Prathama et al [7].since ageing alters facial features and affects recognition.They regard each subject's collection of photographs captured at various points in time as a single set and contrast it with collections of images of other subjects.It has been discovered that setbased recognition outperforms singleton-based recognition for both identification and verification, and that utilizing setbased recognition, it is simpler to distinguish between older and younger people.
A novel approach to facial recognition incorporating advanced feature extraction techniques was proposed by Husein et al [8].The system uses the OpenCV cascade classifier to detect faces and the distinctive characteristics extracted from the set of facial data to distinguish between the facial images.The authors also assess the android device's battery life, processor power, and memory usage.The results demonstrate 93% accuracy in favourable lighting.The paper concludes by discussing the benefits and limitations of face recognition in android.
Facial Recognition for Attendance and Management by Baskar et al [9] proposed a facial identification and recognition system to automate attendance records in classrooms.The system involved an enrolment process, recognition, and authentication procedures.They used machine learning models and classifiers to identify and label faces, and record attendance accordingly.The paper concludes with the implementation results and areas for improvement.
Udit's "Image Processing Using OpenCV" [10] This study investigated the application of OpenCV, a free computer vision toolkit, to image processing tasks.The paper provides an overview of OpenCV and its features, including its ability to handle real-time image processing, detect and track objects, and recognize faces.
Face Recognition by Sudhir et al [11] is the foundation of the Smart Attendance System utilising OpenCV.This research study described a system for automating classroom attendance using OpenCV and facial recognition methods.The study laid out the need for a mechanized participation framework which reduces errors and saves time compared to the traditional manual frameworks.

Existing Practice
The existing practice for taking attendance can vary depending on the specific setting and purpose.Typical actions include the following: 1. Sign-in sheet: In this method, the instructor or teacher provides a sheet of paper with the names of the students and asks them to sign in when they arrive [12].2. Roll Call: This is the traditional method where the instructor or teacher calls out each student's name and the student respond with "present" or "here".3. Barcode/RFID scanning: Some institutions use technology such as barcode or radio-frequency identification (RFID) scanners to track attendance [13].4. Participation-based: In some courses, attendance may be taken based on participation.This means that students need to actively participate in the class discussion, group work, or other activities to be counted as present [14].5. Peer Check-in: In this method, students may be asked to check in with a classmate or group to confirm their attendance [15][16].Most of these approaches are subject to errors, Time consuming and are not 100% reliable thus a need for a better solution to taking attendance is necessary in the near future.

Proposed Method
Figure 1 illustrates the proposed method which involves the following steps: 1. Face Detection: To detect facial features in the given input stream, we employ the "Face Recognition" module in Python.In order to find faces, the module makes use of a trained model.The image of the person is loaded using "load_image_file" method and the detected faces are then passed to the next step for alignment.2. Face Alignment and Feature Extraction: The face_encodings approach, which uses the popular "FaceNet" algorithm to find the lineaments and to extract the facial features.The detected features are then used get the facial coordinates which are then stored as an array.3. Real Time Face Detection: For real time detection we use CV2 where cap.read()command is used to capture a frame from the video.The face_recognition library facilitates the extraction and storage of facial features by first converting the real-time image from "BGR" to "RGB" format and then saving them in pairs.4. Face Recognition: After that, the facial features are analysed, and if they match those in our dataset, attendance is noted in the excel sheet along with the date and hour.

Dataset and Environmental setup
In this work, a dataset comprising 16 human face images was utilized.These images were obtained from students and teachers affiliated with Amrita Vishwa Vidyapeetham, showcasing a diverse range of facial expressions.These images serve as the dataset for training and evaluating our face recognition system [Figure 2].
The images were originally in JPEG and JPG formats and possessed a resolution of 1209 x 1620 pixels, as depicted in Figure 2. Subsequently, the images were preprocessed by cropping them to isolate the facial area and resizing them to a consistent size.This resizing ensured that the resulting output images were one-fourth the width and height of the original input images.The experiment and implementation were conducted using a Python language framework using Intel Core i7 | 16 GB RAM.The Flask application was utilized to load a real-time video feed, where users were expected to display their faces.The captured face in real time is compared with the pre-existing dataset using advanced face recognition algorithms.The system matches the facial features and accurately recognizes the individual [Figure 3.1] [Figure 3.2].Upon successful face recognition, attendance was recorded in an Excel sheet, including the individual's name, attendance time, and status [Figure 4].
The evaluation of the attendance solution presented in this research relies on the accuracy and face Match Index.The dataset used for training and testing the system comprises a very small number of images, resulting in a relatively low accuracy of the model, with a maximum of 70%.The accuracy of the facial recognition system is determined by calculating the minimum difference between the facial highlights of the captured image and the images in our dataset.The confusion matrix for the proposed model shows that the model is accountable [Figure 5].

Conclusion and Future Work
This study revolves around the creation of an autonomous attendance system that relies on facial characteristics.The process commences with the detection of facial regions within the input image, followed by the extraction of pertinent facial data using a Python-based face recognition library.The acquired facial data is subsequently input into a CNN model for classification.The experimental result shows that the developed model exhibits superior performance, even in a group of people environment.Future work will delve into assessing the system's performance using pretrained models and incorporating optimization techniques based on metaheuristics.

Figure 1 .
Figure 1.Block diagram describing the design of our algorithm for face recognition

Figure 2 .
Figure 2. Sample images collected from students

Figure 3 . 1
Figure 3.1 Real-time face capture and recognition

Figure 3 . 2 Figure 4 Figure 5
Figure 3.2 Face recognition of images downloaded from the internet