From 69660941d0c2359a574778a6e2a92455f7419f67 Mon Sep 17 00:00:00 2001 From: Chopin Date: Sun, 23 Feb 2025 10:28:30 +0800 Subject: [PATCH] add preprocess method for bc_z dataset (#2) --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2aed14..bea2b38 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ pip install -e . ## Get started > [!IMPORTANT] -> Before running the following code, modify `consolidate()` function in lerobot. +> 1.Before running the following code, modify `consolidate()` function in lerobot. > ```python > def consolidate(self, run_compute_stats: bool = True, keep_image_files: bool = False, stat_kwargs: dict = {}) -> None: > ... @@ -93,6 +93,17 @@ pip install -e . > self.meta.stats = compute_stats(self, **stat_kwargs) > ... > ``` +> 2.for `bc_z` dataset, two source codes need to be modified. +> +> path: `lerobot/common/datasets/video_utils.py` +> +> method: `encode_video_frames` +> ```python +> # add the following content to line 141: +> vf: str = "pad=ceil(iw/2)*2:ceil(ih/2)*2", +> # Add the following content to line 171: +> ffmpeg_args["-vf"] = vf +> ``` Download source code: