All Projects
Computer Vision

Face Recognition Person Search

Zero-shot face recognition with pretrained dlib ResNet-50 (VGGFace2) embeddings. Searches 13,233 LFW images via 128-d Euclidean distance. 18/19 correct matches at tolerance 0.55. No training required.

94.7% (18/19)
Recall (query folder)
128-d
Embedding dimension
0.55
Threshold
None
Training required
Dataset

LFW: 13,233 images, 5,749 identities (deep-funneled)

Approach

Pretrained VGGFace2 embeddings + Euclidean distance search — zero-shot

Tech Stack
Pythondlib (ResNet-50)face_recognitionOpenCVLFW dataset
Keywords
Face RecognitiondlibResNet-50VGGFace2LFWZero-shotMetric Learning
Visualizations6 Charts
Deep Dive

Zero-shot face recognition — pretrained dlib ResNet-50 (VGGFace2) with Euclidean distance search.

Dataset

  • LFW (Labeled Faces in the Wild): 13,233 images, 5,749 identities
  • Deep-funneled pre-aligned variant
  • Query selection: identities with ≥10 photos (random seed 42)

3-Step Pipeline

  1. Auto-select query person (≥10 photos available)
  2. Extract 128-d ResNet-50 embedding for anchor image
  3. Search entire person folder: Euclidean distance → threshold @ 0.55

Results (Query: Abdullah_Gul)

MetricValue
Photos available19
Matched correctly18 / 19 (94.7% recall)
Distance range0.000 → 0.493
Threshold0.55
Inference modeHOG (CPU, fast)

Why Zero-Shot Works ResNet-50 trained on VGGFace2 (3M+ face images, 9K identities) learns a face embedding space where the same person clusters tightly regardless of lighting, pose, or aging. The metric learning objective ensures inter-identity distances are larger than intra-identity distances — even for identities never seen during training.

Enhancement (Optional) Average embeddings from multiple query photos → more robust anchor representation. Reduces sensitivity to a single pose/lighting condition.