2025 • Project

Face Verification — Metric vs Supervised Learning

Compared metric learning and supervised classification pipelines for facial verification; deployed embedding-based model with real-time webcam inference.

Problem

Determine whether metric learning or supervised classification is more effective for face verification, and deploy the optimal model for real-time use.

Approach

  • Dataset: loaded Kaggle competition dataset; split into train/val/test; resized to 160×160.
  • Metric learning: custom CNN backbone producing 128-dim L2-normalised embeddings; trained with triplet loss; tuned batch size, learning rate, and epochs.
  • Supervised learning: EfficientNetV2B0 backbone + GAP + dense softmax head; AdamW optimiser, early stopping, and LR reduction on plateau.
  • Evaluation: ROC curves, AUC scores, confusion matrix for supervised model; embedding distance threshold tuning for metric learning.
  • Deployment: integrated best embedding model into OpenCV webcam loop; added live capture and naming system; emotion & anti-spoofing via DeepFace.

Outcomes

  • Metric learning model achieved >0.97 AUC on verification task with tuned threshold.
  • Supervised EfficientNetV2B0 reached >94% classification accuracy.
  • Deployed metric learning model; successfully recognised enrolled users in live tests.

Links