add preprocess method for bc_z dataset (#2)

This commit is contained in:
Chopin
2025-02-23 10:28:30 +08:00
committed by GitHub
parent 8a720b6ae6
commit 69660941d0
+12 -1
View File
@@ -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: