How to convert analysis csv files back to slp or h5 files? #1717
-
Hello, I have exported some SLEAP-tracked videos to analysis CSV files. I have edited the csv files without removing any rows or columns. Now, I would like to convert those files back to slp files that are connected to the original videos. Ultimately, from the edited csv files, I want to generate annotated videos or 'Render Video Clip with Instances...'. Is there a direct or indirect way that this can be accomplished with functions from the SLEAP CLI or python interface? I cannot figure out to do so. I would greatly appreciate your help! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @amblypatty, Good question! We don't currently support importing those CSV files back in since they are missing a lot of metadata that we normally have in our SLP files. If you don't mind providing an example CSV together with the SLP file you exported it from, we can come up with a one-off solution as we investigate better ways to implement this workflow. You can provide those through a link here or via this form. Thanks! Talmo |
Beta Was this translation helpful? Give feedback.
-
Hi @talmo, I have uploaded the requested files in the submission form you provided. Perhaps a solution could come from a json file with metadata like skeleton information and video file names that supplemented creation of slp file? However, I am unsure of what metadata is required to create an slp file. Thanks again for your help. |
Beta Was this translation helpful? Give feedback.
-
Hey @amblypatty, Thanks for the ping. Here's a Colab notebook that does the one-off recreation from CSV by just updating the original SLP file. Let us know if that works for you! Cheers, Talmo |
Beta Was this translation helpful? Give feedback.
Hey @amblypatty,
Thanks for the ping. Here's a Colab notebook that does the one-off recreation from CSV by just updating the original SLP file.
Let us know if that works for you!
Cheers,
Talmo