Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created July 19, 2019 11:49
Show Gist options
  • Save mdfarragher/9945b024048b9c82d3e6c92dfc114a57 to your computer and use it in GitHub Desktop.
Save mdfarragher/9945b024048b9c82d3e6c92dfc114a57 to your computer and use it in GitHub Desktop.
// compare each face with all other faces
var edges = new List<SamplePair>();
for (uint i = 0; i < descriptors.Count; ++i)
for (var j = i; j < descriptors.Count; ++j)
// record every pair of two similar faces
// faces are similar if they are less than 0.6 apart in the 128D embedding space
if (Dlib.Length(descriptors[i] - descriptors[j]) < 0.6)
edges.Add(new SamplePair(i, j));
// the rest of the code goes here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment