International Peer-Reviewed Publisher
Serving Researchers Since 2012

Real Time Attendance System

DOI : 10.17577/IJERTCONV14IS050066
Download Full-Text PDF Cite this Publication

Text Only Version

Real Time Attendance System

Belal Ahmad

Sharda School of Computing Science and Applications, Department of Computer Science and Applications,

Deepak Kumar

Sharda School of Computing Science and Applications, Department of Computer Science and Applications,

Sharda University, Greater Noida, India Sharda University, Greater Noida, India

Mr. Vishvendra pal Singh Nagar (Assistant Professor) Sharda School of Computing Science and Applications, Department of Computer Science and Applications, Sharda University, Greater Noida, India

Abstract This research project presents a real-time face detection and recognition system designed specifically for automated attendance management. The system aims to enhance accuracy, security, and efficiency in recording attendance by eliminating the need for manual processes. The workflow begins with user registration, during which the individual's facial data is captured and stored. Upon successful registration, users can log in and fill in the required personal or academic details. The system then activates the face recognition module, which uses Python, OpenCV, and the face_recognition library to identify the individual in real time. Once the face is successfully recognized, the system automatically marks the user as "Present" and stores all related datasuch as name, date, and time of recognitionin an Excel sheet using the pandas' library. Additionally, a snapshot of the recognized face is saved in a structured folder for future verification and record-keeping. This project not only automates attendance tracking but also ensures secure and accurate recognition with minimal human intervention. It is especially useful for educational institutions, workplaces, and training centers. By integrating biometric technology with real-time data storage, the system offers a reliable, scalable, and user-friendly solution for modern attendance management.

Keywords Real-Time Attendance, Face Recognition, Haar Cascade, LBPH, Flask Web Interface, OpenCV, Edge-AI, Human Identity Verification, Excel Automation, Biometric Security.

  1. INTRODUCTION

    As biometric authentication into the secure digital ecosystem, facial recognition became one of the key enablers of identity automation across myriad applications. Given its contactless operation, natural interaction paradigm, and easy integration with widely available camera infrastructure, it is best placed in contexts such as education, corporate security, and public administration. Yet, the under-realization of the deployment of real-time face recognition systems for attendance automation in environments with hardware, network infrastructure, or budget constraints persists even in the wake of technological maturity. Among other institutions, educational institutions

    largely depend on manual ways of keeping attendance or temporary systems like RFID cards and fingerprint scanners. The moving methods do not secure accuracy breaches and are subject to proxy attendance, hygiene issues, and administration overheads. However, even though cloud deep learning solutions can promise near accuracy, they have combinations of serious internal trade-offs-high latency,higher costs, dependence on Internet connectivity, and threats to privacy of data-that keep them inappropriate for institutional scaling.Most systems fail to recognize and deliver recognition performance in real time and reliably at an edge-level infrastructure without any cloud dependence, despite the advanced performance of algorithms. This focuses on the penetration of effective new face recognition algorithms from academia to lightweight real-time operational frameworks usable in contrastive dynamic physical environments.We have proposed a modular, off- line-reaching real-time face recognition system to automate attendance workflows with a minimum of intervention. Additionally, this system employs Haar Cascade Classifications for swift detection of faces, and LBPH applies for the recognition of faces, both being chosen specifically for robustness against pose variation and lighting along with maintaining run time performance on a standard CPU.Our implementation stack is deliberately streamlined for accessibility: the backend uses Python with Flask, while the frontend comprises a minimal HTML/CSS interface. Real- time webcam input is captured via OpenCV, and attendance records are logged into Excel-compatible spreadsheets using openpyxl, ensuring integration with administrative systems. The architecture is extensible by design, supporting upgrades such as mobile deployment, encrypted cloud storage, and federated learning pipelines.High-performance biometric recognition will be consolidated with deployability in under-resourced academic settings through this work. It will thus not just address accuracy on constrained datasets, but also for operational feasibility and long-term sustainability.

  2. RELATED WORK

    Recent advancements in facial recognition have produced a

    diverse set of architectures, and cloud-native implementations. However, the translation of these technologies into deployable, real-time attendance systems particularly in infrastructure-constrained academic environmentsremains limited. This section categorizes key developments in this space and contrasts them with our proposed system, which emphasizes offline operability,computational efficiency, modularity, and robustness on low- power machines. Classical methods continue to demonstrate relevance for real- time and embedded systems. Desai et al. [1] developed a Raspberry Pi-based facial recognition system using OpenCVs DNN module, emphasizing privacy through edge- only inference. However, the lack of resilience under low- light conditions prompted a need for feature descriptors like LBPH, which we adopt. Similarly, Kumar et al. [2] evaluated LBPH, Eigenfaces, and Fisherfaces in grayscale datasets and found LBPH superior in recognition consistency and training speedvalidating our choice of recognition algorithm. Arun et al. [3] implemented HOG with SVM for attendance verification, but their system suffered latency during continuous video input and required preprocessed datasets, a gap addressed in our live feed-compatible pipeline.Cloud- centric models, while accurate, present deployment trade- offs. Rathi and Sharma [4] integrated YOLOv5 and DeepFace for recognition but required GPU hardware and cloud-hosted inference via third-party APIs. Their solution, though high-performing, lacks offline viability, making it impractical for decentralized or rural campus deployments. Alam and Gupta [5] used MediaPipes FaceMesh with Firebase and Google Sheets to record attendance. While the interface was intuitive and fast to prototype, it introduced latency due to network synchronization and lacked biometric encryption, which raises compliance issues in GDPR-aligned academic environments. Our system circumvents both problems through secure local data handling and encrypted metadata logging, eliminating third- party reliance.Deep-learning-based recognition models have pushed accuracy boundaries but at significant computational cost. Huang et al. [6] introduced a transformer-based descriptor that improved identity separation, yet it demanded high-end GPUs and long inference times, making it unsuitable for institutions operating without AI accelerators. Lee et al. [7] proposed a hybrid CNN-kNN recognition system capable of distinguishing visually similar faces, but their solution increased model storage complexity and training time. In contrast, our architecture deliberately eliminates deep models, instead favoring lightweight LBPH encoding with excellent generalization under practical constraints.Other researcers have explored architectural and deployment innovations. Tripathi et al. [8] employed a multi- angle face capture technique requiring multiple cameras to boost accuracy in live classrooms. Although effective, this raised deployment overhead and

    power consumption. We resolve this through single-camera optimization using histogram-based grayscale normalization and dynamic cropping. Patra and Singh [9] introduced Dockerized facial recognition microservices linked to HRMS systems. While modular, their system depends on AWS Lambda services and cloud compute layers, adding recurring operational costs. Our system provides similar modularity with complete independence from internet or cloud resources, streamlining on-premise deployment. In privacy-focused deployments, Ahmed et al. [10] used federated learning for decentralized recognition models on Android devices. Though commendable for protecting biometric data, their model convergence was inconsistent across varying mobile hardware profiles. Our system ensures consistent performance by avoiding federated retraining and relying on static, localized models. Zhao and Min [11] explored a Siamese Network-based approach using pairwise verification for authentication tasks. Despite its innovation, the model was unsuitable for general-purpose machines due to high memory requirements and multi-stage preprocessing. By contrast, our recognition engine supports sub-second inference on general-purpose CPUs with minimal preprocessing and compact training sets.Standardized benchmarking of classical algorithms further substantiates our model choice. Singh et al. [12] evaluated LBPH, Eigenfaces, and CNNs against the Labeled Faces in the Wild (LFW) dataset and demonstrated that LBPH offers a near-equal balance of recognition accuracy and computational tractability, especially when working with smaller datasets under real-world lighting and angle variation. Their work strengthens the case for selecting LBPH in live academic deployments where speed, simplicity, and accuracy must be equally balanced.Finally, Nair et al. [13] proposed an OpenCV and SQLite- based attendance system, but it lacked persistent training modules and identity reusability. Their model required reinitialization per session, undermining its suitability for institutional environments that require daily performance without human intervention. Our solution addresses this by introducing persistent model serialization, unique student label mapping, and reusable training caches, ensuring continuity and minimizing system downtime.In summary, while the field offers a variety of approaches across the spectrum of accuracy, scalability, and privacy, very few systems address the intersection of real-time processing, offline execution, low-infrastructure deployment, and educational usability. This research proposes a production-ready system that fills this critical void through a balanced application of proven computer vision techniques, principled system design, and practical awareness of the infrastructural realities in academic environments.

  3. METHODOLOGY

    This methodology presents a real-time, offline-capable facial recognition attendance system, designed for sub- second latency, adaptive training, and full independence from cloud infrastructure or external APIs. It combines Haar Cascade classifiers for detection and Local Binary Pattern Histograms (LBPH) for recognition, all orchestrated within a Flask- powered, service-oriented modular architecture. Designed for deployment in infrastructure-constrained academic environments, the system emphasizes scalability, modularity, and minimal operational overhead, while being fully extensible for future biometric innovations such as liveness detection, role-based access control, and encrypted cloud synchronization. The methodology is structured across the following core components: System Architecture, Face Detection, Recognition Engine, Adaptive Training, Attendance Logging, Workflow Pipeline, and Deployment and Future Integration.

    1. System Architecture

      As shown in Figure 1, the proposed architecture is modular and service-oriented, with well-defined roles for each component. It comprises three main subsystems:

      • Frontend Client Layer: A web-based interface developed using HTML/CSS and JavaScript. It enables registration, webcam capture, and

        recognition control. Webcam access is facilitated through the getUserMedia() API.

      • Backend Server Layer: Built using Python Flask, it manages all detection, recognition, and logging operations. It exposes secure RESTful endpoints

        for registration, model inference, and attendance updates.

      • Model & Storage Layer: Stores the serialized LBPH model, label-identity mappings, and .xlsx

        attendance records. It supports versioned updates and recovery snapshots for traceability.

        Each subsystem is decoupled to allow fault isolation, independent debugging, and modular upgrades. The architecture supports asynchronous request handling and is optimized for execution in high-concurrency LAN environments, making it suitable for classrooms with simultaneous student interactions.The design of

        this system was guided by three key objectives:

        1. Minimal reliance on cloud or GPU infrastructure.

        2. Modular extensibility across institutional use cases, and

        3. Support for adaptive training without full model reinitialization. These principles are embedded throughout the system architecture and training logic.

        Fig. 1. Architecture diagram

    2. Face Detection Module

      Face detection is executed using OpenCVs Haar Cascade Classifier, selected for its real-time responsiveness, low computational demand, and frontal face detection precision.

      • Input preprocessing includes:

      • Grayscale conversion

      • Frame resizing to 640×480

      • Noise reduction using bilateral filtering

        The classifier uses integral images and cascading features to locate facial regions. Detection is tuned using a scale factor of 1.2 and a minimum neighbor count of 5. Only frames with exactly one face are passed to the recognition module, enforcing input consistency and eliminating false multiperson detection.The system also includes a secondary validator that flags irregular face angles or incomplete frames, prompting users to adjust their position. This ensures high-quality samples for recognition and training while enhancing fairness in attendance attribution.

        Fig. 2. Memory management system

    3. Recognition Engine

      Recognition is powered by LBPHan algorithm optimized for local texture encoding and robustness to illumination, scale, and expression changes. Key workflow:

      • Cropped face regions are divided into local grids.

      • Binary differences in pixel intensities are encoded into histograms.

      • Histograms are compared using Chi-Square distance metrics.

      • Matches below a predefined threshold (empirically 55) are accepted.

        Compared to deep neural networks, LBPH:

      • Requires significantly fewer training samples

      • Is CPU-executable in real time

      • Provides interpretable feature vectors

      • Supports incremental training

        In terms of memory utilization, LBPH-based models

        maintain a lean footprint (~300600 KB for 100 identities), making them suitable for low-resource deployments. The recognition pipeline is optimized using NumPy vectorization to reduce latency without compromising matching accuracy.

    4. Adaptive Training and Model Update Strategy The enrollment and model training process is architected to enable incremental learning, dataset modularity, and low- latency retraining cycles without compromising previously acquired facial represetations. Each subject undergoes a structured registration procedure wherein facial samples are collected dynamically via the system interface. The detection module isolates facial regions, followed by preprocessing steps including grayscale normalization, contrast enhancement, and geometric alignment. The extracted feature maps are indexed using unique numerical identifiers and stored in the training repository. The system utilizes a modular batch-training approach where captured samples are appended to the training dataset without triggering full model retraining. This is facilitated through an intelligent update mechanism where: Pre- existing subject vectors are preserved.

      • Pre-existing subject vectors are preserved.

      • Only new user embeddings are integrated using LBPHs partial retraining capabilities.

      • A dual-layer identity mapping dictionary ensures accurate label-name resolution during inference.

      By decoupling the face embedding process from model persistence logic, the system achieves continuous roster scalability, supporting academic environments with dynamic enrollment or frequent roll changes. The LBPH model is periodically versioned and checkpointed to allow rollback or auditing of facial embedding integrity. This training design eliminates the need for high- performance

      computing resources, enabling localized, secure, and repeatable model evolution, in line with institutional requirements for student identity management systems.

    5. Attendance Logging and Storage

      Recognition outcomes are written to Excel-based attendance sheets via openpyxl, structured for compatibility with institutional administrative systems. Each row includes:

      • Timestamp (UTC standard)

      • Student Name and ID

      • Recognition Status ("Present")

    Daily logs are stored in /logs/YYYY-MM- DD_attendance.xlsx, with duplicate prevention enabled through per-user session control. A parallel .csv version is generated for ERP integration, and optional encryption modules can be enabled to comply with academic data privacy mandates. For traceability, log entries are appended with session IDs and verification flags indicating the confidence level of the match. This not only facilitates post-event auditing but also supports anomaly detection and behavior tracking in sensitive environments like examination halls.

    E. Workflow Execution Pipeline

    The full real-time workflow is outlined below:

    1. The user accesses the web interface and initiates recognition.

    2. Live video is captured and streamed to the backend.

    3. Haar Cascade detection extracts face regions.

    4. LBPH computes histogram embeddings for the face.

    5. Label match is verified against trained models.

    6. If matched: log attendance; if not: return retry or unrecognized.

    Latency from trigger to response is consistently <2 seconds on a quad-core i5 system. The pipeline is robust to packet loss, frame drops, and mid-session interruptions, ensuring operational stability in live environments.

    Fig. 3. Work Flow

    F. Deployment Strategy, Operational Requirements, and Future Research Integration

    The deployment strategy is grounded in principles of infrastructure adaptability, modular execution, and edge- environment compatibility, ensuring the systems applicability across a range of institutional settings. The platform has been validated on cross-platform environments including:

    • Workstations with standard hardware configurations (Intel i5/8GB RAM).

    • University lab desktops with minimal graphical acceleration.

    Deployment follows a container-agnostic virtualization model, leveraging Python virtual environments and dependency isolation to prevent library conflicts. The system exposes its RESTful services via Flask, with zero reliance on third-party APIs or cloud endpointsenabling

    offline-first deployment on secure LANs or intranets.

    Operational efficiency benchmarks confirm that end-to- end face recognition and logging executes under 1.7 seconds per recognition cycle, even in low-resource environments. Internal diagnostics and error tracing modules allow system administrators to monitor performance degradation and trigger scheduled model maintenance tasks. The system has been architected with forward-compatibility in mind. Planned enhancements include:

    • Integration of face anti-spoofing modules using liveness detection via motion-based or depth cues.

    • A secure, token-based admin portal using JWT and role-based access control (RBAC).

    • Optional support for cloud-synchronized attendance logs using services like Supabase, maintaining compliance with FERPA and institutional data

      policies.

    • Exploration of transformer-based hybrid embeddings to enhance robustness against occlusion and angle variation, particularly for multi-user

    recognition scenarios.

    The architecture leverages modularity over monolithism, allowing targeted upgrades without systemic reengineering. This ensures the system is not just deployablebut evolvable, providing a blueprint for next-generation biometric attendance ecosystems in academic institutions and beyond. The functional components described herein were evaluated on real institutional hardware using multiple accuracy, latency, and resilience benchmarks, detailed in the following section.

  4. RESULTS AND ANALYSIS

    The Proposed real-time face recognition based attendance system is developed and tested an instituational setting to evaluate its functionality, latency, recognition performance, and integration usability. All tests were conducted on a Windows 11 laptop with Intel i5 (8 GB RAM), configured without cloud APIs or GPU acceleration, to reflect the constraints of typical educational environments.

    1. System Output Validation

      Students accessed the web-based interface to complete registration and capture their facial data via webcam. Once registered, they could initiate recognition through a single button, triggering the detection pipeline and matching engine on the backend.

      Fig. 4. User Interface

      As shown in Fig. 3, the interface is minimal and responsive, designed for real-time feedback with no user training required. Across 50 recognition attempts involving 10 enrolled users, the system successfully identified 47 entries, yielding an overall accuracy of 94%. Each positive match resulted in an immediate log entry appended to a structured Excel sheet via the openpyxl library.

      • Total End-to-End Response: ~1.7 s

    Recognition reliability was maintained across different facial angles, frame scales, and lighting intensities. Controlled evaluations yielded zero false acceptances, while the false rejection rate (FRR) stood at 5.7%, largely attributable to environmental lighting or partial face visibility. The frontend includes a retry prompt, allowing the user to adjust pose or lighting before attempting recognition again, with no need to reload the interface. Memory usage remained consistent (~200250 MB) during continuous operation, and model reload times were negligible, affirming the lightweight, deployable nature of the LBPH-based implementation.

    1. Comparative Impact

      To assess the contextual effectiveness of the proposed approach, a comparative analysis was performed against existing attendance methods commonly used in educational and institutional environments. As summarized in Table I, the face recognition system offers significant advantages in terms of accuracy, infrastructure cost, and hygienewithout compromising operational efficienc.

      Table. 1. Comparative analysis

      Method

      Accuracy

      Cost

      Limitations

      Manual Entry

      Low

      Very Low

      Time-consuming,

      error-prone

      RFID Swipe

      Medium

      Medium

      Tag loss, no biometric

      verification

      Fingerprint

      Scanner

      High

      High

      Hygiene concerns,

      expensive upkeep

      Face Recognition

      (Ours)

      High

      (94%+)

      Low

      Sensitive to

      lighting/angle

      Fig. 5. Generated Excel attendance log

      Figure 5 displays the generated .xlsx file. The system logs three key fields: timestamp (UTC standardized), recognized name, and attendance status (Present). A session token logic prevents duplicate logs by maintaining an in-memory buffer of recognized IDs, ensuring that each student is logged only once per recognition cycle. The entries were validated post- test for consistency and alignment with real-time events.

      B. Processing Performance

      Operational benchmarks were captured over 15 independent cycles to evaluate latency and stability. Average timings were:

      • Face Detection: 0.52 s

      • LBPH Recognition: 0.41 s

        The system eliminates reliance on physical tokens, minimizes instructor involvement, and aligns with the growing demand for touchless, automated workflows. Unlike RFID or biometric readers, the solution scales with software and does not incur recurring hardware costs, making it particularly attractive for widespread academic deployment.

    2. Usability and Integration

      Ten non-technical users participated in a guided UX test session. All participants were able to independently complete the registration and recognition process, validating the low learning curve. The UI flow, form layout, and status messages were rated highly for clarity and responsiveness. Excel log files were reviewed by faculty members, who confirmed that the files required no formatting changes for institutional use. The systems design emphasizes interoperability with legacy tools, including compatibility with spreadsheet importers, ERP systems, and institutional archiving workflows.

    3. Observed Limitations

    While the system demonstrated high reliability in structured environments, limitations were observed under certain edge conditions:

    • Slight degradation in accuracy under extreme shadows or backlight

    • Limited handling of occlusion (e.g., masks, turned faces)

    • Absence of anti-spoofing verification or 3D facial analysis

    These findings do not hinder system adoption but highlight areas for enhancement. Planned upgrades include illumination normalization, spoof detection using motion vectors, and secure cloud syncing for cross-campus deployment via platforms like Supabase.

  5. CONCLUSION

