ydwen / opensphere

A hyperspherical face recognition library based on PyTorch
https://opensphere.world/
MIT License
268 stars 29 forks source link

Question on sphereface implementation #19

Closed lizhenstat closed 1 year ago

lizhenstat commented 1 year ago

Hi, I have a question on sphereface implementation. In this SphereFace-Revived paper, the 4-th row in Table-1, the characteristic function delta(theta)=ita(theta)-psi(theta) however in the implementation, it is as follows

d_theta = phi_theta - cos_theta

which I am confused.

In the implementation of SphereFaceR_H with "v2" type of magnitude. The code follows the equation in Table-1

Any help would be appreciated and thanks for your time.

ydwen commented 1 year ago

Hi Lizhen,

Sorry for the confusion. These two deltas denote different terms in our loss function.

The delta in table 1 is to show the difference between the positive and negative logits. While the delta in our implementation is used for a detach operator. You could understand them as different terms.