Repository navigation
Keep printed faces out of auto layout and stop per-shot layout churn - #438
Merged
dillonstreator merged 3 commits intoDec 2, 2026
Merged
Conversation
Faces printed on clothes (a merch shirt with the hosts' faces) sat 2 face heights under the wearer's face and counted as extra people, so a host's close-up became a split onto the shirt. A painting on the wall at a low detector score wobbled just enough to pass the static-face test and made a two-shot a crowd. On a multi-camera podcast cutting every 1-3 s, deciding every shot on its own changed the layout 13 times in 30 s. - liveFaces: static pictures (now also a picture re-detected after a cut whose landmarks hold still in its box) and faces on a torso under a bigger face are dropped before any layout rule; every caller uses it, and active speaker detection drops prints per frame before seat matching. - settleLayouts: an inner shot under 2 s, or a 3 s blip between two face crops, splits or stacks, takes a neighbour's layout when that layout can show the shot, framed on the shot's own faces. - framing eval: three Bad Friends cases with printed-face, segments per minute and shortest-segment checks, incl. a lasting two-shot that must stay split. Signed-off-by: dillonstreator <dillonstreator@gmail.com>
Signed-off-by: dillonstreator <dillonstreator@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: dillonstreator <dillonstreator@gmail.com>
Merged
Member
Author
Verified on a local instanceBuild: this branch at 3d71d2d (the later commits only touch tests and lint baselines), swapped in for the app container while its queue was idle. I re-rendered four
On every sheet, no pane or crop sits on a shirt print or the painting. The host close-ups are face crops on the host, and the short couch cutaways show the larger guest. Not changed here, and not caused by this PR:
|
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.
Problem
On a multi-camera podcast (Bad Friends Ep 348) the automatic layout had two faults:
splitwhose second pane framed the shirt. A painted portrait on the wall (detector score ~0.6, box height wobbling ~1.5%) slipped pastdropStaticFaces, so the guests' two-shot read as three people and was shown whole.fit 0-2, split 2-6, stack 6-11, fit 11-12, split 12-13, face 13-14, ….Fix
liveFaces(layout.ts) drops faces that are not people before any layout rule reads the samples. The render, the evals,reelsaw facesandsample-shotall call it.onTorso): a box whose centre is 1-3 face heights below a bigger face, within 1.25 of that face's widths across, and at most 0.85 of its height. A face track that is on a torso in at least half of the frames it shares with a bigger face is dropped in every frame, including frames where the wearer's own face was missed. Active speaker detection drops prints per frame before matching faces to seats (withoutPrints), so a print is never taken for a seat or counted as a third person.dropStaticFacesnow also drops a picture that is re-detected at the same spot after a cut (two or more face tracks) when YuNet's landmarks hold still inside its box (spread < 0.007 of the box), even though its box height wobbles under 3%. One track alone never qualifies: a speaker holding still for a second measured 0.006.settleLayoutsadds hysteresis across shots insidesegmentLayouts. An inner shot underMIN_LAYOUT_SEC(2 s), or one under 3 s between two face crops, splits or stacks of the same layout, takes a neighbour's layout when that layout can show it:fit) can show anything;The shot is re-framed on its own faces (
forcedDecision). A shot no neighbour can show keeps its layout (a close-up between two splits, a crowd between face crops). The clip's first and last pieces are left alone, since they may be longer shots cut by the clip's edges. Layout now changes at a cut between shots that last, within a shot only on a sustained change in the faces (the existing 2.5 s rule), and between talkers only on active speaker detection's turns.Builds on #436 (merged); no changes to
followTalker,shotSeatsor the forced-face path.Evals (
pnpm eval framing speakers)Three new framing
shotscases from the episode, with new checks:printed: no pane on a print or the painting;maxSegmentsPerMin: segments per minute;minSegmentSec: shortest inner segment.shots-multicam-guest-two-shotsis the regression check that a lasting two-shot (5 s, both guests) still splits.shots-multicam-printed-shirts(clip of the report)shots-multicam-guest-cutawaysshots-multicam-guest-two-shots(real split kept)shots-couch-multicamshots-couch-multicam-guest-storyfittooFraming summary:
passRate0.91 → 0.92,worstShotAgreement0.684 → 0.684,worstPrintedTargets0,worstSegmentsPerMin14.2. No framing case regressed;eval/baselines/framing.jsonis updated.Speakers: 8/9 pass both before and after.
sistercircle-couch-smiling-listenerfails on main on this machine too (talk 0/0 → split), so it is not caused by this change; that baseline is left as is.Unit tests:
test/live-faces-settle.test.ts(new).test/segment-shots.test.tsnow expects a 1.1 s two-shot between close-ups to keep the close-ups' crop.Trade-offs
docs/LAYOUTS.mdcaveats.Docs
docs/LAYOUTS.md(faces that are not people, hysteresis, caveats, eval coverage),docs/EVALS.md,docs/TROUBLESHOOTING.md, changeset.Verified on
Offline: the eval suites and
sample-shoton three ranges of the episode. Pieces before → after:Re-rendered four Bad Friends clips (Ep 348, 347, 344) on a local instance running this branch at 3d71d2d: 13 → 4, 12 → 3, 13 → 7 and 21 → 1 pieces, no pane on a print. Details and the two issues left as they were are in the verification comment.