Add create reward visualization #3155
Merged
Merged
Conversation
…e/lerobot into feat/analysis_dataset
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
s1lent4gnt
reviewed
Mar 23, 2026
Member
s1lent4gnt
left a comment
There was a problem hiding this comment.
Looks nice, but I would love to consider these comments:
- Consider placing
create_progress_videos.pyat the same level as other scripts to stay consistent. - Add return types to all functions for consistency.
- Add
ArgsandReturnsin functions docstring would help readability. - Use descriptive variable names, the script is simple but it would be nice if you stay consistent with lerobot codebase.
- OpenCV can seek directly into the original video with cap.set(cv2.CAP_PROP_POS_MSEC, from_ts * 1000), eliminating one full decode/encode cycle in clip extraction from chunk and the intermediate file.
- Consider making MP4 the default output with GIF as an optional flag.
- The clip is opened three times: in composite_video, All three should be consolidated into a single open.
- Add shebang and Apache 2.0 license header - Replace hardcoded absolute OUTPUT_DIR with relative default (./progress_videos) - Add argparse CLI (--repo-id, --episode, --camera-key, --output-dir, --gif) - Wrap entrypoint in def main() - Replace all print() with logging - Use logging.error/warning instead of traceback.print_exc - Release VideoCapture via try/finally; consolidate triple-open into single seek - Eliminate intermediate clip file: seek directly via CAP_PROP_POS_MSEC - Make MP4 the default output, GIF opt-in via --gif flag - Add return types to all functions - Add Args/Returns docstrings - Use descriptive variable names throughout Made-with: Cursor
…sistency Made-with: Cursor
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
s1lent4gnt
reviewed
Mar 28, 2026
- Replace Unicode ellipsis and multiplication sign with ASCII equivalents - Fix step numbering from 1-5 to 1-4 (only 4 actual steps) - Move frame_width reading into convert_mp4_to_gif - Remove unused text_height variable Made-with: Cursor
AtticusZeller
added a commit
to AtticusZeller/lerobot
that referenced
this pull request
Apr 11, 2026
* Add create reward visualization and multimodal analysis tool * add example for creating progress video for sarm * nit * precommit * refactor: address review comments on create_progress_videos.py - Add shebang and Apache 2.0 license header - Replace hardcoded absolute OUTPUT_DIR with relative default (./progress_videos) - Add argparse CLI (--repo-id, --episode, --camera-key, --output-dir, --gif) - Wrap entrypoint in def main() - Replace all print() with logging - Use logging.error/warning instead of traceback.print_exc - Release VideoCapture via try/finally; consolidate triple-open into single seek - Eliminate intermediate clip file: seek directly via CAP_PROP_POS_MSEC - Make MP4 the default output, GIF opt-in via --gif flag - Add return types to all functions - Add Args/Returns docstrings - Use descriptive variable names throughout Made-with: Cursor * refactor: move create_progress_videos.py to examples/dataset/ for consistency Made-with: Cursor * refactor: address PR review comments on create_progress_videos.py - Replace Unicode ellipsis and multiplication sign with ASCII equivalents - Fix step numbering from 1-5 to 1-4 (only 4 actual steps) - Move frame_width reading into convert_mp4_to_gif - Remove unused text_height variable Made-with: Cursor
AriannaPietrasanta
pushed a commit
to gbionics/lerobot
that referenced
this pull request
Apr 30, 2026
* Add create reward visualization and multimodal analysis tool * add example for creating progress video for sarm * nit * precommit * refactor: address review comments on create_progress_videos.py - Add shebang and Apache 2.0 license header - Replace hardcoded absolute OUTPUT_DIR with relative default (./progress_videos) - Add argparse CLI (--repo-id, --episode, --camera-key, --output-dir, --gif) - Wrap entrypoint in def main() - Replace all print() with logging - Use logging.error/warning instead of traceback.print_exc - Release VideoCapture via try/finally; consolidate triple-open into single seek - Eliminate intermediate clip file: seek directly via CAP_PROP_POS_MSEC - Make MP4 the default output, GIF opt-in via --gif flag - Add return types to all functions - Add Args/Returns docstrings - Use descriptive variable names throughout Made-with: Cursor * refactor: move create_progress_videos.py to examples/dataset/ for consistency Made-with: Cursor * refactor: address PR review comments on create_progress_videos.py - Replace Unicode ellipsis and multiplication sign with ASCII equivalents - Fix step numbering from 1-5 to 1-4 (only 4 actual steps) - Move frame_width reading into convert_mp4_to_gif - Remove unused text_height variable Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
Add reward visualization also used in blog post
Checklist (required before merge)
pre-commit run -a)pytest)