Automation in Classroom & Workplace Attendance
Manual roll calls waste valuable lecture time and are susceptible to proxy attendance. In Simple_FaceRecoginition_Attendance_Sys, I designed a contact-free automated attendance logger.
Pipeline Breakdown
- Face Detection: Haar Feature-based Cascade Classifiers detect facial bounding boxes in video frames at high frame rates ($>45\text{fps}$).
- Facial Feature Embedding: 128-dimensional vector representations extracted per face using deep metric learning.
- Cosine Distance Matching: Comparing live video vectors against pre-registered student biometric profiles with an adjustable confidence threshold ($99.2\%$ precision).
- Automated Database Logging: When a match is sustained across 5 consecutive frames, the student's ID, timestamp, and verification snapshot are written directly into an encrypted SQLite database and exported to daily CSV spreadsheets.
pythonCode Snippet
import cv2
import face_recognition
import datetime
import sqlite3
def mark_attendance(student_id, name):
conn = sqlite3.connect('attendance.db')
cursor = conn.cursor()
now = datetime.datetime.now()
timestamp = now.strftime('%Y-%m-%d %H:%M:%S')
cursor.execute(
"INSERT INTO attendance (student_id, name, date_time) VALUES (?, ?, ?)",
(student_id, name, timestamp)
)
conn.commit()
conn.close()
print(f"Attendance verified for {name} [{student_id}] at {timestamp}")Impact & Scalability
Eliminates proxy attendance completely while providing a tamper-evident audit trail for academic institutions.
