About the Project
This project focuses on developing and evaluating an automated attendance tracking system leveraging a hybrid architecture. It combines on-device facial embedding extraction on a low-powered Raspberry Pi with cloud-based recognition and robust data management using AWS. The system aims to address the inefficiencies and inaccuracies of traditional attendance methods while optimizing for cost, privacy, and scalability.
The Problem We Address
Traditional attendance methods (manual logs, RFID cards) are often inefficient, prone to errors (forgotten cards, manual mistakes), time-consuming, and susceptible to fraudulent practices like buddy punching. Purely cloud-based facial recognition systems can suffer from high bandwidth usage, latency, and privacy concerns due to constant raw image transmission. Purely edge-based systems face limitations in processing power for large-scale database comparisons and managing reference data across multiple devices. Our project aims to develop a system that balances edge and cloud processing to mitigate these issues, achieving high accuracy, efficiency, scalability, and security while ensuring real-time feedback and mitigating privacy risks.
Our Solution: A Hybrid Approach
Our system employs a hybrid edge-cloud architecture:
- Edge Device (Raspberry Pi): Captures faces, detects them using OpenCV, and extracts facial embeddings locally using a custom-trained, optimized TFLite model. This minimizes raw data transmission.
- Secure Transmission: Embeddings are securely sent via HTTPS (with API Key authentication) to an AWS API Gateway endpoint.
- Cloud Backend (AWS):
- An AWS Lambda function is triggered to compare incoming embeddings against reference embeddings stored in DynamoDB using Euclidean distance.
- It checks for duplicate attendance logs for the current day (considering Colombo time zone).
- Attendance is recorded if a unique match is found.
- Real-time Feedback: Results (success, failure, already marked) are published back to the Raspberry Pi via AWS IoT Core using MQTT for immediate display on a local GUI.
- Enrollment & Management: A separate enrollment application (Python Flask web app) allows administrators to register new users, capture multiple facial images, and store averaged, normalized reference embeddings in the cloud. An admin dashboard provides visibility into attendance logs and user management.
System Architecture
The system follows a distributed architecture dividing tasks between the edge device and the cloud.

(Include diagrams for Data Flow, Process Flow, and Database Schema if you have them and want to show them.)
Key Features
- Real-time face detection and on-device embedding extraction.
- Secure embedding transmission to the cloud.
- Scalable cloud backend for comparison and attendance logging.
- Duplicate attendance prevention with time-zone awareness.
- Real-time feedback to the edge device.
- Dedicated enrollment application for user registration.
- Admin dashboard for viewing logs and managing users.
- Optimized TFLite model for efficient edge processing.
- Error handling and cooldown logic on the edge device.
Technology Stack
Edge Device (Raspberry Pi)
- Hardware: Raspberry Pi 4 Model B (8GB), Pi Camera v2
- OS: Raspberry Pi OS (64-bit)
- Software: Python
- Libraries: OpenCV, TFLite Runtime, Paho-MQTT, Requests, Picamera2, Tkinter, Pillow
Cloud Backend (AWS)
- API Gateway (REST API for embeddings)
- Lambda (Python for recognition logic)
- DynamoDB (NoSQL database for user data, embeddings, attendance logs)
- IoT Core (MQTT for real-time feedback)
- IAM (for secure access control)
- S3 (Potentially for storing enrollment images - optional)
Enrollment & Admin Dashboard
- Enrollment App: Python, Flask, HTML, CSS, JavaScript
- Admin Dashboard: Python, Flask, HTML, CSS, JavaScript, Boto3
Machine Learning Model
- Base Architecture: FaceNet (inspired by MobileNetV2)
- Framework: Keras/TensorFlow
- Deployment Model: TensorFlow Lite (TFLite) with float16 quantization
- Training Dataset: Subset of VGGFace2, custom augmentation
The Team (Group 7)
J. P. Balasooriya
ICT/20/810
Networking Technology
Key Contributions: Lead on-device software, AWS cloud backend architecture & configuration, enrollment app, admin dashboard, ML model training & evaluation.
B. V. S. Tharaka
ICT/20/943
Software Technology
(No Specific Contributions worth mentioning)
J. T. N. Perera
ICT/20/901
Software Technology
(Nothing worth mentioning, other than yapping)
Supervisors
Ms. Upeksha Hansani (Internal Supervisor), Lecturer, Department of ICT, Faculty of Technology, USJ
Dr. Nimal Skandhakumar (External Supervisor)
Conclusion & Future Work
This project successfully demonstrates a cloud-integrated, edge-optimized attendance tracking system using facial recognition. The hybrid architecture effectively balances on-device processing for privacy and efficiency with cloud capabilities for scalability and robust data management. The system achieves real-time performance, addresses key limitations of traditional and purely centralized/decentralized systems, and provides a practical solution for automated attendance. The individual contributions, particularly in developing the edge software, cloud backend, enrollment/admin tools, and the ML model pipeline, were integral to realizing the project's objectives.
Future Work
- Advanced Liveness Detection.
- Check-in / Check-out logic.
- Offline capabilities with embedding queueing on the edge.
- Integration with external HR systems.
- Advanced analytics and reporting.
- Handling multiple faces simultaneously in a single frame.