feat: add guided exploration and share user-started MCP backend
This commit is contained in:
1 parent
f86db1ced6
commit
ee256ad7ce
144 files changed
+8625
-2075
No files matched your search
@@ -117,12 +117,22 @@ def _gather_universal_frames(
|
||||
"""Extracts uniform keyframes plus dense action-window frames, merged by timestamp."""
|
||||
# Universal providers consume stills rather than the uploaded clip. Use
|
||||
# the raw extracted segment so slowdown/transcode PTS never skew labels.
|
||||
keyframes = _va.extract_keyframes_from_video(
|
||||
raw_path,
|
||||
fps=1.0,
|
||||
max_frames=30,
|
||||
max_dimension=1080,
|
||||
)
|
||||
if getattr(analyzer, "media_source", None) is not None and end_time is not None:
|
||||
# Saved demonstrations have no automatic action timestamps. Cover the
|
||||
# entire clip, including its tail, instead of taking only its first 30s.
|
||||
last = max(0.0, end_time - actual_start - 0.1)
|
||||
interval = max(1.0, last / 29)
|
||||
offsets = sorted({min(last, i * interval) for i in range(30)})
|
||||
keyframes = _va.extract_frames_at_timestamps(
|
||||
raw_path, offsets, max_frames=30, max_dimension=1080
|
||||
)
|
||||
else:
|
||||
keyframes = _va.extract_keyframes_from_video(
|
||||
raw_path,
|
||||
fps=1.0,
|
||||
max_frames=30,
|
||||
max_dimension=1080,
|
||||
)
|
||||
dense_offsets = analyzer._dense_action_offsets(
|
||||
start_time,
|
||||
end_time if end_time is not None else start_time,
|
||||
|
||||
Reference in new issue
Block a user