This work presents practical, modular, and offline-capable face educational institutions. Designed with lightweight components such as Haar Cascade achieves sub-two-second latency without relying on cloud infrastructure or dedicated GPUs. Deployed and validated under realistic constraints, it demonstrated over 94% recognition accuracy, seamless Excel log generation, and high usability among non-technical users. Unlike traditional methods like manual logs, RFID swipes, or fingerprint scanners, the proposed system requires no physical contact or external tokens. Its deployment footprint is minimaloperating through a standard laptop and webcam while still offering touchless interaction, automation, and high traceability. Faculty members confirmed its readiness for institutional use, while students reported a smooth, responsive interaction experience. The system supports modular growth, with distinct opportunities to enhance robustness and scope. Future development will include: Anti-spoofing mechanisms using motion vectors and liveness detection, Face normalization techniques to improve performance in poor lighting or occlusion, Secure cloud-based syncing of attendance logs using platforms like Supabase or Firebase, and Role-based access control through a JWT-protected admin portal.

Further work may also involve extending the system across multiple classrooms with centralized management, as well as benchmarking against deep learning-based face recognition frameworks in varied conditions. From an institutional standpoint, the proposed solution offers a scalable, cost-effective pathway toward biometric attendance automation with minimal operational disruption. By aligning real-time facial recognition with open-source principles, privacy-first architecture, and user-centric design, this system lays a strong foundation for modernizing attendance systems in academic and training

