Accessing sleap.labels for a conversion function to Lighting Pose #1696
Unanswered
JacopoRazzauti
asked this question in
Help!
Replies: 1 comment
-
Hi @JacopoRazzauti, For these sorts of conversion tasks, we recommend using As an example, here's a notebook using You may also want to check out: The two above may not yet support exporting training data though (we're working to add this to NWB FWIW). Let us know if you have any questions! Talmo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I am trying to create a conversion function that converts SLEAP labels into a format that is readable by lightning pose (which uses this data directory format: https://lightning-pose.readthedocs.io/en/latest/source/user_guide/directory_structure.html). This means I need to export the frames and store them in the labelled data folder and then generate a csv that indexes the frames and the locations for each instance and for each node (as you can see here: https://github.com/danbider/lightning-pose/blob/main/data/mirror-mouse-example/CollectedData.csv). For this purpose, I wrote a function that currently works on the exported csv files of a set of frames labelled in SLEAP. Ideally, I would like this function to work on the slp.labels but I have a hard time figuring out how the frames and the coordinates of the labels are stored in the sleap format to adapt my function to them. Do you have any suggestions on how to optimize it to receive a .slp file as an input and output a csv + a set of indexed frames?
Thank you!
Here is the function:
Beta Was this translation helpful? Give feedback.
All reactions