登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 外文翻译 > 计算机类 > 计算机科学与技术 > 正文

一种人脸识别自动签到系统设计与实现外文翻译资料

 2022-08-27 10:08  

both the softmax loss and the triplet loss have some draw- backs. For the softmax loss: (1) the size of the linear trans- formation matrix W Rdtimes;n increases linearly with the identities number n; (2) the learned features are separable for the closed-set classification problem but not discrimina- tive enough for the open-set face recognition problem. For the triplet loss: (1) there is a combinatorial explosion in the number of face triplets especially for large-scale datasets, leading to a significant increase in the number of iteration steps; (2) semi-hard sample mining is a quite difficult prob- lem for effective model training.

V

Several variants [38, 9, 46, 18, 37, 35, 7, 34, 27] have been proposed to enhance the discriminative power of the softmax loss. Wen et al. [38] pioneered the centre loss, the Euclidean distance between each feature vector and its class centre, to obtain intra-class compactness while the inter- class dispersion is guaranteed by the joint penalisation of the softmax loss. Nevertheless, updating the actual centres during training is extremely difficult as the number of face classes available for training has recently dramatically in- creased.

By observing that the weights from the last fully con- nected layer of a classification DCNN trained on the soft- max loss bear conceptual similarities with the centres of each face class, the works in [18, 19] proposed a multiplica- tive angular margin penalty to enforce extra intra-class com- pactness and inter-class discrepancy simultaneously, lead- ing to a better discriminative power of the trained model. Even though Sphereface [18] introduced the important idea

the softmax loss. The advantages of the proposed ArcFace can be summarised as follows:

Engaging. ArcFace directly optimises the geodesic dis- tance margin by virtue of the exact correspondence between the angle and arc in the normalised hypersphere. We in- tuitively illustrate what happens in the 512-D space via analysing the angle statistics between features and weights.

Effective. ArcFace achieves state-of-the-art performance on ten face recognition benchmarks including large-scale image and video datasets.

Easy. ArcFace only needs several lines of code as given in Algorithm 1 and is extremely easy to implement in the computational-graph-based deep learning frameworks, e.g. MxNet [8], Pytorch [25] and Tensorflow [4]. Furthermore, contrary to the works in [18, 19], ArcFace does not need to be combined with other loss functions in order to have stable performance, and can easily converge on any training datasets.

Efficient. ArcFace only adds negligible computational complexity during training. Current GPUs can easily sup- port millions of identities for training and the model parallel strategy can easily support many more identities.

Proposed Approach

ArcFace

The most widely used classification loss function, soft- max loss, is presented as follows:

N

of angular margin, their loss function required a series of ap-

L1 = x N

log

j=1

proximations in order to be computed, which resulted in an unstable training of the network. In order to stabilise train-

1

i=1

W_ xT bi

T

i

_ , (1)

eWd xT bd

e

T

ing, they proposed a hybrid loss function which includes the standard softmax loss. Empirically, the softmax loss dom- inates the training process, because the integer-based mul- tiplicative angular margin makes the target logit curve very precipitous and thus hinders convergence. CosFace [37, 35] directly adds cosine margin penalty to the target logit, which obtains better performance compared to SphereFace but ad- mits much easier implementation and relieves the need for joint supervision from the softmax loss.

In this paper, we propose an Additive Angular Margin Loss (ArcFace) to further improve the discriminative power of the face recognition model and to stabilise the training process. As illustrated in Figure 2, the dot product be- tween the DCNN feature and the last fully connected layer is equal to the cosine distance after feature and weight nor- malisation. We utilise the arc-cosine function to calculate the angle between the current feature and the target weight. Afterwards, we add an additive angular margin to the tar- get angle, and we get the target logit back again by the co- sine function. Then, we re-scale all logits by a fixed feature norm, and the subsequent steps are exactly the same as in

where xi Rd denotes the deep feature of the i-th sample, belonging to the yi-th class. The embedding feature dimen- sion d is set to 512 in this paper following [38, 46, 18, 37]. Wj Rd denotes the j-th column of the weight W Rdtimes;n and bj Rn is the bias term.

剩余内容已隐藏,支付完成后下载完整资料


ArcFace

1. 概述

