Commit Graph

22 Commits

Author SHA1 Message Date
Melbar e966a4c321 Filter cached vision action windows 2026-05-09 18:30:13 +02:00
Melbar a275b2efb6 Retune weak multi-shot segment phases 2026-05-09 05:10:38 +02:00
Melbar acafe538b2 Tighten cutter phase span validation 2026-05-08 14:56:44 +02:00
Melbar e335fffe92 Mask timecode in phase refine and guard cutter scene starts 2026-05-08 14:18:27 +02:00
Melbar 430a81a988 Constrain hi-res phase refine and update beat 14 2026-05-08 13:45:09 +02:00
Melbar f20f89b06b Add hi-res phase refinement for intra-scene phase matching (Beat 03 investigation) 2026-05-08 10:52:11 +02:00
Melbar c972894972 Fix: prevent tail-trimming of valid matches at hard scene boundaries in global_scan.py 2026-05-06 19:06:33 +02:00
Melbar 45769aa366 Refactor report pipeline: redesign HTML, add motion alignment, remove legacy reporter
- scripts/generate_cutter_report.py: complete HTML redesign with glassmorphism
  dark-mode style, compare video links in markdown output
- cli.py: cmd_report now calls _regenerate_cutter_report directly; also writes
  legacy match_report.html; removes dependency on src/pipeline/reporter.py
- src/cv/global_scan.py: add motion-phase alignment refinement step after
  initial in-point search (align_in_point_by_motion, threshold +0.015)
- Remove HANDOVER.md and src/pipeline/reporter.py (superseded)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 12:44:10 +02:00
Melbar 54d3f04616 Fix matching regressions, cache guard, and multi-shot algorithm for beat 15
- config.toml: revert scoreable_luma/contrast thresholds to 24/58/24 (lowering
  them let cross-fade blend frames contaminate content-validation templates,
  dropping scores below provisional_content_threshold)
- src/cv/global_scan.py: _is_dark_reference_frame now requires contrast<30 so
  genuine dark silhouette frames are not rejected as scoreable; two-path
  _is_scoreable_reference_frame separates standard vs fade-content scoring
- cli.py: _keeps_cached_match() guard prevents a weaker single-span rematch
  from overwriting a better multi-segment provisional cache entry
- cli.py: _fade_content_shots() restricted to between-island gaps only—
  pre-island black leaders were incorrectly emitted as matchable shots
- cli.py: island[0] of _match_unmatched_visual_segments() now uses no
  continuity seed so an insert cut at the start of a multi-shot beat is not
  forced toward the previous beat's scene
- scripts/generate_cutter_report.py: fix ffmpeg concat demuxer on Windows—
  use part.absolute().as_posix() so paths in the concat txt are absolute and
  not double-resolved relative to the concat file's directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 00:05:37 +02:00
Melbar 8aa6fe8323 Fix forehead_touch action group + always-fresh cutter assets
1. Action-group classifier conflated object-touches and person-touches.
   "man touches the red door with a small object" was being tagged as
   forehead_touch because "touch" was in the forehead_touch needles set.
   That made the realign pass yank Beat 16 from scene 451 (correct: man
   painting red door, IV stand) over to scene 623 (woman/man in bed) —
   a totally wrong shot at score 0.344.

   Fix: removed generic "touch*" verbs from forehead_touch's needle set.
   forehead_touch is now added in _semantic_action_groups() only when a
   touch verb is paired with an explicit body-part target (forehead,
   face, cheek, head, hand, ...) and not paired with an object target
   (door, handle, brush, tool, lock, ...).

   Effect on Beat 16 after `match --beat 16 --vision`:
   scene 623 in=5476.28 score=0.344 -> scene 451 in=3912.48 score=0.626.

2. Cutter-report stills/clips were keyed by source-video mtime, so a
   match-position change without a video change served stale frames from
   the previous match. Dropped the mtime cache; both extractors now
   render fresh every time. Slower (~minute per full regen) but correct.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 05:23:24 +02:00
Melbar 7b4a98d760 Match segment window by its own action phase
For segmented beats, the repair stage now searches for the source action
window using the segment's own description first; the full beat context is
used only as a fallback or when it scores noticeably higher. The trailer-
offset shift is applied only when the beat context is actually chosen.

Also harden vision-call retries to catch read-side network errors
(TimeoutError, socket.timeout, ConnectionError, OSError) and wrap the
filter/repair loop so a transient vision failure preserves the previously
cached match instead of dropping it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 06:22:12 +02:00
Melbar e293835a86 Use beat context for segmented action retiming 2026-05-02 21:58:35 +02:00
Melbar 8415516f89 Retiming long scene matches by action phase 2026-05-02 20:47:59 +02:00
Melbar 252f710396 Rank long-scene probes without action penalty 2026-05-02 18:53:27 +02:00
Melbar 2d9ba91a7b Probe broader long-scene action windows 2026-05-02 18:25:16 +02:00
Melbar a5a84a9145 Use motion phase for in-scene timing 2026-05-02 17:59:18 +02:00
Melbar 3ea5582b49 Realign wrong in-scene action matches 2026-05-02 17:13:22 +02:00
Melbar 1a177d6b89 Reject vision matches with action phase mismatches 2026-05-02 16:49:47 +02:00
Melbar d9e470c877 Improve vision matching for dissolve-heavy beats 2026-05-02 16:15:51 +02:00
Melbar e6bd0faf03 Improve segmented vision matching quality 2026-05-02 13:49:16 +02:00
Melbar 535176c144 Lower provisional review threshold 2026-05-02 10:09:30 +02:00
Melbar 8e1bcf142f Initial project import 2026-05-02 09:07:41 +02:00