luckycallor / InsightFace-tensorflow

Tensoflow implementation of InsightFace (ArcFace: Additive Angular Margin Loss for Deep Face Recognition).
248 stars 112 forks source link

Normalization of embeddings in evaluate.py #24

Open AmitRozner opened 5 years ago

AmitRozner commented 5 years ago

Can you please explain this normalization method? First, you normalize the original image and the flipped image. Then you sum both embeddings into one. embds_arr = embds_arr/np.linalg.norm(embds_arr, axis=1, keepdims=True)+embds_f_arr/np.linalg.norm(embds_f_arr, axis=1, keepdims=True)

Why would this work at inference time? Can you explain why this is better than just running the embedding and then normalizing it?

Thanks