/facenet-implementation

Implementation of paper: FaceNet: A Unified Embedding for Face Recognition and Clustering

Primary LanguagePython

FaceNet implementation

Problem satement

In this Project we implemented Google's FaceNet , that directly learns a mapping from face images to a compact Euclidean space where distances directly correspond to a measure of face similarity.

Datasets

Steps

  • Install all datasets and models using
bash scripts.sh
  • Start the training script
python3 ./Code/train.py
  • Evaluate Results
python3 ./Code/eval_model.py

Model will be generated under the name checkpoint.pth

Results

  • Summary

Margin = 1.7 Margin = 1.9
kNN 75.5 79.55 (VggFace2)
Contrastive 88.23 89.33 (LFW)
Rank5 57.9(LFW) / 70.17 (VggFace2) 57.85 (LFW) / 72.33 (VggFace2)
Loss 0.1013 (LFW) / 0.0391 (VggFace2) 0.1867 (LFW) / 0.1111 (VggFace2)
  • TSNE Plot of different identities in VGG Face 2 dataset

TSNE plot

  • RESNET50 RESULTS(MARGIN:0.7)

    • Accuracy:

    TSNE plot

    • Loss

    TSNE plot

  • RESNET50 RESULTS(MARGIN: 1.9)

    • Accuracy:

    TSNE plot

    • Loss

    TSNE plot