"FaceNet"의 두 판 사이의 차이
ph
1번째 줄: | 1번째 줄: | ||
==FaceNet: A Unified Embedding for Face Recognition and Clustering== | ==FaceNet: A Unified Embedding for Face Recognition and Clustering== | ||
− | + | * CVPR2015 | |
− | + | * 구현 : [https://cmusatyalab.github.io/openface/ OpenFace] | |
− | + | * http://www.cv-foundation.org/openaccess/content_cvpr_2015/app/1A_089.pdf | |
− | + | * 128 byte feature를 뽑아낸다. 이걸로 verification(같은 얼굴이냐)하거나 recognition(누구냐)하든 clustering(비슷한 얼굴끼리 묶음)하든 마음대로. | |
− | + | * 3개의 이미지를 입력으로 받음. 2개는 같은 얼굴, 하나는 다른 얼굴. | |
− | * 거리는 [https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor LMNN](large margin nearest neighbor, ref.[http://jmlr.csail.mit.edu/papers/volume10/weinberger09a/weinberger09a.pdf 2009 paper])로. | + | ** 거리는 [https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor LMNN](large margin nearest neighbor, ref.[http://jmlr.csail.mit.edu/papers/volume10/weinberger09a/weinberger09a.pdf 2009 paper])로. |
− | ** [https://en.wikipedia.org/wiki/Semidefinite_programming Semidefinit programming]이용한 거라는데 뭔가 디게 복잡해보인다. #TODO | + | *** [https://en.wikipedia.org/wiki/Semidefinite_programming Semidefinit programming]이용한 거라는데 뭔가 디게 복잡해보인다. #TODO |
− | ** Mahalanobis distance matrix배우는 과정으로 대강 이해. | + | *** Mahalanobis distance matrix배우는 과정으로 대강 이해. |
− | * Triplet Loss: \(f\)를 \(d\) dimension '''embedding'''이라고 할 때, triplet loss는 margin을 고려한 2-norm error의 차. $$ \large \Sigma[ ||f(a) -f(p)||^2 - ||f(a)-f(n)||^2 + \alpha ]_+$$ \(a,p,n\)은 triplet, \(\alpha\)는 margin. \(||f(x)||=1\)로 normalized. | + | ** Triplet Loss: \(f\)를 \(d\) dimension '''embedding'''이라고 할 때, triplet loss는 margin을 고려한 2-norm error의 차. $$ \large \Sigma[ ||f(a) -f(p)||^2 - ||f(a)-f(n)||^2 + \alpha ]_+$$ \(a,p,n\)은 triplet, \(\alpha\)는 margin. \(||f(x)||=1\)로 normalized. |
− | ** 이것을 줄이는 것이 learning의 목표 | + | *** 이것을 줄이는 것이 learning의 목표 |
− | ** 이 세개를 어떻게 선택할것인지도 중요하다- 쉽게 통과하는 세트는 별로 기여도가 없다. | + | *** 이 세개를 어떻게 선택할것인지도 중요하다- 쉽게 통과하는 세트는 별로 기여도가 없다. |
− | *** 이런 어려운 set은 mini-batch안에서 일일이 찾는다.(online) cf. offline: find triplets every n steps using the most recent network and computing argmin/argmax on a subset of the data | + | **** 이런 어려운 set은 mini-batch안에서 일일이 찾는다.(online) cf. offline: find triplets every n steps using the most recent network and computing argmin/argmax on a subset of the data |
− | ;anchor-positive distance | + | *;anchor-positive distance |
:anchor와 positive exemplar의 거리. 위 식에서 a가 anchor, p가 positive exemplar | :anchor와 positive exemplar의 거리. 위 식에서 a가 anchor, p가 positive exemplar | ||
− | + | * negative를 너무 어려운것을 선택하면 collapsed model(\(f(x)=0\))이 된다. = bad local minima | |
− | + | ** 그래서 semi-hard를 선택함.( margin(\(\alpha\))을 없앤것) $$\large ||f(a) - f(p)||^2 < ||f(a)-f(n)||^2 $$ | |
− | + | * batch size = 1800정도가 가장 괜찮았고, 각 class마다 40개 이상씩 포함되게 함 | |
− | + | * CPU로 1000~2000시간정도. lr=0.05, α=0.2 | |
− | + | * 두가지 모델로 실험해봄. [[GoogLeNet|가벼운것]] 하나 무거운것 하나 | |
− | |||
− | |||
− | |||
− |
2017년 5월 23일 (화) 11:25 판
FaceNet: A Unified Embedding for Face Recognition and Clustering
- CVPR2015
- 구현 : OpenFace
- 128 byte feature를 뽑아낸다. 이걸로 verification(같은 얼굴이냐)하거나 recognition(누구냐)하든 clustering(비슷한 얼굴끼리 묶음)하든 마음대로.
- 3개의 이미지를 입력으로 받음. 2개는 같은 얼굴, 하나는 다른 얼굴.
- 거리는 LMNN(large margin nearest neighbor, ref.2009 paper)로.
- Semidefinit programming이용한 거라는데 뭔가 디게 복잡해보인다. #TODO
- Mahalanobis distance matrix배우는 과정으로 대강 이해.
- Triplet Loss: \(f\)를 \(d\) dimension embedding이라고 할 때, triplet loss는 margin을 고려한 2-norm error의 차. $$ \large \Sigma[ ||f(a) -f(p)||^2 - ||f(a)-f(n)||^2 + \alpha ]_+$$ \(a,p,n\)은 triplet, \(\alpha\)는 margin. \(||f(x)||=1\)로 normalized.
- 이것을 줄이는 것이 learning의 목표
- 이 세개를 어떻게 선택할것인지도 중요하다- 쉽게 통과하는 세트는 별로 기여도가 없다.
- 이런 어려운 set은 mini-batch안에서 일일이 찾는다.(online) cf. offline: find triplets every n steps using the most recent network and computing argmin/argmax on a subset of the data
- 거리는 LMNN(large margin nearest neighbor, ref.2009 paper)로.
- anchor-positive distance
- anchor와 positive exemplar의 거리. 위 식에서 a가 anchor, p가 positive exemplar
- negative를 너무 어려운것을 선택하면 collapsed model(\(f(x)=0\))이 된다. = bad local minima
- 그래서 semi-hard를 선택함.( margin(\(\alpha\))을 없앤것) $$\large ||f(a) - f(p)||^2 < ||f(a)-f(n)||^2 $$
- batch size = 1800정도가 가장 괜찮았고, 각 class마다 40개 이상씩 포함되게 함
- CPU로 1000~2000시간정도. lr=0.05, α=0.2
- 두가지 모델로 실험해봄. 가벼운것 하나 무거운것 하나