aleju/face-comparer is a AI Tools project on GitHub, written primarily in Python. It has 129 stars. Neural net to compare human faces.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This convolutional neural network estimates whether two images of human faces show the same or a different person. It is trained and tested on the Labeled Faces in the Wild, greyscaled and cropped (LFWcrop_grey) dataset. Peak performance seems to be at about 90-91% accuracy.
which will output accuracy, error rate (1 - accuracy), recall, precision and f1 score for training, validation and test datasets. It will also plot/show pairs of images which resulted in false positives and false negatives (false positives: images of different people, but network thought they were the same).
Architecture
The network uses two branches, one per image. Each branch applies a few convolutions and ends in a fully connected layer.
The outputs of both branches are then merged and further processed by another fully connected layer, before making the final yes-no-decision (whether both images show the same person).
All convolutions use leaky ReLUs (alpha=0.33) and no batch normalization.
The used optimizer is Adam. All images are heavily augmented during training (rotation, translation, skew, ...).
Results
The graph shows the training progress of the included example model over ~200 epochs. The red lines show the training set values (loss function and accuracy), while the blue lines show the validation set values. Light/Transparent lines are the real values, thicker/opaque lines are averages over the last 20 epochs.
Examples of false positives (validation set)
False positives here are image pairs that show different people, but were classified by the network as showing the same person.
Examples of false negatives (validation set)
False negatives here are image pairs that show the same people, but were classified by the network as showing different persons.
Dataset skew
The used dataset may seem quite big at first glance as it contains 13,233 images of 5,749 different people. However these images are highly unequally distributed over the different people. There are many people with barely any images and a few with lots of images:
4069 persons have 1 image.
779 persons have 2 images.
590 persons have 3-5 images.
168 persons have 6-10 images.
102 persons have 11-25 images.
35 persons have 26-75 images.
4 persons have 76-200 images.
2 persons have >=201 images.
In order to generate pairs of images showing the same person you need a person with at least two images (unless you allow pairs of images where both images are identical). So only 1,680 persons can possibly be used for such a pair. Furthermore, any image already added to a dataset (training, validation, test) must not appear in another dataset. If you don't stick to that rule, your results will be completely skewed as the net can just start to memorize the image->person mapping and you are essentially testing whether your network is a good memorizer, but not whether it has learned a generalizing rule to compare faces.
Because of these problems, the validation set is picked first, before the training set, so that it is less skewed (towards few people) than the training set. Additionally, a stratified sampling approach is used: First, a name is picked among all person names. Then, among all images of that person one image is picked. That is done two times for each pair. By doing this, early picked pairs should be less skewed (towards few people) than by just randomly picking images among all images (of all people). At the end, the validation set should be rather balanced, giving a better measurement of the true performance of the network. To decrease the resulting skew of the training set, the validation set size is kept small, at only 256 pairs, while the training set size is 40,000 pairs. All images that appear in the validation set are excluded from the picking process for the training set. (Sidenote: The picking process is also specifically designed in a way that exactly half of all picked pairs show the same person.)
The following plot shows roughly the count of images per person and dataset (only calculated on pairs of images showing the same person, as those show skew earlier than pairs with different persons):
Notice how the counts of images per person are very uniform in the validation set as it was picked first.
The most recent commit recorded on aleju/face-comparer was 10.0 years ago, based on the GitHub push timestamp. The repository has 25 forks — one of the better signals of community interest.
How many stars does aleju/face-comparer have?
aleju/face-comparer has 129 GitHub stars — refresh the page for the live number, or check github.com/aleju/face-comparer. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is aleju/face-comparer open source?
TopGit's metadata for aleju/face-comparer does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What else is in the AI Tools space?
aleju/face-comparer is tracked by TopGit under the AI Tools category, alongside 2 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is aleju/face-comparer?
aleju/face-comparer (aleju/face-comparer) is a Python project on GitHub. From the project's own README: Neural net to compare human faces.
What language is aleju/face-comparer written in?
aleju/face-comparer is written primarily in Python. GitHub's language field is based on the largest share of bytes in the default branch.
Where do I read more about aleju/face-comparer?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/aleju/face-comparer is the definitive source.
Read full README in the tab above.
Still deciding about face-comparer?
One click hands the question to an AI along with this page — see what it says about face-comparer.