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

Validate with MegaFace Challenge dataset #275

Closed
se7oluti0n opened this issue May 15, 2017 · 19 comments
Closed

Validate with MegaFace Challenge dataset #275

se7oluti0n opened this issue May 15, 2017 · 19 comments

Comments

@se7oluti0n
Copy link

se7oluti0n commented May 15, 2017

Hello, I have downloaded MegaFace challenge data for evaluating face recognition, both Identification and Verification problem.
I think testing result on LFW is not enough because 2 reasons:

  1. LFW test only for verfication problem
  2. LFW is not big dataset

MegaFace challenge provide large dataset for testing face recognition with 1M distractors, testing on FaceScrub dataset. Here is some result: http://megaface.cs.washington.edu/results/facescrubresults.html

I'm also write code for extract features and convert to MegaFace format.
But I worry that the input images from Megaface is aligned in different way with Facenet code.

Could you help me check this code @davidsandberg
Here is the link:
https://gist.github.com/se7oluti0n/8ff161505721b6c4ab25ccfe7996fd1a

@se7oluti0n
Copy link
Author

here is some sample image from MegaFace. Its included Facescrub, FGnet for known subjects, and Megaface for unknown subjects (distractor)
https://drive.google.com/file/d/0B51U-GiVgFCrcWI2bllteWVjMzA/view?usp=sharing

@se7oluti0n
Copy link
Author

se7oluti0n commented May 18, 2017

I have tested the lasted model 20170512 with MegaFace challgene 1 (FaceScrub). This is result compared with others method (both on identification problem and verification on 1M distractor problem) . The blue line (david) show this repo's result. Pls check this @davidsandberg

Verification on 1M distractors

Identification on 1M distractors

@davidsandberg
Copy link
Owner

Hi @se7oluti0n,
Very nice plots!! I'm a bit surprised by the low identification rate at a small number of distractors (e.g. 10). I haven't looked at the details of how the test is set up, but I don't have any good explanation for this.
Can you make a PR to add the test script to the repo so I can have a look?

@ugtony
Copy link

ugtony commented May 18, 2017

Hi, @se7oluti0n,
I also ran the megaface challenge with the official script (run_experiment.py), but I don't know how to plot the results as you did. Could you tell me how you do it?

I used a model trained with casia-webface and get the rank-1 identification rate:
Distractor = 10, Rank1 = 0.9849
Distractor = 100, Rank1 = 0.9597
Distractor = 1,000, Rank1 = 0.9132
Distractor = 10,000, Rank1 = 0.8396
Distractor = 100,000, Rank1 = 0.7192
Distractor = 1,000,000, Rank1 = 0.5612

In your second graph, the blue line starts at a low identification rate(~0.92). It is probably because you didn't check the mtcnn-detected regions with the groundtruth for the facescrub dataset.

@se7oluti0n
Copy link
Author

se7oluti0n commented May 18, 2017

@davidsandberg @ugtony I'm a bit confused because my line is not the same shape with others. May be there are some mistakes in my steps. With distractor = 10, Rank 1 accuracy should be high as 0.98..

The detail steps:

@ugtony When run the test with aligned facescrub images on Megaface site, the result is not good, may be because they aligned different way compare to mtcnn. So I do the alignment with mtcnn, but I did not check with the groundtruth.

@davidsandberg
Copy link
Owner

Thanks!
My guess is that the distractor set should be aligned using MTCNN as well. For the model to be able to discriminate well between faces the embedding needs to be precise also for the distractors. Without alignment the embeddings will be "noisy" which I guess could impact performance.

@siebertlooije
Copy link

@se7oluti0n Thanks for this, very clear explanation !

@ugtony
Copy link

ugtony commented May 18, 2017

@se7oluti0n,
Since there may be more than one faces in facescrub images, when align_dataset_mtcnn.py is used without modification, the probe set would contain a few wrong images. That is the reason why the identification rate got only ~0.92 when distractor=10. After all, it can't be right when a probe image is wrong.

Therefore, if multiple faces are detected in align_dataset_mtcnn.py, you should choose the one overlapping most with the groundtruth bbox. The bbox info is listed in the .json files, the same file you should use when face detection fails.

Thanks for explaining how the figures are plot.


