omoindrot / tensorflow-triplet-loss

Implementation of triplet loss in TensorFlow
https://omoindrot.github.io/triplet-loss
MIT License
1.12k stars 284 forks source link

Practical usage of embeddings for face recognition #26

Open FSet89 opened 5 years ago

FSet89 commented 5 years ago

I have a training set with N different identities [I_1, I_2 ... I_N] and for each identity I have several images extracted from a video. I trained the triplet loss model on this set. Now I have another set of images related to a new identity I_N+1 and I want all the future images related to I_N+1 to be recognized. What I thought is:

Is this approach correct? Is it better to compute several embeddings related to I_N+1 and use them separately?

omoindrot commented 5 years ago

I'm not sure if the mean embedding will work here. Maybe the person has very different poses, different ages or different hair colors across photos. So you might want to compare each embedding in your history to the new unknown embedding.

The only way to know for sure is to test your ideas on a separate test set with multiple identities unseen during training.