Repository navigation
Find faces further away in Reframe's Face mode - #193
Merged
Merged
Conversation
Reframe's Face mode has no mask to start from, so the squares Follow face uses for small faces would also frame signs and cars. It now looks at the whole frame with MediaPipe's full-range BlazeFace (192 px, built into the APK from the file and generation MediaPipe's own build pins, SHA-256 checked), which finds a face about a twentieth of a 16:9 frame wide. 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.
Closes #182 (Follow face was done in #190; this is Reframe's Face mode).
Reframe's Face mode found no face in street footage: BlazeFace short range, on the whole frame, needs a face about a sixth of a 16:9 frame wide. #190's squares don't suit it. It has no mask to start from, and the squares find signs, a car's rear and shirts scoring as high as faces.
Change. Reframe's Face mode, the tracking and the board's preview, now uses MediaPipe's full-range BlazeFace on the whole frame:
FaceDetector.Range.Full: 192 px input, 48 × 48 anchors, MediaPipe's own threshold 0.6.face_detection_full_range_sparse.tflite(Apache-2.0, 0.68 MB), downloaded at build time from the file and generation MediaPipe's own build pins (third_party/external_files.bzl) and checked against its SHA-256. It's indocs/third-party.md.Checked
Desktop (the same decoding, in Python with LiteRT), 15 frames of three street clips at 720p:
The two false finds in a blurred night frame, a shirt and something in a hand, scored 0.53 and 0.56, under the 0.6 threshold. With MediaPipe's test portrait in a 1280 × 720 frame, full range finds the face from about 71 px wide (0.86). Short range finds none.
Emulator, a temporary test (not committed): Reframe's face tracking on a 13.5 s street clip at 720p. Short range found a face in 0 of 135 samples, full range in 13, all on the woman, and nothing else. It took 7.0 s against 6.2 s.
FaceDetectorTest.fullRangeFindsFacesFurtherAway(new; the close portrait too).FaceTracksTestandReframerTestpass on the emulator.🤖 Generated with Claude Code