feat(video): Verdict Interpreter suppresses Transient Hits - #125
Merged
Merged
Conversation
Short low-confidence unsafe runs bounded by clean samples (model hallucinations) are presented clean instead of flashing a mask, using the DVR's presentation delay to see the closing verdict before the run's first frame is shown. A Confident Hit (probability >= threshold x coefficient, capped) or a run longer than maxSuppressedRun still masks; the decision latches per run at first presentation so a mask never cuts mid-run. - VerdictInterpreter (dvr/verdictInterpreter.ts) is the only reader of the Verdict Timeline: per-frame cover for the DVR player, per-sample classification (clean | confirmedClean | tentative | unsafe) for the session machine - machine: one confirmation rule replaces CLEAN_STREAK_TO_CLEAR; tentative hits defer status while the DVR presents; lateHitPresented flips status when a run had to be masked before it could be judged - TRANSIENT_HIT_CONFIG (3 / 1.5 / 0.95) and hb.video.transient_runs counter with a dashboard panel for tuning - docs: Verdict Interpreter, Transient Hit, Confident Hit vocabulary
…n late Frames between the last clean sample and the first unsafe one were presented clean, so a safe-to-NSFW cut showed unmasked for up to a sample interval. The DVR already knows the Hit when it presents those frames, so the mask now starts PRE_MASK_LEAD_SEC before the Hit's sample (not across a coverage gap, not before a suppressed Transient Hit). - maskTiming.ts: one home for mask timing constants (sample floors, coverage gap, bridge horizon, pre-mask lead, TRANSIENT_HIT_CONFIG) - hb.video.transient_runs gains onset_gap_sec and pre_mask_lead_sec labels, plus a dashboard query, to tune the lead from data
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.
Summary
dvr/verdictInterpreter.ts) is the only reader of the Verdict Timeline. It uses the DVR's presentation delay to see the closing verdict before a run's first frame is shown. Short, low-confidence unsafe runs bounded by clean samples (Transient Hits) are presented clean instead of flashing a mask.maxSuppressedRunstill masks. The decision latches per run, so a mask never cuts mid-run.CLEAN_STREAK_TO_CLEAR. Tentative hits defer status while the DVR presents, andlateHitPresentedflips status when a run had to be masked before it could be judged.PRE_MASK_LEAD_SEC(0.15 s) before a Hit's sample, so safe-to-NSFW scene cuts are no longer shown unmasked for up to a sample interval. It never applies across a coverage gap or before a suppressed Transient Hit.maskTiming.tsholds the mask timing constants andTRANSIENT_HIT_CONFIG.strictnessToScoreThresholdmoves toutils/(it is now shared by the content script and inference).hb.video.transient_runscounter, plus Grafana panels for tuning the config and the lead.Test plan
pnpm test:unit(video, scoreThreshold and inference suites)