使用深度卷积神经网络(Deep Convolutional Neural Networks, DCNNs) 来学习大规模人脸识别特征 的一个主要挑战是设计一个适当的损失函数来增强识别的能力。中心损失弥补(惩罚,类似于正则项) 了欧氏空间中深度特征与对应类别中心之间的距离,从而使得类内紧凑而简洁。SphereFace 假设在最后全连接层对矩阵进行线性变换可以作为在角空间中类中心的代表,并对深度特征和其对应权重之间的角度进行乘法补偿(惩罚,类似于正则项)。最近,一个流行的方向是将边缘信息纳入到已确定的损失函数中,并以此来最大限度地提高面类可分性。在本论文中,我们提出一种 边缘夹角附加损失(Additive Angular Margin Loss, AAML) (ArcFace) 来获得人脸识别的高可辨特征。我们所提出的 ArcFace 由于在超球面精确对应其球面距离, 所以其具有清晰的几何可解释性。我们使用超过 10 个目前最好的人脸识别方法(有争议的) 进行最广泛的评估实验,其中包括 一个拥有万亿级配对的新型大规模图像数据库和一个大规模视频数据集。通过这些实验,我们证明了 ArcFace 始终超越那些目前最好的人脸识别方法,并且它的实现非常简单,而计算开销基本可以忽略不计。我们开源所有优化过的训练数据,训练代码,预训练模型和训练日志,这将有助于别人对本论文进行探索,并获得更好的结果(开源,鼓励大家去探索,并在这个方向获得更好的研究结果)。

2. 介绍

使用嵌入式的深度卷积神经网络(DCNNs) 是人脸识别的首选方法。人脸图像的 DCNNs map 通过一个姿态归一化步骤处理后,变成一个内类小距离和内类大距离的特征。

对于训练人脸识别的 DCNNs ,目前有两条主流研究方向。一种是使用一个 softmax 分类器来训练能够在训练集上区分不同的身份的多类分类器,另一种则是直接学习一个嵌入式分类器,例如 triplet loss (三重损失,即 3 个损失函数)。基于大规模训练数据集和精细的 DCNN 结构,这两者都是基于 softmax-loss 和 基于 triple-loss 的方法,它们在人脸识别上获得卓越的性能。然而,无论是 softmax loss 还是 triplet loss 都有一些缺点。

对于 softmax loss:

(1). 线性变换矩阵 的大小随着常数 n 线性递增(d 为维度,n 可以理解为 n 分类,分类数大,矩阵必然大)。

(2). 所学习到的特征对于闭合分类问题是可分离的,但对于开放类型的(即识别类别不是固定的,而是无限大的) 人脸识别问题是识别能力欠缺的。

对于 triplet loss:

(1). 人脸 triplets 数量会出现一个组合爆炸,特别是对于大规模数据集,它会导致迭代步骤显著增加。

(2). 而有效训练模型的一个非常困难的问题是: semi-hard 样本采样(semi-hard 样本采样: negative example 与 anchor 距离大于 anchor 与 positive example 的距离,但还不至于使得loss, 即 )。

现在已经提出了几种变体函数来提升 softmax loss 的分类能力。Wen 等人首创 的 centre loss,它通过每个特征向量与其类中心之间的欧氏距离来获得类内的紧凑性,而通过对 softmax loss 联合惩罚项来控制类间的离散性。然而,在训练期间更新真实的中心是极其困难的,因为可供训练的人脸类别数量会急剧增加

通过观察,最后一个全连接层关于 DCNN 训练分类的 softmax loss 的权重 承担与每一个人脸类别中心概念的相似性,并提出一个乘法的边缘夹角惩罚项来执行额外的类内的紧凑和类间的差异,从而导致训练模型具有更好的辨别能力。尽管 Sphereface 引入了边缘夹角这一重要思想,但是它的损失函数需要一系列的近似值才能被计算出来,这就导致该网络的训练波动很大。为了能稳定训练,它们提出了包含标准 softmax loss 的混合损失函数。按照以往的经验,softmax loss 在训练过程中起着主导作用,因为基于整数乘法的边缘夹角会使得目标对数曲线非常陡峭,从而使得它难以收敛。与 Sphereface 相比,CosFace 直接在目标对数中加入余弦距离惩罚项来获得更好的性能,但实现起来更容易,并使得联合监督摆脱了对 softmax loss 的需要。

在本论文,我们提出一种 边缘夹角附加损失(Additive Angular Margin Loss, AAML) (ArcFace) 来进一步提升人脸识别模型辨别能力和训练过程的稳定性。DCNN feature 和 最后一个全连接层的点积等于 feature 和 weight 归一化之后的余弦距离,如下图Figure 2 所示:

我们利用反余弦函数来计算当前的 feature 和 目标 weight 之间的角度。然后,我们给目标角度添加一个附件的边缘夹角,并通过余弦函数来恢复得到目标对数。之后,我们根据固定 feature norm 来重新调节所有的对数,并且随后的步骤在 softmax loss 中恰好相同。我们提出的 ArcFace 方法优点总结如下:

Engaging. ArcFace 利用 归一化后的超球面的角度和弧度之间精确的对应关系来直接优化球面距离的边缘。我们通过分析 feature 和 weights 之间的角度统计来直观说明在 512-D 空间中发生了什么。

Effective. ArcFace 在 包括 大规模图像和视频数据集 的 10 个人脸识别基准上获得了最佳性能。

Easy. ArcFace 对于上图 Figure 2 中的 Algorithm 1 只需几行代码就搞定,并且对基于计算图形的深度学习框架(如,MxNet, Pytorch 和 TensorFlow 等) 是非常容易实现的。此外,ArcFace 不需要与其他损失函数结合就获得稳定的性能,并且对于任何训练数据集都很容易收敛。

Efficient. ArcFace 在训练过程中只增加了一点微不足道的计算复杂度。当前 GPUs可以很容易支持训练百万级身份(意思是,百万级个不同人脸训练),而模型并行策略可以很容易支持更多的身份。

3. 提议方法

(1). ArcFace

使用最广泛的分类损失函数 softmax loss 表示如下:

传统的 softmax loss 在深度人脸识别中得到了广泛应用。然而,softmax loss 函数并不能明确对类内样本的相似性和类间样本的差异性 执行更高的特征嵌入优化,从而导致在大量的类内外观变化(例如,姿态变化、年龄差异) 和 大规模的测试场景(例如 百万、万亿 个 匹配) 下深度人脸识别性能存在巨大的差异。

由于嵌入特征是围绕着超球面上的每个特征的中心分布的,我们在之间增加一个边缘夹角附件惩罚项,来同时增强类内的紧凑性和 类间的差异性。由于提出的边缘夹角附件惩罚项等于规范化超球面上的球面距离边缘惩罚,我们将该方法命名为 ArcFace。

我从 8 个包含足够样本的不同身份人脸数据(意思是不同人的人脸图像数据,大概 每个人有1500 图像)选择人脸图像,分别使用 softmax loss 和 ArcFace loss 训练 2-D 特征嵌入网络。 softmax loss 提供大致可分离的嵌入特征,但在决策边界却会产生明显的模糊;而 ArcFace loss 则能使最相近的类之间产生明显的差异(即能使相似而不同的类产生明显的差异,有利于区分)。具体如下图 Figure 3. 所示:(softmax loss 的类与类之间相接,边界模糊,不容易区分;而 ArcFace loss 类与类之间不相接,没有模糊边界,容易区分)

(2). CosFace 与 SphereFace 的比较

数值相似. 在 SphereFace、ArcFace 和 CosFace 中,提出了 3 种不同的边缘惩罚项,即分别为 边缘夹角乘法惩罚 、边缘夹角附加惩罚 、边缘余弦附加惩罚 。从数值分析角度看,无论是增加夹角空间还是余弦空间,不同的边缘惩罚项上都是通过目标对数惩罚项来增强类内的紧凑性和类间的差异性。下图 Figure 4(b) 是我们分别在 SphereFace、ArcFace 和 CosFace 的最佳边缘设置下所绘制的目标对数曲线。

而上图 Figure 4(a) 是目标对数曲线在 [20°, 100°] 的展示,因为在 ArcFace 训练期间 与 之间的夹角从 90° 附近开始 (随机初始化) ,并在 30° 附近 结束。在直观上,在目标对数曲线中有 3 个因素会影响它的性能:即 起点、斜率 和 终点。

通过结合所有的边缘惩罚项,我们在一个统一的框架下实现 SphereFace, ArcFace 和 CosFace,并以作为超参数:

如上图 Figure 4(b) 所示,通过结合上述所有的动态边缘 ,我们很容易就能够达到其他一些高性能的目标对数曲线(即获得与那些高性能目标一样的性能)。

几何差异. 尽管 ArcFace 与之前的工作在数值上相似,但由于边缘夹角可以准确的对应球面距离,因此所提出的附件边缘夹角具有更好的几何特性。我们将 softmax、SphereFace、CosFace 与 ArcFace 的二分类情况下的决策边界进行比较,如 下图 Figure 5 所示:

通过比较发现,SphereFace 和 CosFace 只有一个非线性的夹角边缘。

在模型训练时,边缘设计尽管只是微小的差异,也会产生 '蝴蝶效应' 而导致最后差异悬殊。例如,原始的 SphereFace 使用退火优化策略。为了避免训练开始时出现的差异,SphereFace 使用 softmax 的联合监督来弱化乘法边缘惩罚。我们实现了一个新版本的 SphereFace ,它在边缘上没有要求整数型,而是通过使用反余弦函数来替代复杂的倍角公式。在我们的实现中,我们发现 可以获得与 原始 SphereFace 相似的性能,并在收敛上没有任何困难。

(3). 与其他 losses 的比较

基于 feature 和 weight 向量 的夹角,还可以设计出其他损失函数。例如,我们可以设计一个损失函数来增强超球面上类内的紧凑性和类间的差异性。下图 Figure 1. 中展示的是本论文中 3 个 losses 的比较。

内部损失 的设计是通过缩小样本与 ground truth centre 之间 角度/弧度 来提升类内的紧凑性。

外部损失 的目标是通过增大不同中心点之间的 角度/弧度 来提升类间的差异性。

外部损失在这里只是 最小超球能力(Minimum Hyper-spherical Energy, MHE) 方法中的一个特例。隐藏层和输出层通过 MHE 来正则化。在 MHE 的论文中,通过将网络最后一层的 SphereFace loss 和 MHE loss 结合起来 提出了一种 损失函数的 特例。

三元损失 旨在扩大 triplet samples 之间的边缘弧度。在 FaceNet 中,在归一化 features 上使用欧氏边缘。这里,我们采用 triplet-loss,并通过 features 所代表的角度 表示为 。

4. 实验

(1). 实现细节

数据集. 为了与其他方法相比较时能公平起见,我们分别使用(包括 MS1M-DeepGlint 和 Asian-DeepGlint) 在内的 CASIA、VGGFace2、MS1MV2 和 DeepGlint-Face 来作为训练数据。如下表 Tabel 1 所示:

请注意,前面所提出的 MS1MV2 是 MS-Cele-1M 数据集的半自动优化版本。具我们所知,我们是第一个对大规模人脸图像注释使用特定种群注释器的人,因为如果注释器不熟悉身份(identity) 的话,事物的边界(例如 hard samples 和 noisy samples) 是很难区分的。在训练过程中,我们探索有效的人脸验证数据集(例如,LFW、CFP-FP、AgeDB-30) 来检验不同设置所得到的提升。除了被使用最广泛的 LFW 和 YTF 数据集外,我们同样对 ArcFace 在最近 大姿态和大年龄数据集(如 CPLFW 和 CALFW) 进行了性能报告。我们同样也在大规模图像数据集(例如,MegaFace、IJB-B、IJB-C 和 Trillion-Pairs) 和 视频数据集(iQIYI-VID) 上对所提出的 ArcFace 进行了广泛的测试。

实验设置. 对于数据预处理,我根据最新的论文通过利用 5 个 面部点来生成归一化的人脸裁剪图(112 x 112)。对于嵌入网络,我们采用广泛使用 CNN 架构的 ResNet50 和 ResNet100。在最后一个卷积层之后,我们研究 BN-Dropout-FC-BN 结构来获得最后 512-D 的嵌入特征。在本论文,我们使用([训练数据集,

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[405926],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图