FaceNet: A Unified Embedding for Face Recognition and Clustering
About
Despite significant recent advances in the field of face recognition, implementing face verification and recognition efficiently at scale presents serious challenges to current approaches. In this paper we present a system, called FaceNet, that directly learns a mapping from face images to a compact Euclidean space where distances directly correspond to a measure of face similarity. Once this space has been produced, tasks such as face recognition, verification and clustering can be easily implemented using standard techniques with FaceNet embeddings as feature vectors. Our method uses a deep convolutional network trained to directly optimize the embedding itself, rather than an intermediate bottleneck layer as in previous deep learning approaches. To train, we use triplets of roughly aligned matching / non-matching face patches generated using a novel online triplet mining method. The benefit of our approach is much greater representational efficiency: we achieve state-of-the-art face recognition performance using only 128-bytes per face. On the widely used Labeled Faces in the Wild (LFW) dataset, our system achieves a new record accuracy of 99.63%. On YouTube Faces DB it achieves 95.12%. Our system cuts the error rate in comparison to the best published result by 30% on both datasets. We also introduce the concept of harmonic embeddings, and a harmonic triplet loss, which describe different versions of face embeddings (produced by different networks) that are compatible to each other and allow for direct comparison between each other.
Key insights
How does FaceNet learn face similarity?
FaceNet trains a neural network with triplets of face images to produce 128-dimensional embeddings. Distances between those embeddings represent similarity, letting the same representation support face verification, recognition and clustering.
What distinguishes it from prior deep face methods?
Unlike DeepFace/DeepId2+ which use bottleneck layers plus PCA and SVM, FaceNet directly optimizes a compact 128-byte embedding via online triplet mining. On LFW it achieves 99.63%, cutting DeepId2+ error by 30%.
What practical uses does the embedding enable?
The compact 128-byte representation suits large-scale clustering and recognition. The tiny NNS2 model runs at 30ms per image on mobile phones for face clustering, and harmonic embeddings allow cross-model compatibility for upgrades.
What limitations do the authors note?
Training is extremely long (1,000–2,000 CPU-cluster hours), with accuracy still improving after 500h. The authors note noisy ground-truth labels affect low-FAR evaluation, and future work targets reducing model size, CPU needs, and training time.