Skip to content
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

CLI for rendering video clip with instances #718

Closed
pinarkullu opened this issue May 3, 2022 · 4 comments
Closed

CLI for rendering video clip with instances #718

pinarkullu opened this issue May 3, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@pinarkullu
Copy link

Hello,
Is there any Command line equivalent of "Render Video Clip with Instances" GUI menu option?

Thank you for your help.

@talmo talmo added the enhancement New feature or request label May 3, 2022
@talmo
Copy link
Collaborator

talmo commented May 3, 2022

Hi @pinarkullu,

There is not a CLI equivalent but I agree that this would be a good feature to have. Tagging this as an enhancement.

In the meantime, you can achieve this by using a notebook or python script with the following:

import sleap.io.visuals

sleap.io.visuals.save_labeled_video(
    filename="visualization.mp4",  # output filename
    labels=tracked_labels,  # sleap.Labels
    video=tracked_labels.video,  # sleap.Video
    frames=list(range(150)),  # list of frame indices
)

Here's an example notebook (scroll to the bottom).

Let me know if that works for you for now.

Cheers,

Talmo

@pinarkullu
Copy link
Author

It works. Thank you

@talmo talmo changed the title Render Video Clip with Instances CLI for rendering video clip with instances May 12, 2022
@davidasamy davidasamy self-assigned this Jun 13, 2022
@davidasamy
Copy link
Collaborator

Hi @pinarkullu,

Wanted to let you know that this functionality has been added to the development version of SLEAP. If you would like to use it please install the development version of SLEAP and use the sleap-render command.

Regards,
David

@davidasamy davidasamy added the fixed in future release Fix or feature is merged into develop and will be available in future release. label Jun 15, 2022
@roomrys
Copy link
Collaborator

roomrys commented Jun 29, 2022

Hi @pinarkullu,

The new release of SLEAP v1.2.4 is now available for installation and includes this fix.

Thanks,
Liezl

@roomrys roomrys closed this as completed Jun 29, 2022
@roomrys roomrys removed the fixed in future release Fix or feature is merged into develop and will be available in future release. label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants