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.
- Webcam
- YOLOv8 face
- VGG19 + dlib
- Seen twice
- CSV
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
- 01
Capture
OpenCV reads frames from the webcam in two windows (frames 1–10, a pause, frames 11–20).
- 02
Detect
YOLOv8n-face finds faces; each crop is resized to 224 × 224.
- 03
Classify
A VGG19 network (ImageNet weights frozen, new softmax head, trained with augmentation) must be over 99 % confident.
- 04
Match
In parallel, face_recognition (dlib) compares 128-d encodings against known faces at a tolerance of 0.54.
- 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
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.