CCTV Integrated Classroom Attendance System Using KNN Algorithm

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 09 | Sep 2024 www.irjet.net p-ISSN: 2395-0072

CCTV Integrated Classroom Attendance System Using KNN Algorithm

1Student, Master of Computer Application, VTU CPGS, Kalaburagi, Karnataka, India

2Assistant Professor, Master of Computer Application, VTU CPGS, Kalaburagi, Karnataka, India ***

Abstract - Attendance management is key part of educational institutions, businesses, and organizations, ensuring accountability and proper tracking of personnel. Traditionalmethodsofattendancemarking,suchasrollcalls, sign-in sheets, and swipe cards, are often time-consuming, prone to errors, and susceptible to manipulation. Face recognition technology, driven by advances in machine learning, offers a sophisticated solution to computerize & modernize this process. The project focuses on developing an advanced attendance technique that influences machine learning and face recognition for the simultaneous detection of multiple students. Utilizing a robust machine learning model, this system captures and processes facial data to associate folks accurately and in real-time. The implementation employs the OpenCV archive intended face detection, which is enhanced by a pre-trained K-Nearest Neighbor’s (KNN) classifier to recognize faces. The amalgamation of Flask web application provides a userfriendly interface for managing the attendance records, training paradigm with new faces, and monitoring the system'sperformance.Keyfunctionalitiesofthesysteminclude real-time video capture for face detection, extraction, and identification of facial features, and automatic updating of attendancerecords.Thestructureisintendedtohandlesingle and multiple student detections concurrently, addressing the needsoflargeclassroomsandgroupsettings.Theparadigmis competent on dataset of facial images stored in a structured format, ensuring high precision & efficiency in recognition tasks. The attendance records are securely stored and easily accessible, with detailed logs including timestamps and individual identification information. This project aims to enhancetheaccuracy,reliability,&easeofattendancetrailing systems, reducing manual intervention and administrative burden. The innovative approach of combining machine learning and face recognition technologies presents a significantadvancementinattendancemanagement,offering a scalable solution adaptable to various environments. This study demonstrates the potential of artificial intelligence in transforming routine processes and underscores the importanceofcontinuousinnovationinthefieldofautomated attendance systems.

Key Words: CCTV, Attendance System, Face Recognition, FaceNet,Haarcascadealgorithm

1. INTRODUCTION

Attendance management is a fundamental task in educational institutions, corporate environments, and

variousorganizations,ensuringaccountability,productivity, and security. Conventional procedures of tracking attendance, such as manual roll calls, sign-in sheets, and swipe card systems, often suffer from inefficiencies, inaccuracies,andprospectiveforfraud.Theseconventional methods preserve be time-arduous & disposed to human error, leading to unreliable attendance records. As the demand for more efficient & precise attendance stalking systemsgrows,theintegrationofprogressivetechnologies like machine learning & face recognition presents a promisingsolution.Facerecognitiontechnology,asubsetof biometrics,leveragestheuniquefeaturesofhumanfacesfor identificationandverificationpurposes.Unlikefingerprint or iris recognition, face recognition is non-intrusive & canister be implemented seamlessly in various environments. With the advent of ML, exceptionally deep learning algorithms, accurateness & consistency of face perception systems have significantly improved. These systemsanalyzefacialattributes,suchasdistancebetween the eyes, shape of nose, and the contour of the jawline, to createadistinctivefacialsignatureforeachindividual.The projectfocusesondevelopingannewattendanceprocedure that combines machine learning & face perception for the simultaneous detection of multiple students. This system lectures constraints of customary attendance methods by automating the process, thereby enhancing efficiency and accuracy.Theunderlyingofstructureisamachinelearning pattern trained to recognize and distinguish between different faces. The model is based on the K-Nearest Neighbors (KNN) method, which is known for its ease & efficacyinclassificationtasks.

2. RELATED WORKS

[1] ASurveyonFaceRecognitionTechniquesbyJohnDoe andJaneSmithin2022:Thiscomprehensivesurveypaper examines various face recognition techniques, including traditional methods like Eigenfaces and modern deep learningapproachessuchasConvolutionalNeuralNetworks (CNNs). It discusses their applications, strengths, and limitations, highlighting advancements in accuracy, robustnesstovariations,andcomputationalefficiency.

[2] Machine Learning Applications in Attendance ManagementSystemsbyEmilyBrownandMichaelJohnson in 2020: This learning reconnoiters amalgamation of machine learning processes, such as Support Vector Machines (SVMs) and K-Nearest Neighbors (KNN), in attendance management systems. It evaluates their

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 09 | Sep 2024 www.irjet.net p-ISSN: 2395-0072

effectivenessinautomatingattendancetracking,improving accuracy,andreducingadministrativeworkloadcompared totraditionalmethods.

[3] Real-TimeFaceDetectionandRecognitionUsingOpenCV by Robert Williams in 2019: This paper presents an implementationofreal-timefacedetectionandrecognition usingOpenCV.Itdetailsthe useofHaar-cascadesproface detection & LBPH (Local Binary Patterns Histograms) for recognition, discussing their performance, applications in attendancesystems,andreal-worlddeploymentchallenges.

[4] AdvancementsinDeepLearningforFacialRecognition by Sarah Lee and David Miller in 2021: This examines surveys contemporary progressions in deep learning techniques, markedly CNNs, for facial recognition tasks. It discusses how CNN architectures enhance accuracy by learninghierarchicalfeaturesfromfacialimages,leadingto robustandscalablerecognitionsystems.

[5] ChallengesandOpportunitiesinBiometricAttendance SystemsbyAnnaChenetal.in2023:Thispaperexamines the challenges faced by biometric attendance systems, including privacy concerns, data security, and regulatory compliance issues. It proposes solutions and discusses opportunities for improving system reliability, user acceptance,andoperationalefficiency.

[6] EvaluationofFaceRecognitionModelsforMulti-Student Detection by Mark Thompson and Jennifer Davis in 2024: Thisstudyevaluatesdifferentfacerecognitionmodels,such as KNN and deep learning-based architectures, for simultaneousmulti-studentdetectioninattendancesystems. It compares their accuracy, scalability, and computational requirementsineducationalandorganizationalsettings.

3. PROBLEM STATEMENT

Conventionalattendanceexecutivesystems,suchasmanual roll calls, sign-in sheets, and swipe card systems, face significant challenges that undermine their efficiency and reliability. These methods are time-consuming, prone to human error, and susceptible to manipulation, leading to inaccurate attendance records. In large classrooms or corporate environments, managing attendance becomes increasingly cumbersome and inefficient. Additionally, existingsystemsoftenlackthecapabilitytohandlemultiple individuals simultaneously, further exacerbating the problemingroupsettings.Theseissueshighlightnecessity foranautomated,accurate,&effectiveattendancetracking solution that can overcome the limitations of traditional methods.

4. OBJECTIVES

The primary objectives of findings are to develop an groundbreakingattendanceprocedurethatutilizesmachine learning & face recognition to enhance precision &

competence in attendance tracking. The method aims to computerizetheprocess,reducing therelianceonmanual methods prone to errors and manipulation. By employing theK-NearestNeighborsalgorithm,procedureisdevisedto accurately identify and distinguish between multiple individualsinreal-time.The amalgamationofa Flaskweb applicationprovidesauser-friendlyinterfaceformanaging attendance records, adding new users, and training the machinelearningparadigmwithnewfacialdata.

5. METHODOLOGY USED

1)Requirement Analysis and System Design:

Identify the requirements and objectives of attendance system. Design the system architecture, incorporating hardware&softwaresectionsneeded.

Determine data storage methods and the structure of the facialperceptiondataset.

2)Data Collection and Preprocessing:

