Normalize segmented cache coverage
This commit is contained in:
@@ -218,7 +218,12 @@ def _normalize_cached_results(beats: list, results: list, cfg) -> list:
|
||||
if weighted_score < cfg.cv.deep_scan.provisional_match_threshold:
|
||||
continue
|
||||
if beat is not None and beat.duration_s > 0:
|
||||
coverage = segment_duration / beat.duration_s
|
||||
visible_duration = sum(
|
||||
max(0.0, end_s - start_s)
|
||||
for start_s, end_s in _reference_scoreable_segments(beat, cfg)
|
||||
)
|
||||
coverage_target = visible_duration if visible_duration > 0 else beat.duration_s
|
||||
coverage = segment_duration / coverage_target
|
||||
if coverage < cfg.cv.deep_scan.min_duration_coverage:
|
||||
continue
|
||||
normalized.append(replace(result, match_score=weighted_score))
|
||||
|
||||
Reference in New Issue
Block a user