Repository navigation
Fix face misses in subtitle placement - #63
Merged
Merged
Conversation
…face is seen The face finder missed the speaker on a real talking-head excerpt. Haar finds him in about half of single frames (94 of 180 one-per-second frames, outside the icon column). A single midpoint frame therefore missed him on many cues, and the 62 s caption sat across his mouth. Now each caption is checked at five frames across its life, and a face seen in any of them keeps the caption off it. When no face is seen in any frame, the caption stays at bottom instead of the least busy place, which could land on an unseen face. Sampling nine frames gained nothing (34 of 50 cues either way), so five stays. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
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.
Fix face misses in subtitle placement
On a real 3-minute talking-head excerpt, the Haar face finder found the speaker in only about half of single frames. The earlier "46 of 50 cues found a face" was mostly the avatar icons down the left edge, not the speaker. A caption checked at one midpoint frame could land on a face the finder had missed (the 62 s caption did).
Change
FACE_SAMPLES), and a face seen in any of them keeps the caption off it.faces.frames).Measured on the excerpt (sandbox, OpenCV 4.10 Haar)
minNeighbors3,scaleFactor1.05, histogram equalisation, 2x upscaling, and the alt / alt2 cascades (alone or in a union). None raised per-frame recall materially.Limits
Tests
tests/test_faces.py: a face seen in only one sampled frame keeps the caption off it; sampling spans the caption; no face gives bottom with the reason; the rest as before.Generated by Claude Code