Fix multi-shot matching: Always use continuity seed for first island to prevent wrong scene jumps
This commit is contained in:
@@ -1471,21 +1471,12 @@ def _match_unmatched_visual_segments(
|
||||
start_s=beat.start_s + start_s,
|
||||
end_s=beat.start_s + end_s,
|
||||
)
|
||||
if island_idx == 0:
|
||||
# First island of an unmatched multi-shot beat: search globally
|
||||
# without a continuity bias from the previous beat. Continuity
|
||||
# assumes the shot follows the previous beat in the source, but
|
||||
# the lead shot of a multi-shot beat is often an insert cut from
|
||||
# a completely different scene. A wrong seed with score 0.92
|
||||
# would push the real match out of the refinement candidate pool.
|
||||
continuity = {}
|
||||
else:
|
||||
continuity = _continuity_seed_in_points(
|
||||
beat.beat_id,
|
||||
[b if b.beat_id != beat.beat_id else segment_beat for b in beats],
|
||||
cached + expanded,
|
||||
cfg,
|
||||
)
|
||||
continuity = _continuity_seed_in_points(
|
||||
beat.beat_id,
|
||||
[b if b.beat_id != beat.beat_id else segment_beat for b in beats],
|
||||
cached + expanded,
|
||||
cfg,
|
||||
)
|
||||
segment_matches = []
|
||||
if beat.beat_id not in skip_global_segment_scan_for:
|
||||
segment_matches = _run_segment_match(segment_beat, continuity, cfg, allow_fullscan=True)
|
||||
|
||||
Reference in New Issue
Block a user