Repository navigation
Follow the face the mask was put on - #175
Merged
Merged
Conversation
Follow face took the detector's surest face at the clip's start, so a mask moved onto someone else jumped back to the first person found. It now starts where the mask is at the playhead, takes the face nearest it there (the surest one when there is no mask), and follows that face forwards and back from there (FaceTracking.follow). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Found while blurring faces in the user's night street clip on the emulator (Masks, Mosaic, oval, Follow face).
Before: Follow face always took the detector's surest face at the clip's first frame and followed it from there. Where the user had put the oval made no difference: with a seated person on the left and someone walking on the right, moving the oval onto the walker and turning Follow face on put it back on the seated person.
After:
FaceTracking.follow(pure, in core:model) starts at the playhead, where the mask was put. There it takes the face nearest the mask, or the surest face when there is no mask, then follows the nearest face sample by sample, forwards to the end and back to the start.FaceTracks.findtakesatUsandnear, and the Masks screen passes the mask at the playhead. Reframe still follows the surest face from the start.On the user's clip the walker's face is a few pixels at the detector's input (BlazeFace short range), so the seated person is the only face found and stays the one followed. The unit test covers the case this changes: two faces seen, and the one under the mask is followed.
Test plan
FaceTrackingTest.theFaceUnderTheMaskIsFollowed: without a mask the surest face, with the mask on the walker the walker in both directions, and gaps stay empty.:core:model:test,:feature:effects:testDebugUnitTest,:core:engine:testDebugUnitTestandspotlessCheckpass.FaceTracksTestandReframerTeston the emulator pass (3 tests).🤖 Generated with Claude Code