Probabilistic-Face-Embeddings
Probabilistic-Face-Embeddings copied to clipboard
Potential bug/issue in the loss function
Hi,
Thanks for this great work. Your paper is well written as well.
Based on your paper & code my understanding is as follows -
a) You construct a batch such that you have 4 images per class and there could be n number of classes. In your paper you mentioned using n=64
b) You want to compare images of the same class and compute the MLS Score. In other words, it is incorrect to compare images from different class.
c) You make use masking features to ensure you achieve the step (b)
However, it seems that you would have duplicate comparisons amongst the images of the same class. For e.g.
Let's say you have images x1,x2,x3 & x4 for a class C and when comparing you should only take the values as a result of following x1 - x2 x1 - x3 x1 - x4 x2 - x3 x2 - x4 x3 - x4
where as your code seem to doing -
x1 - x2 x1 - x3 x1 - x4 x2 - x1 <-- additional (same as x1 - x2 because you square them) x2 - x3 x2 - x4 x3 - x1 <--- additional x3 - x2 <---- additional x3 - x4 x4 - x1 <-- additional x4 - x2 <---- additional x4 - x3 <---- additional
There is a chance that I have misunderstood the code so please feel free to correct me.
Thanks again for your great work
Regards Kapil