explaingit

imamgh11/imgnet

Analysis updated 2026-05-18

11PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

TLDR

A research project proposing IMG, an alternative to cosine similarity for comparing AI face-recognition embeddings.

Mindmap

mindmap
  root((IMGNet))
    What it does
      New similarity metric
      Compares embedding patterns
      Alternative to cosine
    Tech stack
      Python
      Neural networks
      CASIA WebFace dataset
    Use cases
      Face recognition research
      Embedding evaluation
      Benchmark comparison
    Audience
      Researchers
      ML engineers
      Computer vision students

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study an alternative similarity metric for comparing AI face-recognition embeddings.

USE CASE 2

Reproduce the training pipeline on the CASIA-WebFace dataset to test the relational loss.

USE CASE 3

Compare IMG Sign, AMP, and Chain Score against cosine similarity on standard face benchmarks.

USE CASE 4

Use the metric definitions as a starting point for research on embedding evaluation methods.

What is it built with?

PythonNumPy

How does it compare?

imamgh11/imgnet2arons/llm-cliabe238/claude-video-plus
Stars111111
LanguagePythonPythonPython
Setup difficultyhardeasyeasy
Complexity5/52/53/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Reproducing results requires training on a large face dataset (490k images) with a GPU.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
Explain in simple terms how the IMG Sign Score differs from cosine similarity.
Prompt 2
Walk me through how the sliding window and matching gate work in this project's math.
Prompt 3
Help me reproduce the training pipeline on CASIA-WebFace using the hyperparameters listed here.
Prompt 4
Summarize the benchmark results comparing IMG Sign, AMP, Chain Score, and cosine similarity.

Frequently asked questions

What is imgnet?

A research project proposing IMG, an alternative to cosine similarity for comparing AI face-recognition embeddings.

What language is imgnet written in?

Mainly Python. The stack also includes Python, NumPy.

What license does imgnet use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is imgnet to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is imgnet for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.