@davidsandberg
I think the performance would be better than it actually is when megaface distractor set is not aligned, that should be the reason why se7oluti0n's curve doesn't drop so much when distractor = 1,000,000.


In short, in my opinion, the left portion of se7oluti0n's identification curve is lower than others' because some images in probe are wrong. The right portion of the curve doesn't decline so much because the probe/gallery sets are well aligned but the distractor set isn't.

@se7oluti0n
Copy link
Author

se7oluti0n commented May 18, 2017

@ugtony Thanks for the clear explanation. I wonder which classifier (center loss or triplet loss) you used when retrained with casia-webface? Is that the cleaned version casia-maxpy-clean?

@davidsandberg The results looked very competitive with others state of the art method e.g ntech lab Findface (http://fusion.kinja.com/this-face-recognition-company-is-causing-havoc-in-russi-1793856482)

  • For the center loss verion, if we use large dataset, will the performance be improved? MegaFace challenge also provide quite large datasets (4M images of 650k identities)
  • How about triplet loss version? I have not trained this yet but it seemed having problem of converging. Recently I found a paper that improve triplet loss, could you have a look at https://arxiv.org/pdf/1703.07737.pdf

@ugtony
Copy link

ugtony commented May 18, 2017

I used center loss to train my classifier.
I used the original casia-webface. I checked a few removed images in casia-maxpy-clean before, but I found some of them seem to be right. I guess it is cleaned by some automatic algorithm instead of manually. Beside, I didn't get better performance with it.
The performance of my model on LFW is 0.989 by the way.

@ugtony
Copy link

ugtony commented May 19, 2017

Hi @davidsandberg,

I used the code shared by @se7oluti0n to plot my result (a model trained with facenet_train_classifier.py on casia-webface) on megaface challenge 1. My result is plotted with red color, please take a look.

The performance is competitive when the false positivie rate > 0.001 and the distractors number < 10,000, while become worse than nearby curves when false positive rate is low and number of distractors is high.

default
1

Any idea why this happens? Maybe it's just because my training dataset size is smaller than others.

@se7oluti0n
Copy link
Author

@ugtony @davidsandberg
I found I have mistake when extracting features for distractor's images:

  • In preprocessing, I use tf.image.resize_image_with_crop_or_pad(image, image_size, image_size) without noice that distractor's images is not aligned, and the challenge do provide aligned result in json files.
  • I have same mistake on aligned images of Facescrub downloaded from Megaface which has size of 300x300,

This is the result using aligned facescrub downloaded from MegaFace challenge, but the distractors are not aligned, use raw image. I will update the result after align distrator later


@ugtony
Copy link

ugtony commented May 19, 2017

It's good to know that TP increases to ~0.75 when FP=10^-6. It is pretty close to the "CenterLoss" performance (76.51%) reported in the paper "A Light CNN for Deep Face Representation with Noisy Labels".

I guess the identification rate would drop to somewhere around 0.65 after the distractor images are aligned.

@se7oluti0n
Copy link
Author

se7oluti0n commented May 19, 2017

@ugtony you are right. I guess without the distractor's alignment, the distractor images is not really a facical image, so it is easier to recognize probes from distractors.

latest results here. This results is very similar to the results in original center loss paper A Discriminative Feature Learning Approach for Deep Face Recognition (~65% for identification and 76% for verification)
Imgur
Imgur

@yao5461
Copy link

yao5461 commented Nov 12, 2017

@ugtony @se7oluti0n Hi, do you know how to define a new score model when I evaluate my model on Megaface? I want to use cosine similarity to measure the distance instead of euclidean distance.
Thanks! :)

@Not-IITian
Copy link

Not-IITian commented Feb 7, 2019

Hi,

Is it possible to evaluate your model on top-k accuracy on Megaface challenge other than top-1? e.g. k =3,5, 10.

Thanks

@SeanSyue
Copy link

SeanSyue commented Jul 8, 2019

@se7oluti0n Could you please renew the link to your evaluation kit. The original link seems broken.

@ghost
Copy link

ghost commented Sep 20, 2019

Hi,
Do we need to normalize the images of Facescrub and Megaface before feeding them to the model to get features? Thank you for reading.

@FlyingAnt2018
Copy link

hello! may i have your megaface dataset? i have applied for it at http://megaface.cs.washington.edu/dataset/download.html,but there is no reply! Thanks!

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