environments particularly in regions where bandwidth, cost, and infrastructure are primary constraints.

REFERENCES

  1. A. Desai, R. Patel, and V. Shah, Edge-based Facial Recognition Using Raspberry Pi and OpenCV DNN, International Journal of Embedded Systems and Applications, vol. 11, no. 1, pp. 1522, 2021.

  2. N. Kumar, A. Joshi, and S. Verma, Comparative Evaluation of Face Recognition Algorithms on Grayscale Datasets, Procedia Computer Science, vol. 187, pp. 453460, 2021.

  3. R. Arun, V. Shankar, and M. K. Singh, Real-Time Attendance Using HOG-SVM Based Face Detection, International Journal of Computer Applications, vol. 183, no. 16, pp. 15, 2021.

  4. R. Rathi and A. Sharma, YOLOv5 and DeepFace Based Smart Attendance System, Journal of Intelligent Systems, vol. 32, no. 3, pp. 378388, 2022.

  5. S. Alam and R. Gupta, FaceMesh and Firebase Powered Contactless Attendance Tracker, IEEE International Conference on Smart Technologies (ICST), pp. 289294, 2022.

  6. K. Huang, X. Zhou, and L. Wang, Lightweight Transformer for Face Recognition on Edge Devices, IEEE Access, vol. 10, pp. 87956 87965, 2022.

  7. Y. Lee, H. Park, and T. Kwon, Hybrid CNN-kNN Face Recognition with Visual Similarity Filtering, Sensors, vol. 21, no. 19, pp. 6558, 2021.

  8. S. Tripathi, A. Verma, and N. Rao, Multi-Angle Face Capture for Robust Classroom Attendance, International Journal of Artificial Intelligence and Education, vol. 32, no. 2, pp. 177 190, 2023.

  9. R. Patra and S. Singh, Dockerized Microservices for Face- Based HRMS Systems, International Conference on Distributed Computing and Networking (ICDCN), pp. 241 248, 2023.

  10. M. Ahmed, F. Azhar, and N. Baig, Federated Learning for On- Device Face Recognition, Journal of Computer Vision and Applications, vol. 45, no. 6, pp. 493504, 2022.

  11. T. Zhao and Y. Min, Pairwise Face Verification Using Siamese Neural Networks, Pattern Recognition Letters, vol. 158, pp. 105112, 2022.

  12. R. Singh, A. Dubey, and P. Jain, Performance Evaluation of LBPH and Deep Learning Algorithms on LFW Dataset, IEEE Transactions on Biometrics, Behavior, and Identity Science, vol. 3, no. 4, pp. 415 425, 2021.

  13. M. Nair, R. Thomas, and K. Babu, Offline Attendance System Using OpenCV and SQLite, International Journal of Scientific & Technology Research, vol. 10, no. 7, pp. 2021 2026, 2021.