MagFace
MagFace copied to clipboard
Add Magface loss to the insightface's partial FC
It's a great job!
I'm currently trying to add the Magface loss to the insightface's partial FC, but it doesn't work. The x_norm is getting larger during training between 30 and 40, resulting in a larger margin between 0.5 and 0.6. The model is trained from scratch. I tried to adjust the weight of LG or the sample_rate of partial FC but it still didn't work.
I checked your log and found that x_norm is pulled back to a certain interval instead of increasing. But my x_norm will keep getting larger. How do I need to deal with this problem?
notice: I have added easy margin processing
I look forward to your reply and suggestions!
Hi,
Thank you for your interests in our work. Bases on your description, I think m(ai) may not work properly as m(ai) decreases magnitudes while g(ai) increases them. Could you double-check the gradient is correct in your implementation?
Eq. 4 in NormFace provides the gradient of i-th entry in feature x. Following their notations, the gradient for MagFace can be wrote as follows (may be incorrect. please check them by your own). The key here is to add the gradient of xi brought by the magnitude a.
Hi, I tried to do the same thing with you, could you please show me your code?
@face-competition I also need code of MagFace, please help me out
marigoold
i also need code of Magface of partial fc,please show me you code
@face-competition I also need code of MagFace, please help me out
i also need code of Magface of partial fc,please show me you code
i also need code of Magface of partial fc,please show me you code
https://github.com/IrvingMeng/MagFace/issues/20#issuecomment-888032861