关于A-softmax loss的超球体解释可以参考这一篇文章:SphereFace的翻译,解读以及训练https://blog.csdn.net/qianqing13579/article/details/78288780

2017的一篇cvpr,SphereFace: Deep Hypersphere Embedding for Face Recognition,继centerloss之后又一大作。

文章主要提出了归一化权值(normalize weights and zero biases)和角度间距(angular margin),基于这2个点,对传统的softmax进行了改进,从而实现了,最大类内距离小于最小类间距离的识别标准。

 

 

原始的softmax的loss损失是一个互熵损失,

SphereFace: Deep Hypersphere Embedding for Face Recognition

其中,

SphereFace: Deep Hypersphere Embedding for Face Recognition

将其代入第一个式子,得出了损失函数如下,

SphereFace: Deep Hypersphere Embedding for Face RecognitionSphereFace: Deep Hypersphere Embedding for Face Recognition

进行归一化操作,将其都映射到一个单位球面上,令||W||=1,b=0,并且引入夹角,得出Modified Softmax Loss公式如下,

SphereFace: Deep Hypersphere Embedding for Face Recognition

SphereFace: Deep Hypersphere Embedding for Face Recognition

在此基础上,再引入angular margin,用m表示,最终产生A-softmax的loss公式

SphereFace: Deep Hypersphere Embedding for Face Recognition

SphereFace: Deep Hypersphere Embedding for Face Recognition

在LFW和YTF数据集上的识别率分别如下图所示,可以看出LFW已经达到了99.42的识别率。

SphereFace: Deep Hypersphere Embedding for Face Recognition

这里分析一下,作者A-softmax 的参数,

SphereFace: Deep Hypersphere Embedding for Face Recognition

在margin_inner_product_layer.cpp的Forward_cpu函数中,

SphereFace: Deep Hypersphere Embedding for Face Recognition

也就是说,SphereFace: Deep Hypersphere Embedding for Face Recognition

计算出来也就是说,lambda=5(iteration>1658)lambda=大于5的值(iteration<1658)


训练过程loss下降如下,

SphereFace: Deep Hypersphere Embedding for Face Recognition 


自己在LFW上10折测试的结果如下,

SphereFace: Deep Hypersphere Embedding for Face Recognition


reference:

https://github.com/wy1iu/sphereface

2017的一篇cvpr,SphereFace: Deep Hypersphere Embedding for Face Recognition,继centerloss之后又一大作。

文章主要提出了归一化权值(normalize weights and zero biases)和角度间距(angular margin),基于这2个点,对传统的softmax进行了改进,从而实现了,最大类内距离小于最小类间距离的识别标准。

 

 

原始的softmax的loss损失是一个互熵损失,

SphereFace: Deep Hypersphere Embedding for Face Recognition

其中,

SphereFace: Deep Hypersphere Embedding for Face Recognition

将其代入第一个式子,得出了损失函数如下,

SphereFace: Deep Hypersphere Embedding for Face RecognitionSphereFace: Deep Hypersphere Embedding for Face Recognition

进行归一化操作,将其都映射到一个单位球面上,令||W||=1,b=0,并且引入夹角,得出Modified Softmax Loss公式如下,

SphereFace: Deep Hypersphere Embedding for Face Recognition

SphereFace: Deep Hypersphere Embedding for Face Recognition

在此基础上,再引入angular margin,用m表示,最终产生A-softmax的loss公式

SphereFace: Deep Hypersphere Embedding for Face Recognition

SphereFace: Deep Hypersphere Embedding for Face Recognition

在LFW和YTF数据集上的识别率分别如下图所示,可以看出LFW已经达到了99.42的识别率。

SphereFace: Deep Hypersphere Embedding for Face Recognition

这里分析一下,作者A-softmax 的参数,

SphereFace: Deep Hypersphere Embedding for Face Recognition

在margin_inner_product_layer.cpp的Forward_cpu函数中,

SphereFace: Deep Hypersphere Embedding for Face Recognition

也就是说,SphereFace: Deep Hypersphere Embedding for Face Recognition

计算出来也就是说,lambda=5(iteration>1658)lambda=大于5的值(iteration<1658)


训练过程loss下降如下,

SphereFace: Deep Hypersphere Embedding for Face Recognition 


自己在LFW上10折测试的结果如下,

SphereFace: Deep Hypersphere Embedding for Face Recognition


reference:

https://github.com/wy1iu/sphereface

相关文章: