From ff60cd1ca93491ccc49b58d4c5110bc0f822a9a9 Mon Sep 17 00:00:00 2001 From: HuangJunshan Date: Fri, 17 Jan 2025 23:44:55 +0800 Subject: [PATCH 1/2] fix windows html visualize to make video could be seen --- lerobot/scripts/visualize_dataset_html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/scripts/visualize_dataset_html.py b/lerobot/scripts/visualize_dataset_html.py index cc3f3930..bfecbcdd 100644 --- a/lerobot/scripts/visualize_dataset_html.py +++ b/lerobot/scripts/visualize_dataset_html.py @@ -174,7 +174,7 @@ def run_server( dataset.meta.get_video_file_path(episode_id, key) for key in dataset.meta.video_keys ] videos_info = [ - {"url": url_for("static", filename=video_path), "filename": video_path.parent.name} + {"url": url_for("static", filename=str(video_path).replace("\\","/")), "filename": video_path.parent.name} for video_path in video_paths ] tasks = dataset.meta.episodes[episode_id]["tasks"] @@ -369,7 +369,7 @@ def visualize_dataset_html( if isinstance(dataset, LeRobotDataset): ln_videos_dir = static_dir / "videos" if not ln_videos_dir.exists(): - ln_videos_dir.symlink_to((dataset.root / "videos").resolve()) + ln_videos_dir.symlink_to((dataset.root / "videos").resolve().as_posix()) if serve: run_server(dataset, episodes, host, port, static_dir, template_dir) From 06a8e55f29745bd9127d51ac20a6fcd7b7ed5646 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 08:39:02 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- lerobot/scripts/visualize_dataset_html.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lerobot/scripts/visualize_dataset_html.py b/lerobot/scripts/visualize_dataset_html.py index a89701e4..d0c8f1ac 100644 --- a/lerobot/scripts/visualize_dataset_html.py +++ b/lerobot/scripts/visualize_dataset_html.py @@ -174,7 +174,10 @@ def run_server( dataset.meta.get_video_file_path(episode_id, key) for key in dataset.meta.video_keys ] videos_info = [ - {"url": url_for("static", filename=str(video_path).replace("\\","/")), "filename": video_path.parent.name} + { + "url": url_for("static", filename=str(video_path).replace("\\", "/")), + "filename": video_path.parent.name, + } for video_path in video_paths ] tasks = dataset.meta.episodes[episode_id]["tasks"]