Description
openedon 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 😄