I am classifying about 3000 thousand people's faces using FaceNet. Each person has about 100 photos.

FaceNet first calculates a face embedding ( a feature vector) for each photo. So each person has 100 face embeddings.

What I want to do is aggregate the face embedding of each person into one. What is the best way of doing this?

I have tried to use mean method. But I am not sure whether this is recommended way.

-- The reason I want this is because using a single SVM as classifier for 3000 labels is very slow. (I took 50+ hours and about 250G memory and it still won't finish training). So I need to divide the training data into subsets, and use multiple SVCs to get first level of results. Then I uses the aggregated face-embedding of each person and closest distance to get second level result.


This question is the first I've heard of FaceNet, but I don't think that the right solution to the question is to aggregate the face embeddings but to ask why you're using an SVM to classify the embeddings. Importantly, many SVM implementations of multiclass classification use a one-vs-rest method to train the classifiers -- if you're using a one-vs-rest implementation with 3000 labels, I suspect that this is the reason your training is taking so long.

You should look into how your implementation is training the classifier. Additionally, How large is your embedding size?

  • $\begingroup$ Thanks for the info. My intended application is face identification: given a face image, identify whose face it belongs out of 3000 people. I googled one-vs-all and one-vs-one classifier, it seems only one-vs-all classifier will fit this need. I guess the other implementation (one-vs-one) is for face authentication only? (check whehter the face is who it claim to be). My embedding size is 512. $\endgroup$ – user8328365 Nov 28 '18 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.