tamerthamoqa / facenet-pytorch-glint360k

A PyTorch implementation of the 'FaceNet' paper for training a facial recognition model with Triplet Loss using the glint360k dataset. A pre-trained model using Triplet Loss is available for download.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions about L2 Normalization

riverHu233 opened this issue · comments

Hi @tamerthamoqa ,
I'm curious about L2 Normalization, which would constrain the embedding into an euclidean feature space and 图片, so the maximum distance of two features in feature space shouldn't be 2? why the threshold is from 0.0 to 4.0?
Thanks!

Hi @tamerthamoqa
I thought I got it, the reason why the threshold is from 0.0 to 4.0 is that 2 different features belong to different feature space, and the minimum distances of these two features is 4.0, bigger than that , the features can seperately for sure. Thanks for the project!

Hello riverHu233,

My interpretation might be incorrect, but according to the facenet paper (description of figure 1) it implies that the squared l2-norm space might be [0, 4] though please keep in mind I am not sure about this since I haven't looked too deeply into this matter. There are discussion threads about this topic in the David Sandberg 'facenet' github repository but I haven't found a clear answer, at least, from what I remember.

From what I have seen, all pytorch implementations of facenet on github use the same threshold range so that is the main reason why I went with that range, but to be honest, I need to look into it to get a clearer understanding myself.