cast a wider net for face similarity #84
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is obviously not a pull-request. I also didn't have time to learn drizzle so it's a Frankestein code. However, I'm creating this PR as a concept of a proposal (!) to improve person merging.
Current problem: Only one face is chosen for the template (the person to be merged with) and one face for all other targets (people we pick to merge) to compare against. If I'm not mistaken, these faces are picked arbitrarily and the similarity between two such faces is a very noisy approximate of the actual similarity between the two people. Maybe the order Postgresql returns the faces from asset is not arbitrary and it returns some special face that is prototypical for the person, but in any case using just one face per person is very suboptimal.
Ideally, we could compute an all-pairwise similarity between all faces of the template person and all faces of the target people and compute a distributional measure. This is prohibitive, however, and there is no obvious choice for the similarity measure.
Just to experiment with it myself, I implemented (or rather, tried to implement) the following approach: