← All models Β· FaceNet

Basics Β· image-feature-extraction

Same person, or not?

The whole idea in one screen: each face becomes a 128-number embedding, and one cosine number says how alike they are. Try the two presets β€” the same person shot twice lands high; two different people land low.

Compare two faces

Face A

Sample portrait A Sample portrait B Sample portrait C Sample portrait D

Face B

Sample portrait A, re-shot Sample portrait B Sample portrait C Sample portrait D

Licensed portraits (Wikimedia Commons, CC-BY-SA / public domain). Everything runs on-device; nothing is uploaded. Similarity is a fuzzy signal, never identity.

What just happened

FaceNet maps each 160Γ—160 face crop to a point in a 128-dimensional "face space". The training objective pulled the same identity's photos together and pushed different identities apart, so the angle between two embeddings (their cosine similarity) is a good "same person?" signal. Nothing here is a database lookup β€” just two vectors and the angle between them.

Practical β†’ the on-device "unlock" concept Β· Wild β†’ the look-alike finder