일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- 크롬 확장프로그램
- 데이터관련자격증
- 논문 pdf 이름
- 환급형프론트챌린지
- ai consensus
- ADsP
- cv2
- pip
- 코드프렌즈
- 토익
- arXiv
- ai model collapse
- 탑싯
- 미네르바 대학
- 토익공부
- ai공모전
- minerva university
- 탑싯시험
- 토익문제
- students@ai seoul hackathon
- 토익공부법
- pdf 다운로드
- 논문 pdf
- scaico
- model collapse
- TOPCIT
- 토익문법
- 아이엘츠
- 데이터분석
- toeic
- Today
- Total
토리의 데굴데굴 공부일기
[ 논문리뷰 ] ArcFace: Additive Angular Margin Loss for Deep Face Recognition 본문
[ 논문리뷰 ] ArcFace: Additive Angular Margin Loss for Deep Face Recognition
도토오오리 2024. 6. 1. 16:01Paper
https://arxiv.org/abs/1801.07698
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
Recently, a popular line of research in face recognition is adopting margins in the well-established softmax loss function to maximize class separability. In this paper, we first introduce an Additive Angular Margin Loss (ArcFace), which not only has a cle
arxiv.org
Official github
https://github.com/deepinsight/insightface
GitHub - deepinsight/insightface: State-of-the-art 2D and 3D Face Analysis Project
State-of-the-art 2D and 3D Face Analysis Project. Contribute to deepinsight/insightface development by creating an account on GitHub.
github.com
ArcFace 논문은 얼굴 인식에 사용되는 Loss에 관한 논문이다! 현재 Face Recognition task에서 다양한 데이터셋에 대해 SOTA를 달성하고 있다. 관련하여 얼굴 인식 task부터 찬찬히 알아보자!!
Face Detection vs. Face Recognition
단순히 얼굴 인식 task라고 했을때 나는 face detection만을 생각했다. 하지만 사람마다 다른 ID값을 갖도록 출력하기를 원한다면 Face detection이 아닌 Face Recognition task를 알아봐야 한다!
- Face Detection: 얼굴을 인식하여 bounding box만을 치는 것
- Face Recognition: 얼굴 인식하여 bounding box를 치고, 사람마다 고유한 얼굴로 인식하는것
위 사진에서 사람 얼굴에 네모 박스만 치는 task면 face detection, 사람마다 다른 ID, 이름을 구별 가능하면 face identification task이다!
Face Recognition Overview
Face Recognition 관련 task도 크게 Face Verification과 Face Identification으로 나눌 수 있다.
- Face Verification: 두 장의 이미지를 넣어서 one-to-one matching으로 한쌍의 얼굴 이미지에 대해 두 이미지가 같은 인물인지 아닌지 판별하는 Binary Classification
- Face Identification: 한 장의 이미지를 넣어서 one-to-many matching으로 특정 얼굴 이미지가 어떤 신원에 속하는지 판별하는 Multiclass Classification
Face Recognition Overview
Face Recognition System은 크게 face detection, face alignment 그리고 feature extraction으로 구성됨
여기서 feature extraction이 딥러닝이 사용되는 부분이다.
Face Recognition Feature Extraction
Face Recognition에서는 서로 다른 얼굴 이미지가 잘 구별되는 feature representation을 학습하는 것이 핵심이다.
단순 softmax loss의 경우 class간의 representation vector의 margin(차이)가 적다는 단점이 있음.
- 인물의 얼굴마다 고유한 representation vector를 가지기 때문에 다른 인물의 얼굴마다 이 vector의 차이가 커야 구별이 쉬워진다.
softmax의 단점을 해결하기 위해 다른 loss들이 제안됨
Triplet Loss: Positive & Negative pair를 생성하고 둘간의 margin의 차이가 최소 & 최대가 되도록 학습하도록 설계된 loss
- Positive pair: anchor(기준 얼굴)와 같은 사람의 다른 사진
- Negative pair: anchor와 다른 사람의 사진
이 두 pair를 만들어 positive pair와는 embedding vector의 margin이 작아지도록, negative pair와는 margin이 커지도록 학습시키는 loss가 Triplet Loss이다!
Angular Margin Loss: 각도 개념으로 각 representation vector 간의 margin을 정의하여 positive & negetive pair 없이도 학습 진행 가능
Angular Margin Loss: SphereFace
SphereFace는 multiplicative angular margin penalty를 통해 intra-class compactness와 inter-class dispersion를 달성하고자 한다.
이를 위해 결국 FC layer의 weight W와 hidden layer vector x간의 각도가 크게 차이나도록 학습을 진행한다.
- softmax loss에서 W_i 가 정규화 되어있고 bias가 0이라고 한다면 결국 둘 간의 각도로써 decision boundary를 표현할 수 있음
- 따라서 해당 각도를 더욱 크게 벌려주도록 penalty를 주어 학습한다면 discriminative power가 증대될 것으로 기대할 수 있음
Original Softmax Loss와 Modified Softmax Loss가 더욱 각도가 많이 벌어진것을 알 수 있다!
Angular Margin Loss: CosFace
CosFace는 SphereFace보다 좀 더 엄격한 penalty를 부여하여 angular margin을 확보한다.
SphereFace가 각도에 곱하기 연산을 통해 penalty를 부여했다면, CosFace는 뺄셈을 통해 penalty를 부여한다.
ArcFace: Addictive Angular Margin Loss for Deep Face Recegnition
ArcFace는 이전 방법론들과 비교하여 추가적으로 분별력을 향상시키면서 학습 과정을 더욱 안정화 시키기 위한 새로운 loss를 제안한다.
앞서 설명한 SphereFace나 CosFace와 다르게 각도에 직접적으로 penalty를 주는 방식을 활용한다.
1. Engaging: 구와 같은 고차원 공간에서의 최단 거리를 의미하는 geodesic distance margin을 직접적으로 optimize함
2. Effective: 여러 개의 face recognition benchmark dataset을 통해 실험한 결과 SOTA의 성능을 달성함
3. Easy: SphereFace와 달리 구현이 쉽고 안정적인 수렴을 보장함
4. Efficient: 추가적인 computational cost가 매우 적음
ArcFace는 geodesic distance와 loss 간의 정확한 correspondence를 가지고 있어 완전히 linear한 angular margin을 지니고 있음
정리
- SphereFace는 각도에 스칼라 곱하여 penalty
- CosFace: cosine에 뺄셈으로 penalty
- ArcFace: 각도에 직접적으로 점수를 더하여 penalty
=> linear한 angular margin을 지녀 안정적인 수렴 보장할 수 있음!
Reference
DSBA 연구실 Arcface 논문리뷰