美文网首页
cosface: large margin cosine los

cosface: large margin cosine los

作者: 馒头and花卷 | 来源:发表于2020-07-06 21:41 被阅读0次

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 los

      本文链接:https://www.haomeiwen.com/subject/ggxnqktx.html