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

Two select_triplets functions with performance improvement #59

Merged
merged 5 commits into from
Nov 5, 2016
Merged

Two select_triplets functions with performance improvement #59

merged 5 commits into from
Nov 5, 2016

Conversation

scotthong
Copy link
Contributor

Hi David,

I added two select_triplets functions and here is a quick summary of the changes.

  1. Renamed the origin select_triplets to select_triplets_orig
  2. The version 1 of the implementation using a pre-calculated distance matrix (select_triplets_v1).
  3. Further improvement over Add data augumentation #2 with additional 15% of performance improvement. This is the default one using select_triplets function name.

The latest implementation improves another 15% over the first one with only distance matrix.

Please review the the changes, especially #3 that might not have the same rules as the original one.
These changes do improve the performance by almost 3x compared to the original one when running on my computer.

Thanks,

Scott Hong

@scotthong
Copy link
Contributor Author

I've validated the two functions added to facenet.py. The second version doesn't work as well as the original implementation. The select_triplets_v1 is the one that has the same logic used in the original implementation. This version can achieve the same LFW training accuracy as before (~0.92). I've cleaned up the three into one in my latest forked master branch.

@davidsandberg
Copy link
Owner

Looks good! Thanks alot!!

@davidsandberg davidsandberg merged commit e7870a9 into davidsandberg:master Nov 5, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants