πŸ€– LateAI
Home β€Ί Tutorials β€Ί Face Attendance
🏫

Face Attendance

Intermediate Β· Half a day
πŸ“Ά Intermediate ⏱ Half a day πŸ’° Free (software only) 🏷 CV Zone

πŸ“Œ Overview

Point a camera at a face and it clocks you in automatically: enroll each person's facial features first, then every time that face appears it logs the name and the check-in time to build an attendance record.

It uses OpenCV with face_recognition (or MediaPipe FaceMesh plus encoding comparison) for feature extraction and matching, and writes the results to a CSV or Excel sheet - the standard approach for a beginner-level face recognition application.

🧰 What you need

πŸ”§ Step by step

1

Install the dependencies

face_recognition depends on dlib, which is fiddly to install - follow the official instructions

MediaPipe or OpenCV LBPH are lighter alternatives

2

Build the face database

Prepare one clear front-facing photo per person

Extract the 128-dimensional face encoding and store it in memory or on disk

3

Recognise in real time

Detect and encode faces on every camera frame

Compare against the database by distance and treat anything below the threshold as a match

4

Prevent duplicate check-ins

Remember the last check-in time and ignore the same person within a short window

Keep a dictionary of name to last check-in time

5

Write the attendance sheet

Write name, time, and date to a CSV

It can be extended into a per-day summary report

6

On-screen feedback

Draw the face box and show the name and check-in status live

Add a check-mark badge for a more complete experience

πŸ’‘ Tips

View original β†— ← Back to LateAI home