-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(dataset): add tool to convert images to video datasets #2560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new dataset editing tool to convert image-based datasets to video format, providing storage efficiency and potentially improved data loading performance. The implementation integrates with the existing lerobot_edit_dataset script and reuses the existing encode_video_frames utility from the video_utils module.
Key Changes:
- Added
convert_to_videooperation type with configurable video encoding parameters (codec, quality, GOP size, etc.) - Implemented parallel processing at both episode and image levels using ThreadPoolExecutor
- Added comprehensive documentation with usage examples in the command-line tool help text and documentation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/lerobot/scripts/lerobot_edit_dataset.py | Adds core implementation: ConvertToVideoConfig dataclass, image extraction/saving functions, video encoding logic, and integration with the main edit_dataset command |
| docs/source/using_dataset_tools.mdx | Documents the new convert_to_video operation with usage examples and parameter descriptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What this does
feat(dataset): add tool to convert images to video datasets
Very useful to encode images dataset into videos.
Will work out of the box