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

Add option to analysis export that will export predictions for all frames (including those with no predictions) #1651

Open
roomrys opened this issue Jan 9, 2024 Discussed in #1622 · 0 comments
Labels
enhancement New feature or request open pr A fix has been written, but is still being reviewed.

Comments

@roomrys
Copy link
Collaborator

roomrys commented Jan 9, 2024

Discussed in #1622

Originally posted by vtsai881 December 3, 2023
Hello Team SLEAP! :)

I was importing SLEAP prediction csvs into SimBA when I realized that there are missing rows for frames when there are no predictions
(i.e. where the animal is not present or not being tracked).

Ideally, those would just be extraneous frames at the beginning or ends of videos that could be clipped out during pre-processing before SLEAP and there would be SLEAP tracking for every frame in which the animal is present, but in the case that there is actually inconsistent tracking, is there currently a way to keep the number of rows in the output csv the same as the number of frames in the original video (i.e. maintaining the original frame indices by populating rows with NAs or 0s)?

I forked the repo and modified the write_tracking_h5.py and associated functions so that the all_frames argument does this, and added a button with the option to export a csv with rows for every frame to the dropdown menu. I'm still relatively new to the SLEAP workflow/datastructures, so I wanted to check if I missed something that already tackles this issue!

I'm happy to open a PR If my changes make sense and aren't redundant!

Thanks!
Valerie 😄

Related:

@roomrys roomrys added enhancement New feature or request open pr A fix has been written, but is still being reviewed. labels Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request open pr A fix has been written, but is still being reviewed.
Projects
None yet
Development

No branches or pull requests

1 participant