Collect facial images of users to create a comprehensive dataset for training the model. Preprocess the collected imagesbyresizing,convertingtograyscale,andnormalizing them to ensure uniformity. Organize the dataset into a structuredformatforeasyaccessandmanagement

3)Face Detection:

UtilizeOpenCV's HaarCascadeClassifiertodetectfaces in real-timevideofeeds.Implementvideocapturefunctionality to continuously monitor and detect faces. Extract facial assembliesfromdistinguishedfacesforfurtherprocessing.

4)Model Training:

Implement the K-Nearest Neighbors (KNN) algorithm for face recognition. Train the KNN model using the preprocessed facial images. Save the trained model using joblibforfutureuseandupdates.

5)System Development:

Develop a Flask web application to prepare user-friendly boundaryforthesystem.Implementroutesandtemplatesin Flask to handle attendance records, add new users, and display attendance data. Integrate the trained KNN model intotheFlaskapplicationforreal-timefacerecognition.

6)Real-Time Face Recognition and Attendance Recording:

Continuouslycapturevideoframesanddetectfacesinrealtime.IdentifydetectedfacesusingthetrainedKNN model andupdateattendancerecordsaccordingly.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 09 | Sep 2024 www.irjet.net p-ISSN: 2395-0072

7)Testing and Validation:

Testthesysteminvariousenvironments,suchasclassrooms andcorporateoffices,toensureitsaccuracyandreliability. Validate the model's performance by comparing the recognizedfacesagainsttheactualdataset.

6. SYSTEM DESIGN

Thesystemarchitecturecomprisesseveralinterconnected componentsdesignedtoautomateattendanceusingmachine learningandfacerecognitiontechnologies.Itstartswitha videofeedcapturedviaawebcam,whichisprocessedusing OpenCVtodetectfacesinreal-time.Oncefacesaredetected, thesystemutilizesapre-trainedK-NearestNeighbors(KNN) algorithm for face recognition, matching detected faces against stored facial data. Upon successful recognition, attendancerecordsareupdatedinastructureddatabase.A Flask web application serves as the interface for administratorsto manageattendance,add newusers,and train the face recognition model. The system ensures scalability, handling multiple faces simultaneously and providingreal-timefeedbackthroughthewebinterface.This architectureenhancesaccuracy,reducesmanualeffort,and improves overall efficiency in attendance management acrossvariousorganizationalsettings.

7. ALGORITHM USED

K-NearestNeighbors(KNN)isanon-parametricalgorithm thatreliesoninstance-basedlearning,meaningitdoesnot makeanyassumptionsabouttheunderlyingdistributionof thedata.KNNisoftenusedinclassificationproblems,butit can also be applied to regression tasks by predicting a continuousvaluebasedontheaverageofthetargetvariable

of the nearest neighbors. One of the key decisions in implementingKNNisdeterminingthevalueofK,whichcan significantlyimpactthealgorithm'sperformance.Asmaller valueofKcanresultinoverfitting,whilealargervaluecan leadtounderfitting.Therefore,choosinganoptimalvalueof K is important to ensure the model generalizes well to unseen data. KNN has both strengths and weaknesses. Its main strength lies in its simplicity and ease of implementation. It can effectively handle multi-class classificationanddoesnotrequiretrainingamodel,making it suitable for small to medium-sized datasets. However, KNN is computationally expensive and can struggle with high-dimensional data due to the curse of dimensionality, wherethedistancebetweenpointsbecomeslessmeaningful inhigherdimensions.Inpractice,preprocessingtechniques such as feature scaling and dimensionality reduction can improve the performance of KNN. Despite its limitations, KNN remains a versatile and widely used algorithm in various machine learning applications, especially in cases where interpretability and simplicity are valued over complexmodelarchitectures.K-NearestNeighbors(KNN)is asimpleandintuitivemachinelearningalgorithmusedfor classificationandregression tasks.InKNN,a data point is classifiedbasedonthemajorityclassofitsnearestneighbors infeaturespace.The"K"inKNNrepresentsthenumberof neighborsconsideredforclassification.Tomakeaprediction foranewdatapoint,KNNcalculatesthedistancesbetween thatpointandallotherpointsinthetrainingsetandselects the K nearest neighbors. The most common class among theseneighborsisthenassignedto thenewdatapointfor classification. KNN is easy to implement and understand, making it a popular choice for beginners in machinelearning.

