All work

04Computer vision

Automated attendance with face recognition

A camera takes attendance — and has to see you twice before it counts.

Status
Academic project · complete
Platform
Python · OpenCV · Keras
Period
2024 · CUSAT
Role
Academic project at CUSAT.
  1. Webcam
  2. YOLOv8 face
  3. VGG19 + dlib
  4. Seen twice
  5. CSV
pause
window A · frames 1–10window B · frames 11–20

01

Overview

An academic computer-vision project that replaces roll-call with a webcam. Faces are detected, recognised by two independent methods, and a student is only marked present when both agree across two separate capture windows.

02

The problem

Manual attendance invites human error, proxies and favouritism, and wastes class time. The aim was a real-time tracker that is hard to fool with a proxy.

03

What it does

  • Live webcam capture over 20 frames in two windows, separated by a pause
  • Face detection with a YOLOv8 face model
  • Recognition by a VGG19 transfer-learning classifier and by face-embedding matching
  • Attendance written to a dated CSV with roll number and time, without duplicates

04

How it works

  1. 01

    Capture

    OpenCV reads frames from the webcam in two windows (frames 1–10, a pause, frames 11–20).

  2. 02

    Detect

    YOLOv8n-face finds faces; each crop is resized to 224 × 224.

  3. 03

    Classify

    A VGG19 network (ImageNet weights frozen, new softmax head, trained with augmentation) must be over 99 % confident.

  4. 04

    Match

    In parallel, face_recognition (dlib) compares 128-d encodings against known faces at a tolerance of 0.54.

  5. 05

    Verify & record

    Only people recognised in both windows are marked present; their roll number and time are appended to the day's CSV.

05

Decisions

Two windows against proxies

A photo held up for a moment shouldn't count: a person must be recognised in both capture windows.

Two recognisers, not one

A deep classifier and an embedding matcher fail differently, so requiring both cuts false positives.

Transfer learning

With only a class-sized dataset, reusing a frozen ImageNet-trained VGG19 base and training just a new head needs far less data than training a network from scratch.

06

Built with

PythonOpenCVface_recognition (dlib)Ultralytics YOLOv8Keras / TensorFlowVGG19pandas

07

How this was built

An academic project from my B.Tech at CUSAT (2024), before AI coding assistants were part of my workflow.

The repository's training images and class list belong to classmates and are never shown here.