diff --git a/tools/generate_questions.py b/tools/generate_questions.py index aee5bff..74cd921 100644 --- a/tools/generate_questions.py +++ b/tools/generate_questions.py @@ -918,6 +918,14 @@ async def _run_generate(args: argparse.Namespace) -> None: total_failed += 1 continue + # frame_path 是相对于视频目录的,拼为绝对路径供 VLM 读取 + video_dir = videos_dir / video_id + for l1 in tree.roots: + for l2 in l1.children: + for l3 in l2.children: + if l3.frame_path and not Path(l3.frame_path).is_absolute(): + l3.frame_path = str(video_dir / l3.frame_path) + used_node_ids: set[str] = set() session_id = f"gen-{task_type}-{seq}" generated = False