Study an alternative similarity metric for comparing AI face-recognition embeddings.
Reproduce the training pipeline on the CASIA-WebFace dataset to test the relational loss.
Compare IMG Sign, AMP, and Chain Score against cosine similarity on standard face benchmarks.
Use the metric definitions as a starting point for research on embedding evaluation methods.
| imamgh11/imgnet | 2arons/llm-cli | abe238/claude-video-plus | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | Python | Python | Python |
| Setup difficulty | hard | easy | easy |
| Complexity | 5/5 | 2/5 | 3/5 |
| Audience | researcher | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Reproducing results requires training on a large face dataset (490k images) with a GPU.
IMGNet presents a research idea called IMG, short for a universal similarity metric for computer vision. It's an academic project from an independent researcher, published with a formal DOI, proposing an alternative way to measure how similar two AI generated embeddings are, specifically in the context of face recognition. Most systems compare embeddings, the numerical fingerprints a neural network produces for an image, using cosine similarity, which looks at the overall angle between two vectors. This project proposes comparing local relational patterns instead, meaning it looks at whether small groups of numbers within the embeddings agree in sign and pattern, rather than just their overall direction. The idea is inspired by how different languages can express the same meaning through different surface words but consistent underlying structure. The repository introduces three related metrics: IMG Sign Score, which measures how often local groups of values agree in sign across a sliding window, AMP IMG Score, which adds a check on the magnitude of those values, and Chain Score, which tracks how continuously the matching pattern holds. The authors train a neural network from scratch using this relational approach as the sole training objective, rather than the angular margin loss used by a well known method called ArcFace. The project includes a full training pipeline, using the CASIA-WebFace face dataset with about 490,000 images across more than 10,000 identities, along with benchmark results on standard face verification datasets like LFW, AgeDB-30, CALFW, and CPLFW. Results show the new relational metrics can be competitive with, though not always better than, standard cosine similarity, and the authors conclude there is no single best similarity metric: the right choice depends on how the embeddings themselves were trained. The code is written in Python and is licensed under the MIT license. This is a research-oriented project aimed at people working on face recognition and embedding based computer vision systems, not an out of the box application.
A research project proposing IMG, an alternative to cosine similarity for comparing AI face-recognition embeddings.
Mainly Python. The stack also includes Python, NumPy.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1day+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
double-check against the repo, no cap.