-
Notifications
You must be signed in to change notification settings - Fork 2k
Support video frame output for Cosmos #2005
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
Support video frame output for Cosmos #2005
Conversation
@@ -237,6 +239,8 @@ def image( | |||
data_type: str = "rgb", | |||
convert_perspective_to_orthogonal: bool = False, | |||
normalize: bool = True, | |||
save_image_to_file: bool = False, |
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.
let's include these in the docstring as well
os.makedirs(dir_path, exist_ok=True) | ||
if images.dtype == torch.uint8: | ||
images = images.float() / 255.0 | ||
for tile in range(images.shape[0]): |
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.
would be good to have an option to save all tiles to a single file or save each tile individually. this might get a bit too much when we have lots of tiles.
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.
Agreed. My inclination would be to use a callback pattern - then the user can do any post-processing they'd like - perhaps save only ever 100 observation, or save only RGB, etc.
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.
ah yes, that's a good idea!
Signed-off-by: Kelly Guo <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
762b9cf
into
isaac-sim:chengrongl/randomization_selection_data_generation
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there