Abstract
- Face recognition(FR)을 위한 feature learning을 진행할 때 중요한 부분은 적절한 loss function을 설계하는 것이다.
- SphereFace에 따르면 Angular space상 class representation으로 마지막 fc layer를 으로 사용할 수 있다.
- Face class의 분포를 최대한 멀리 떨어뜨리기 위해 margin을 포함한 loss function을 설계하는 것이 트렌드이다.
- 이를 종합하여 Additive Angular Margin Loss(ArcFace)라는 새로운 loss를 제안한다.
1. Introduction
Deep Convolution Neural Network(DCNN)을 통해 face image의 map을 그렸을 때 같은 class와는 비슷한 feature를 만들고, 다른 class와는 다른 feature를 만들어야한다. FR을 DCNN으로 훈련하는 두 가지 방법이 있다. 이 두 방법 모두 좋은 recognition performance를 보여준다. 그러나 단점이 존재한다.
- softmax classifier
- class수가 늘어나면 linear transformation matrix(W∈Rd×n)가 커진다.
- Closed-set classification문제에서는 class가 잘 분리되지만 open-set에서는 구별이 가능할 만큼 잘 분리되지 않는다.
- Triplet loss(Learn directly an embedding)
- large-scale datasets에서는 face triplets의 combination이 기하급수적으로 증가한다.
- Semi-hard sample mining이 쉽지 않다.
이 논문에서는 Additive Angular Margin Loss(ArcFace)를 제안한다. 과정은 아래 그림과 같다.

- Normalize된 DCNN feature와 Normalize된 last fc layer의 dot product를 실행한다.
- Arc-cosine function을 씌워 feature와 class representation 사이의 각도를 구한다. 이 각도가 작을수록 비슷한 것이다.
- Target class에 대한 각도에는 angulr margin을 더해준다.
- Cosine function을 씌우고, re-scale을 진행한다.
- Softmax loss와 동일하게 loss를 계산하고, parameter
2. Proposed Approach
2.1 ArcFace
Softmax loss는 아래와 같다.
L1=−1NN∑i=1logeWTyixi+byi∑nj=1eWTjxi+bj
Softmax loss는 intra-class간에는 higher similarity를 inter-class간에는 diversity를 만들기위해 feature embedding의 optimise가 안되어있다. 이런 것은 intra-class samples이 다양하거나 large-scale test scenarios에서는 성능 차이가 나타난다.
ArcFace를 아래와 같은 과정을 거친다.
- softmax loss에서 bj=0으로 둔다.
- Feature와 class representation사이의 각도 θj=arccos(WTjxi||Wj||||xi||)로 표현할 수 있다.
- Target class에 대해서는 θ에 margin m을 붙인다.
- 계산된 θ에 cosine function을 씌운다.
- s로 re-scale을 진행한다.
- Softmax loss를 계산한다.
의사코드

전체적인 loss는 아래와 같다.
L3=−1NN∑i=1loges(cos(θyi+m))es(cos(θyi+m))+∑nj=1,j≠yiescosθj
Softmax loss와 ArcFace를 비교하면 아래 그림과 같다. Margin을 통해 ArcFace에서는 intra-class끼리는 더 유사하도록, inter-class끼리는 더 멀어지도록 했다.

2.2 Comparison with SphereFace and CosFace
Numerical Similarity
SphereFace, ArcFace, CosFace는 서로 다른 margin penalty를 사용한다.
이 3가지 penalty를 하나의 loss에 모두 넣으면 아래와 같다.
- SphereFace : m1
- ArcFace : m2
- CosFace : m3
L4=−1NN∑i=1loges(cos(m1θyi+m2)−m3)es(cos(m1θyi+m2)−m3)+∑nj=1,j≠yiescosθj
이위의 세 가지 penalty에 대해 그린 target logit curve는 아래와 같다.

Geometric Difference
Binary classification의 경우 각 penalty에 대한 decision boundary는 아래와 같다. SphereFace와 CosFace의 경우 interval에 따라 margin이 변하지만, ArcFace는 모든 interval에서 margin이 동일하다.

2.3 Comparison with Other Losses
ArcFace는 margin을 사용하여 intra-class를 compactness하게 만드는 동시에, inter-class의 다양성을 늘렸다. 아래와 같이 다른 방식(Intra-loss, Inter-loss, Triplet-loss)으로 loss를 설계할 수도 있다.

실험을 위한 baseline loss(softmax loss)
L2=−1NN∑i=1logescosθyiescosθyi+∑nj=1,j≠yiescosθj
1. Intra-loss
Sample과 ground truth centre간 각도를 줄여 intra-class compactness를 높인다.
L5=L2+1πNN∑i=1θyi
2. Inter-Loss
Different centres간 각도를 키워 inter-class 차이를 키운다.
L6=L2−1πN(n−1)N∑i=1n∑j=1,j≠yiarccos(WTyiWj)
3. Triplet-loss
같은 class의 sample간 각도에 margin을 주어도 다른 class의 sample간 각도보다 작아지는 것을 목표로 한다.
arccos(xposixi)+m≤arccos(xnegixi)
3. Experiments
3.1 Implementation Details
Experimental Settings
Data preprossessing
- Generate the normalised face crops(112*112) by utilising five facial points
- Embedding network로 ResNet50과 ResNet100을 사용
- 512-D Embedding feature
- rescale size s = 64
- ArcFace angular margin m=0.5
3.2 Ablation Study on Losses
Comparison with SphereFace and CosFace
ArcFace가 angular margin based loss에서 모든 dataset에서 가장 좋은 performance를 보였다.
Comparison with Intra-loss, Inter-loss, Triplet-loss
ArcFace가 Intra-loss, Inter-loss, Triplet-loss와 비교해도 가장 좋은 performance를 보였다. Triplet loss는 Intra-loss, Inter-loss보다 좋은 성능을 보였는데, 이는 margin이 performance에 긍정적인 역할을 한다는 것을 시사한다. ArcFace를 다른 loss들과 결합했을 때도 성능이 나아지지 않았다. 이는 ArcFace가 이미 intra-class compactness, inter-class discrepancy, classification margin을 이미 갖고 있음을 나타낸다.

3.3 Evaluation Result
다양한 dataset에서 실험했을 때, ArcFace가 가장 성능이 좋았다는 내용
4. Conclusions
- Additive Angular Margin Loss function을 제안함
- Face recognition에서 discriminative power를 향상시킴
'논문리뷰' 카테고리의 다른 글
[논문리뷰]FaceNet: A Unified Embedding for Face Recognition and Clustering (0) | 2022.08.25 |
---|---|
[논문리뷰]Image Style Transfer Using Convolutional Neural Networks (0) | 2022.07.26 |
[논문리뷰]Face Recognition in Low Quality Images: A Survey (0) | 2022.07.26 |
[논문리뷰]Deep Residual Learning for Image Recognition (0) | 2022.07.26 |
[논문리뷰]Sequence to Sequence Learning with Neural Networks (0) | 2022.07.12 |