Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-trained models (20170512-110547) VS Pre-trained models (20180402-114759) #948

Open
tensorflowt opened this issue Jan 5, 2019 · 8 comments

Comments

@tensorflowt
Copy link

Hello, David! First of all, thank you very much for sharing the pre-training model, which is very helpful to my learning.I just tested your new version of pre-training model (20180402-114759), but to my surprise, the effect is very poor. It doesn't work as well as the older version (20170512-110547).Can you help me?
Thanks!

@yuwgle
Copy link

yuwgle commented Jan 11, 2019

I also want to know the difference between these two models

@NightFury10497
Copy link

@tensorflowt @yuwgle Can you share the drive link to the pre trained model?

@SthPhoenix
Copy link

SthPhoenix commented Feb 1, 2019

Hello! Also noticed great accuracy drop with 20180402-114759 model.
My use case is as follows:

  1. I have a DB of 100k persons, 1 image per person.
  2. I index faces embeddings using LSH to search engine (LSH recall is near 1.0)
  3. I acquire 1000 approximate candidates using LSH and than perform sorting using Euclidean or Cosine distance. (my basic implementation uses Euclidean, but I have tried Cosine for 20180402-114759 model)
  4. Out of 1000 sorted candidates TOP 100 returned to user.

And I got the following results:

  1. Using dlib embeddings true positive is usually in TOP-3 hits using query images with adequate resolution and lighting conditions.
  2. Using FaceNet with 20170512-110547 model I get true positives in TOP-3 for a bit harder images and in TOP-10 for images of same person wearing glasses, beard, and in harder lighting.
  3. Using FaceNet with 20180402-114759 model I get true positives in TOP-3 ONLY for query images in same lighting conditions, similar poses and obscuring factors (i.e. if in indexed image person was wearing glasses true positive will be in TOP-3 only if on query image person also wears glasses). In some cases true positive occurs below TOP-100 for images containing faces in same poses, same age, same resolution but in different white balance and background.

It seems to me that 512D embeddings contains some less informative features, which are neglected, and even help if you use SVM for face verification, but adds a lot of 'noise' if you try to compute cosine/euclidean distance between two embeddings.

@yuwgle
Copy link

yuwgle commented Apr 8, 2019

@NightFury10497 I just download the pretrained model in README.md.
Which is :
https://drive.google.com/open?id=1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-

@chenyuqing
Copy link

@yuwgle @tensorflowt Older version is 128 dimensional face embedding, and the new one is 512 dimensional face embedding. That's what I think these days.

@zhenglilei
Copy link

Hello, David! First of all, thank you very much for sharing the pre-training model, which is very helpful to my learning.I just tested your new version of pre-training model (20180402-114759), but to my surprise, the effect is very poor. It doesn't work as well as the older version (20170512-110547).Can you help me?
Thanks!

@yuwgle @tensorflowt @chenyuqing
The most important change is using FIXED_STANDARDIZATION instead of PER_IMAGE_STANDARDIZATION. The former was used in training the 20180402-114759 model so that if the wrong standardization is used, the model accuracy drops significantly. Here is the comparison table at the end of the page: https://github.com/davidsandberg/facenet/wiki/Training-using-the-VGGFace2-dataset

The FIXED_STANDARDIZATION is very simple as below, one can see facenet.create_input_pipeline() for details:
img = (np.float32(img) - 127.5) / 128.0

@pango99
Copy link

pango99 commented Sep 21, 2019

20180402-114759 is for SVM embedding compare,20170512-110547 is for Euclidean/Cosine distance embedding compare, is it?

@SE2AI
Copy link

SE2AI commented Oct 10, 2020

model of 2017 mainly trained on CASIA-webface, while model of 2018 trained both on CASIA and vggface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants