In most face recognition SDK, it only provides two major functions
- detecting faces and extracting templates from photos, this is called detection.
- comparing two templates and returning the similar score, this is called recognition.
However, beyond those two functions, what I am looking for is an algorithm or SDK for grouping photos with similar faces together, e.g. based on similar scores.
Thanks
First, perform step 1 to extract the templates, then compare each template with all the others by applying step two on all the possible pairs, obtaining their similarity scores.
Sort the matches based on this similarity score, decide on a threshold and group together those templates that exceed it.
Take, for instance, the following case:
Ten templates: A, B, C, D, E, F, G, H, I, J.
Scores between: 0 and 100.
Similarity threshold: 80.
Similarity table:
Sorted matches list:
AI 90
FJ 90
BE 99
AH 88
AB 85
CF 80
——- <– Threshold cutoff line
DJ 66
…….
Iterate through the list until the threshold cutoff point, where the values no longer exceed it, maintain a full templates set and association sets for each template, obtaining the final groups:
Execution details on the list:
In the end, you end up with the following similarity groups: