cosface: large margin cosine loss for deep face recognition

目录

Wang H, Wang Y, Zhou Z, et al. CosFace: Large Margin Cosine Loss for Deep Face Recognition[C]. computer vision and pattern recognition, 2018: 5265-5274.

@article{wang2018cosface:,

title={CosFace: Large Margin Cosine Loss for Deep Face Recognition},

author={Wang, Hao and Wang, Yitong and Zhou, Zheng and Ji, Xing and Gong, Dihong and Zhou, Jingchao and Li, Zhifeng and Liu, Wei},

pages={5265--5274},

year={2018}}

本文从angular margin角度提出了对交叉熵损失的一个改进.

主要内容

一般的softmax交叉熵损失为

\[L_s = \frac{1}{N}\sum_{i=1}^N -\log \frac{e^{f_{y_i}}}{\sum_{j=1}^C e^{f_{y_j}}},
\]

其中

\[f_j = W^T_jx=\|W_j\| \|x\| \cos \theta_j,
\]

固定\(\|W_j\|=1, \|x\|=s\), 则

\[L_{ns} = \frac{1}{N} \sum_i -\log \frac{e^{s\cos(\theta_{y_i},i)}}{\sum_j e^{s \cos(\theta_{y_j}, i)}}
\]

只与角度angular margin有关, 所以实际上, 一个类别属于\(i\)就是当

\[\cos \theta_i > \cos \theta_j, \forall j\not = i,
\]

为了给其增加一些难度, 我们可以

\[\cos \theta_i - m > \cos \theta_j, \forall j\not = i,
\]

即我们在\(\cos \theta_i > \cos \theta_j\)的基础上, 进一步要求其angular margin进一步提高, 这就是large angular margin的思想.

于是本文的损失为:

cosface: large margin cosine loss for deep face recognition

上一篇:JAVA GUI学习 - JPopupMenu鼠标右键菜单组件学习


下一篇:HDU 4387 Stone Game (博弈)