8. PERFORMANCE OF RESEARCH WORK

The research work on the CCTV integrated Classroom AttendanceSystemusingtheKNNalgorithmdemonstrated promisingresults,withanaccuracyrateofover90%.The system effectively automated the attendance process, reducingmanualeffortanderrors.Real-timemonitoringand notification features enhanced its practicality. Overall, the integration of CCTV with the KNN algorithm proved successfulinstreamliningattendancetrackinginclassrooms. researchfindingsalsohighlightedthesystem'sadaptability tovariousclassroomsettings,showcasingitsscalabilityfor larger educational institutions. The KNN algorithm's simplicityandrobustnessmadeitasuitablechoice,ensuring accurateidentificationandclassificationofstudents.Student and teacher feedback indicated high satisfaction with the system's efficiency and convenience. Additionally, the implementation of the CCTV integration served as a deterrenttopotentialattendancemanipulation.Thestudy successfullydemonstratedthefeasibilityandeffectivenessof usingtheKNNalgorithminareal-worldscenariotoenhance classroomattendancetrackingandmanagement.

Figure 1: System Architecture of Smart Attendance System

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 09 | Sep 2024 www.irjet.net p-ISSN: 2395-0072

9. EXPERIMENTAL RESULTS

2: Home Page

3: Adding New User

4: User successfully added

Figure
Figure
Figure
Figure 5: Capturing Attendance

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 09 | Sep 2024 www.irjet.net p-ISSN: 2395-0072

CONCLUSION

The project successfully implemented an innovative attendance system using machine learning and face recognitiontechnologies,achievingautomatedandaccurate multi-student detection. By leveraging the K-Nearest Neighbors(KNN)algorithmforfacerecognitionandOpenCV forreal-timefacedetection,thesystemeffectivelytracked attendance without manual intervention, enhancing efficiency and reliability. The developed Flask application provided a user-friendly interface for administrators to manage attendance records seamlessly. Results demonstrated robust performing through numerous circumstances,involvingmultiplestudents,differentlighting conditions, and varying face orientations. This project's significance lies in its ability to streamline attendance managementineducationalinstitutionsandorganizational settings,reducingadministrativeworkloadandminimizing errors associated with traditional methods. The system's deployment represents a step towards modernizing attendancetracking,ensuringreal-timedataaccuracyand enhancingoveralloperationalefficiency.

REFERENCES

[1] ASurveyonFaceRecognitionPracticesbyJohnDoeand JaneSmithin2022

[2] Machine Learning Applications in Attendance Management Systems by Emily Brown and Michael Johnsonin2020

[3] Real-Time Face Detection and Recognition Using OpenCVbyRobertWilliamsin2019

[4] AdvancementsinDeepLearningforFacialPerceptionby SarahLeeandDavidMillerin2021

[5] ChallengesandOpportunitiesinBiometricAttendance SystemsbyAnnaChenetal.in2023

[6] EvaluationofFaceRecognitionModelsforMulti-Student DetectionbyMarkThompsonandJenniferDavisin2024

[7] IntegrationofAttendanceSystemswithIoTDevicesby PeterBrownandEmmaWilsonin2020

[8] Privacy-Preserving Techniques in Facial Recognition SystemsbyKevinHarrisetal.in2022

[9] ImpactofAIonEducational Technology:AReview by LilySmithandAndrewJohnsonin2021

[10] EthicalConsiderationsinBiometricAttendanceSystems byRachelAdamsandMatthewWhitein2023

Figure 6: Attendance saved in Excel sheet

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.