feat(presence): flood-fill presence mode
Add PresenceMode::flood alongside the default track_extent. In flood mode the result sink snaps each presence claim to the shot it sits in, so an actor seen once anywhere in a shot is reported for the whole shot [prev_boundary, next_boundary]. This trades precision for recall against X-Ray's per-scene cast granularity and is a toggleable knob for the optimizer to weigh rather than a default. Boundaries come from the frame stream, now carried through SceneAnnotation (is_cut and is_scene_boundary). Flood prefers TransNetV2 shot boundaries when a scene detector populated them, otherwise falls back to the always-on histogram cuts (camera_position_change_detector); with no boundaries it degrades to track_extent per claim. The is_scene_boundary path stays dormant so an out-of-process scene detector can be revived later without re-wiring. Selected with --presence-mode flood|track_extent (default track_extent), so existing output is byte-for-byte unchanged. The dump_embeddings header note records why TransNetV2 scene detection is not run in that process.
This commit is contained in:
@@ -155,6 +155,13 @@ struct SceneAnnotation {
|
||||
double timestamp_sec{0.0};
|
||||
std::vector<IdentifiedActor> visible_actors;
|
||||
bool eof{false};
|
||||
// Carried through from Frame so the sink can collect boundaries for flood-fill
|
||||
// presence (PresenceMode::flood). is_cut is the always-on histogram cut
|
||||
// (camera_position_change_detector) — the boundary flood-fill uses by default.
|
||||
// is_scene_boundary is the opt-in TransNetV2 shot boundary (0 unless scene
|
||||
// detection ran); kept for a future out-of-process scene detector.
|
||||
bool is_cut{false};
|
||||
bool is_scene_boundary{false};
|
||||
};
|
||||
|
||||
// ── Actor gallery ─────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user