fix(demo): correct window start metadata and test unpacking

Use buffered frame indices for emitted window bounds to stay accurate across detection gaps, and align select_person tests with the 4-field return contract introduced for frame-space bbox support.
This commit is contained in:
2026-02-28 22:13:36 +08:00
parent ce64b559ec
commit 1f8f959ad7
3 changed files with 32 additions and 17 deletions
+6
View File
@@ -210,6 +210,12 @@ class SilhouetteWindow:
"""Fill ratio of the buffer (0.0 to 1.0)."""
return len(self._buffer) / self.window_size
@property
def window_start_frame(self) -> int:
if not self._frame_indices:
raise ValueError("Window is empty")
return int(self._frame_indices[0])
def _to_numpy(obj: _ArrayLike) -> ndarray:
"""Safely convert array-like object to numpy array.