Skip to content

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

Open

Description

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestopen prA fix has been written, but is still being reviewed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions