feat(server): optimize partial facial recognition #6634
Merged
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.
Description
Based on the discussion here, this PR changes facial recognition queuing:
Specifically, this is the new behavior for clustering:
There is an edge case where this change can lead to a duplicate person: if a new person is created in the partial clustering and the faces similar to it existed before this batch of faces, then only the core face that created the person will be assigned this person until the nightly job runs. This means that if another image containing a face of this person is uploaded before the nightly job, then it will only be clustered if it can reach the face that created the person, not just any face of that person. If it can't and the face is a core face, a new person will be created.
Implementation notes:
onDone
to support the more nuanced queueingHow Has This Been Tested?
Tested with debug logging to check that it queues the faces from Face Detection, not all missing faces.