Background: Manual roll-call, paper registers, and RFID terminals remain the predominant attendance tools in academic and corporate settings. Each carries well-documented liabilities: they burden instructors, introduce transcription errors, and offer no reliable defence against proxy substitution [1]. In large classrooms or organisations, these traditional methods often consume valuable time that could otherwise be used for teaching or productive work. Additionally, manual systems require continuous supervision and maintenance, and the collected records are prone to loss, manipulation, or human error. RFID-based systems, although partially automated, still require individuals to carry identification cards and physically interact with a scanner, which may lead to card swapping or misuse.
A passive, camera-based approach resolves many of these shortcomings by capturing biometric identity non-intrusively from commodity hardware, without requiring any cooperative gesture from subjects. Advances in artificial intelligence and computer vision have enabled facial recognition systems to identify individuals accurately in real time, making them a practical solution for automated attendance monitoring. By leveraging these technologies, attendance can be recorded automatically when a person appears in front of the camera, thereby eliminating manual effort and minimizing the chances of proxy attendance.
Methods: The system is built exclusively in Python and combines OpenCV for live video streaming, face_recognition for 128-dimensional ResNet-based face embedding, and dlib\'s 68-point landmark predictor for Eye Aspect Ratio (EAR) liveness verification. Confirmed attendees are written to an SQLite3 database under a session-lock constraint that prevents duplicate entries. A Streamlit dashboard presents a live recognition feed, historical attendance charts generated by matplotlib, and one-click Excel export via openpyxl—all accessible through a browser on any networked device. The system also includes real-time logging, automated timestamp generation, and dataset management for registering new users, ensuring reliable data storage, faster recognition performance, and easy scalability for institutional deployment.
Results: Testing across 50 subjects under three controlled lighting conditions yielded a weighted mean accuracy of 95.8 %, peaking at 97.4 % under standard fluorescent light. Per-subject check-in latency averaged 0.8 s—a 5.4× improvement over manual roll-call. All 40 photographic spoofing attempts were blocked by the liveness module. Administrative reporting time decreased by 60 % through automated dashboard generation.
Conclusions: The proposed AI recognition attendance system demonstrates the potential of combining facial recognition technology with web-based dashboards to modernize traditional attendance management. The system is cost-effective, scalable, and easy to deploy using commonly available hardware such as webcams and standard computers. With further improvements, such as cloud storage, multi-camera support, and enhanced recognition algorithms, the system can be expanded to support large-scale institutional and corporate environments.
Introduction
This paper presents a vision-based, AI-powered attendance system that replaces traditional methods like roll calls, RFID cards, and fingerprint scanners with a camera-driven facial recognition pipeline built using Python.
It integrates OpenCV for real-time video capture, face_recognition (dlib-based deep embeddings) for identity matching, SQLite for secure attendance storage, and Streamlit for a live web dashboard, enabling a fully browser-based attendance management system without specialized hardware or GPUs.
A key contribution is the addition of a liveness detection module using Eye Aspect Ratio (EAR), which ensures that only real, live faces (not photos or spoofing attempts) are recorded. The system also uses a session-lock database constraint to prevent duplicate entries and maintain data integrity.
The system is modular (enrollment, detection, liveness, logging, dashboard), allowing independent upgrades of components. It operates efficiently on standard hardware, achieving about 95.8% overall accuracy, low false positives (<0.4%), and significantly faster check-in times compared to fingerprint systems and manual attendance.
Experimental results across different lighting conditions show strong performance, though accuracy decreases slightly under low light and extreme poses. Despite this, the system significantly improves speed, administrative efficiency, and automation, reducing report generation time by up to 60%.
Conclusion
This paper introduced an intelligent, Python-only attendance monitoring system that unifies real-time face recognition, EAR-based liveness detection, ACID-compliant session logging, and a Streamlit web dashboard within a single deployable codebase. Evaluation on a 50-subject cohort demonstrated a weighted mean recognition accuracy of 95.8 %, a per-subject check-in latency of 0.8 s, and complete rejection of all photographic spoofing attempts—outcomes that collectively resolve the principal deficiencies of prior Python-based systems.
The Streamlit interface eliminates the command-line dependency that restricts adoption of earlier prototypes, making the system fully operable by non-technical instructors through any browser. One-click Excel export and live attendance charts reduce post-session administrative effort by 60 % relative to manual compilation, delivering tangible operational value that extends beyond accuracy metrics alone.
Future development will prioritise five directions: (1) a mask-aware ArcFace model fine-tuned on occluded face data to recover accuracy under mask-wearing; (2) FAISS-based approximate nearest-neighbour indexing to sustain sub-second response times for cohorts exceeding 500 subjects; (3) Raspberry Pi 5 edge deployment through INT8 quantisation of the ResNet-34 backbone, eliminating the laptop dependency; (4) federated learning across distributed campus nodes to refresh enrollment embeddings without centralising raw biometric data; and (5) Streamlit multi-page architecture providing role-separated views for instructors, administrators, and students, with access controlled via OAuth2 tokens.
Collectively, these enhancements will advance the system toward institution-wide scalability while preserving the zero-licence, low-hardware-cost characteristics that distinguish it from proprietary biometric attendance solutions currently available on the market.
References
[1] S. Bhattacharyya, D. Bhattacharyya, and B. K. Pal, \"A real-time attendance system using RFID and facial recognition,\" in Proc. IEEE Int. Conf. Intelligent Systems and Signal Processing (ISSP), Gujarat, India, 2013, pp. 210–215.
[2] G. Bradski, \"The OpenCV library,\" Dr. Dobb\'s Journal of Software Tools, vol. 25, pp. 120–125, Nov. 2000.
[3] A. Geitgey, \"face_recognition: The world\'s simplest facial recognition API for Python,\" GitHub, 2017. [Online]. Available: https://github.com/ageitgey/face_recognition
[4] D. E. King, \"Dlib-ml: A machine learning toolkit,\" J. Mach. Learn. Res., vol. 10, pp. 1755–1758, 2009.
[5] M. A. Turk and A. P. Pentland, \"Face recognition using eigenfaces,\" in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), Maui, HI, USA, Jun. 1991, pp. 586–591.
[6] P. Viola and M. J. Jones, \"Robust real-time face detection,\" Int. J. Computer Vision, vol. 57, no. 2, pp. 137–154, May 2004.
[7] F. Schroff, D. Kalenichenko, and J. Philbin, \"FaceNet: A unified embedding for face recognition and clustering,\" in Proc. IEEE CVPR, Boston, MA, USA, Jun. 2015, pp. 815–823.
[8] J. Deng, J. Guo, N. Xue, and S. Zafeiriou, \"ArcFace: Additive angular margin loss for deep face recognition,\" in Proc. IEEE CVPR, Long Beach, CA, USA, Jun. 2019, pp. 4685–4694.
[9] M. A. Wani and F. A. Bhat, \"Face recognition-based automated student attendance system using OpenCV and Python,\" Int. J. Comput. Appl., vol. 182, no. 6, pp. 1–6, Mar. 2019.
[10] R. Jain and P. Gupta, \"Smart attendance management using facial recognition with Python,\" in Proc. Int. Conf. Computing, Communication and Networking Technologies (ICCCNT), Kharagpur, India, Jul. 2020, pp. 1–6.
[11] T. Soukupova and J. Cech, \"Real-time eye blink detection using facial landmarks,\" in Proc. 21st Computer Vision Winter Workshop (CVWW), Rimske Toplice, Slovenia, Feb. 2016, pp. 1–8.
[12] W. McKinney, \"Data structures for statistical computing in Python,\" in Proc. 9th Python in Science Conf. (SciPy), Austin, TX, USA, Jun. 2010, pp. 51–56.
[13] J. D. Hunter, \"Matplotlib: A 2D graphics environment,\" Comput. Sci. Eng., vol. 9, no. 3, pp. 90–95, May 2007.
[14] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, \"ImageNet: A large-scale hierarchical image database,\" in Proc. IEEE CVPR, Miami, FL, USA, Jun. 2009, pp. 248–255.
[15] A. Treuille, T. Teixeira, and A. Blank, \"Streamlit: A faster way to build and share data apps,\" Streamlit Inc., San Francisco, CA, 2019. [Online]. Available: https://streamlit.io
[16] S. Woo, J. Park, J.-Y. Lee, and I. S. Kweon, \"CBAM: Convolutional block attention module,\" in Proc. European Conf. Computer Vision (ECCV), Munich, Germany, 2018, pp. 3–19.