A Facial Recognition Attendance System with Anti-Spoofing Measures
Notice: This is a sample project for study and reference. Submitting it as your own work violates most universities' academic integrity policies.
Abstract
About This Research Topic
A facial recognition attendance system sounds foolproof until someone simply holds up a photo to the camera. That's the gap most systems leave open, and it's exactly what this study set out to close — building a system that checks not just who is in front of the camera, but whether they're actually there, live, in the flesh. This piece walks through how a dedicated anti-spoofing stage was built, benchmarked, and combined with face recognition into a working attendance system. Readers interested in how applied machine learning performs on other real-world classification problems may also want to look at our project on predicting hospital readmission rates with machine learning, which covers a different domain but a similarly structured evaluation approach.
What follows carries the full research structure — background, problem statement, aim and objectives, research questions, significance, scope, and definitions — rebuilt for a wider readership while preserving the original study's technical focus and reported results.
Main Abstract
Manual and card- or fingerprint-based attendance systems remain widely used in academic and workplace settings despite well-documented weaknesses: manual roll-call is time-consuming and susceptible to proxy attendance, while card- and fingerprint-based systems, though automated, still permit proxy attendance through credential sharing and raise hygiene concerns in shared-device settings. Facial recognition offers a contactless, difficult-to-share biometric alternative, but a system that only performs identity matching remains vulnerable to presentation attacks, in which an impostor presents a printed photograph, a video replay, or a mask of an enrolled individual in place of their own live face. This study addresses that problem by designing, implementing, and evaluating a facial recognition-based attendance system that incorporates an explicit anti-spoofing (liveness detection) stage, ensuring attendance is recorded only for a live, physically present individual rather than a static or replayed representation. Following the Design Science Research methodology combined with the Cross-Industry Standard Process for Data Mining, a face-recognition enrolment dataset of 40 volunteer individuals (roughly 25 images per individual, captured under varied lighting and pose) was combined with the publicly available CelebA-Spoof dataset for anti-spoofing model training, comprising live and spoof (print, replay, and cut-photo) face images. Face detection used a Multi-task Cascaded Convolutional Network, face recognition embeddings were generated using a pretrained FaceNet model, and identity matching was performed via cosine-similarity comparison against enrolled embeddings. For anti-spoofing, a MobileNetV2-based binary CNN classifier was benchmarked against a classical Local Binary Pattern texture baseline with an SVM classifier, and an eye-blink-based liveness heuristic using the Eye Aspect Ratio. The MobileNetV2 anti-spoofing model achieved the best performance — 97.8% accuracy, 97.2% precision, 98.1% recall, and a 97.6% F1-score on a held-out test set spanning print, replay, and cut-photo attacks — outperforming the LBP+SVM baseline (89.4% accuracy) and the EAR-based blink heuristic (81.7% accuracy, and specifically vulnerable to video replay attacks that include natural blinking). The face-recognition component achieved a rank-1 identification accuracy of 98.5% and a false acceptance rate of 0.6% on the 40-person enrolment set. The combined system, implemented as a desktop/web-hybrid application using OpenCV for camera capture, achieved an average end-to-end attendance-marking time of 1.1 seconds per individual. The study concludes that combining a dedicated CNN-based anti-spoofing stage with embedding-based face recognition substantially improves resistance to common presentation attacks relative to either face recognition alone or simple heuristic liveness checks, and recommends periodic model updates and expansion to 3D-mask attack resistance as directions for future work.
Chapter One Preview
Background to the Study
Accurate attendance tracking is a routine but important administrative function in academic institutions and workplaces, underpinning everything from continuous assessment eligibility to payroll processing. Traditional attendance methods, principally manual roll-call and paper sign-in sheets, are time-consuming to administer for large classes or workforces and are vulnerable to proxy attendance, in which one individual answers or signs in on behalf of an absent colleague. Card-based and fingerprint-based biometric systems automate the recording process but remain vulnerable to credential sharing and, for fingerprint systems, raise hygiene concerns in high-throughput shared-device settings.
Facial recognition has emerged as an attractive contactless alternative, since a face is inherently tied to a specific individual and cannot be physically handed to another person the way a card or password can. However, a facial recognition system that performs identity matching alone remains vulnerable to presentation attacks (also called spoofing attacks), in which an impostor presents a printed photograph, a video replay on a second screen, or a cut-out photo mask of an enrolled individual's face to the camera — potentially deceiving a recognition-only system into recording attendance for someone who isn't actually present. This vulnerability has driven substantial research into face anti-spoofing, or presentation attack detection, which aims to distinguish a live, physically present face from a spoofed representation before recognition even proceeds. This study contributes to that body of work by designing a complete attendance system that incorporates an explicit anti-spoofing stage ahead of identity matching, and by empirically benchmarking that anti-spoofing component against both a classical texture-based baseline and a simple heuristic eye-blink check commonly used in less rigorous implementations. Independent evaluation efforts such as NIST's Face Recognition Vendor Test underscore just how central rigorous, standardised benchmarking is to trusting face recognition systems in practice, a principle this study applies at a smaller scale to its own anti-spoofing evaluation.
Statement of the Problem
A substantial number of published and deployed facial recognition attendance systems focus primarily, or exclusively, on the identity-matching component, treating anti-spoofing as an optional add-on or omitting it entirely — leaving such systems vulnerable to straightforward presentation attacks using a printed photograph or a replayed video of an enrolled individual. Where anti-spoofing is included, many implementations rely on simple heuristic cues, such as eye-blink detection, which, while inexpensive to compute, are documented in the literature to be vulnerable to video replay attacks that naturally include blinking, and are less robust than dedicated, data-driven anti-spoofing models trained explicitly to distinguish live and spoofed face texture and depth cues.
This study addresses the problem by treating anti-spoofing as a first-class, rigorously evaluated component of the system rather than an afterthought, benchmarking a dedicated CNN-based anti-spoofing model against both a classical texture-based baseline and a heuristic blink-detection approach, using an evaluation protocol that specifically includes video replay attacks to test the documented weakness of blink-based heuristics.
Aim and Objectives
The aim of this study is to design, implement, and evaluate a facial recognition-based attendance system that incorporates a dedicated anti-spoofing stage to prevent presentation-attack-based proxy attendance. The specific objectives are to:
1. Review existing literature and systems relevant to facial recognition attendance systems and face anti-spoofing/liveness detection techniques.
2. Assemble a face enrolment dataset for a target population of volunteer individuals, and combine it with a public anti-spoofing dataset for training the liveness detection component.
3. Implement a face detection and recognition pipeline using a pretrained face detector and embedding model.
4. Train and compare anti-spoofing approaches (CNN-based, classical texture+SVM, and heuristic eye-blink detection) for distinguishing live from spoofed face presentations.
5. Integrate the anti-spoofing and face recognition components into a unified attendance-marking pipeline requiring both liveness and identity verification to succeed.
6. Implement and evaluate a camera-based application that captures a live video feed, performs liveness and identity verification, and records attendance.
7. Evaluate the overall system through anti-spoofing and recognition performance metrics, end-to-end response-time testing, and a usability assessment.
Research Questions
1. What face recognition and anti-spoofing techniques have been applied to attendance and biometric authentication systems in existing literature, and what are their reported strengths and limitations?
2. How does a dedicated CNN-based anti-spoofing model compare with a classical texture-based baseline and a heuristic eye-blink detection approach in distinguishing live from spoofed face presentations, including video replay attacks?
3. What is the identification accuracy and false acceptance rate of the face recognition component on the study's enrolment population?
4. What is the end-to-end response time of the combined liveness-and-identity verification pipeline?
5. What is the perceived usability of the deployed attendance-marking application among test users?
Significance of the Study
This study is significant to several stakeholder groups. To academic departments and organisations seeking to modernise attendance tracking, the system offers a contactless, difficult-to-proxy alternative to manual or card-based methods, with an explicit safeguard against the presentation-attack vulnerability that affects recognition-only systems. To the academic community, the study contributes an empirical, same-protocol comparison of CNN-based, classical, and heuristic anti-spoofing approaches, explicitly including video replay attacks in the evaluation to test a documented weakness of blink-based heuristics that application-focused literature doesn't always address.
To systems designers, the study offers a concrete, evaluated example of integrating a dedicated anti-spoofing stage into an identity-verification pipeline as a mandatory precondition for a security-sensitive action, rather than as an optional or absent safeguard. Researchers building a comparable applied computer vision study may find it worth working through their own methodology and evaluation protocol with ScholarNest's research coaching support.
Scope of the Study
This study is limited to 2D presentation attack detection (print, digital photo, and video replay attacks) and does not address 3D mask attacks, which require depth-sensing hardware beyond the standard RGB camera used here. The face recognition component is evaluated on a 40-person volunteer enrolment set under laboratory/office lighting conditions typical of an indoor academic or workplace environment. The study covers the complete pipeline from dataset assembly, through anti-spoofing and recognition model development and benchmarking, to the implementation of a camera-based attendance application and system-level testing. It does not extend to large-scale (hundreds or thousands of enrolled individuals) identification performance evaluation, integration with a production-grade access-control or payroll system, or infrared/depth-camera-based liveness detection, though these are identified as directions for further work.
Operational Definition of Terms
Facial Recognition
The automated process of identifying an individual from a digital image or video frame of their face, by comparing extracted facial features against a database of enrolled identities.
Anti-Spoofing / Liveness Detection
The process of determining whether a face presented to a camera belongs to a live, physically present individual, as opposed to a photograph, video replay, or other artificial representation.
Presentation Attack
An attempt to deceive a biometric system by presenting an artefact, such as a printed photo or video replay, rather than a live biometric characteristic.
Face Embedding
A fixed-length numeric vector representation of a face, generated by a trained neural network, such that embeddings of the same individual's face are close together in vector space.
False Acceptance Rate (FAR)
The proportion of impostor (non-matching) identity comparisons incorrectly accepted as a match by the system.
False Rejection Rate (FRR)
The proportion of genuine (matching) identity comparisons incorrectly rejected as a non-match by the system.
Eye Aspect Ratio (EAR)
A geometric ratio computed from facial landmark points around the eye, used as a simple heuristic signal for detecting eye blinks as a liveness cue.
Conclusion
The gap in most facial recognition attendance systems was never the recognition part — matching a face to an enrolled identity is a well-solved problem. The gap was checking whether that face was actually there. This study's results make the case clearly: a dedicated CNN-based anti-spoofing model, trained on datasets including CelebA-Spoof, closes that gap far more reliably than either a classical texture baseline or the eye-blink heuristic still common in lighter-weight implementations — and the blink heuristic's specific vulnerability to video replay attacks is exactly the kind of failure mode that matters most once someone actually tries to exploit it. Combined with fast enough response times for real classroom or office use, the system shows that liveness detection doesn't have to be an afterthought bolted onto recognition — it can be built in as a genuine precondition from the start. Readers researching related applied computer vision or biometrics questions can find further comparative material in our computer science project topics library.
Frequently Asked Questions
1. What is a presentation attack in facial recognition?
It is an attempt to deceive a face recognition system by presenting an artefact, such as a printed photo, a video replay, or a photo mask, instead of a live physical face.
2. Why isn't eye-blink detection considered a reliable anti-spoofing method?
Eye-blink detection is vulnerable to video replay attacks, since a recorded video of an enrolled person naturally includes blinking, defeating a system that relies on blinking alone as its liveness signal.
3. Which anti-spoofing model performed best in this study?
A MobileNetV2-based CNN classifier achieved the best performance, with 97.8% accuracy, 98.1% recall, and a 97.6% F1-score, outperforming both a classical texture-based baseline and the eye-blink heuristic.
4. What is the CelebA-Spoof dataset?
It is a large, publicly available face anti-spoofing dataset containing both live and spoofed (print, replay, and cut-photo) face images, used here to help train the anti-spoofing model.
5. How accurate was the face recognition component of the system?
The face recognition component achieved a rank-1 identification accuracy of 98.5% and a false acceptance rate of 0.6% on the 40-person enrolment set.
6. How fast is the combined liveness-and-recognition attendance check?
The combined system achieved an average end-to-end attendance-marking time of 1.1 seconds per individual, covering detection, liveness check, and recognition.
7. What is the difference between face recognition and liveness detection?
Face recognition determines who a person is by matching their face against enrolled identities, while liveness detection determines whether the face presented belongs to a live, physically present person rather than a photo or video.
8. Does this system protect against 3D mask attacks?
No — the study is limited to 2D presentation attack detection (print, digital photo, and video replay) and does not address 3D mask attacks, which would require depth-sensing hardware beyond a standard RGB camera.
9. What models were used for face detection and recognition?
Face detection used a Multi-task Cascaded Convolutional Network, and face recognition embeddings were generated using a pretrained FaceNet model, with identity matching performed via cosine-similarity comparison.
10. Could this kind of system replace card- or fingerprint-based attendance entirely?
It offers a genuinely contactless, hard-to-proxy alternative, though the study notes that further work on larger enrolment populations and stronger attack resistance would be needed before large-scale production deployment.
Purchase to unlock the full material.
