Back to projects
Python / OpenCV / dlib / Flask Computer vision project

Face Recognition Attendance System

A webcam-based attendance prototype using face recognition and duplicate-entry prevention.

Overview

This prototype uses Python, OpenCV, dlib, and Flask to recognise faces from a webcam stream. It compares face embeddings with a prepared dataset, records attendance timestamps in CSV, prevents repeat entries within the same session, and presents the log in a web dashboard.

Challenge

Manual attendance takes time and can produce incomplete or duplicate records. Dedicated scanning hardware also adds cost and can create queues at a single checkpoint.

Solution

The system uses a standard webcam and a face-embedding pipeline to match people against the dataset. Attendance logic checks existing records before writing a new timestamp, while Flask provides a simple monitoring interface.

Key features

  • Face detection and matching Detects faces from the webcam feed and compares them with registered images.
  • Landmarks and embeddings Uses 68 facial landmarks and 128-dimensional embeddings for face representation.
  • Attendance logging Writes recognised names and timestamps to CSV after checking for duplicates.
  • Monitoring dashboard Displays recognised users and attendance timestamps through a Flask web interface.

Process

  1. OpenCV reads frames from the webcam.
  2. dlib detects, aligns, and encodes each face.
  3. The system matches the embedding and checks for an existing entry.
  4. A new timestamp is written to CSV and shown in Flask.