Best way to import DLTdv CSV into SLEAP #1655
-
Hello! Could I please ask for some help importing digitized data into SLEAP? I currently have a series of CSVs and associated videos that I have digitized using Ty Hedrick's DLTdv software package: https://biomech.web.unc.edu/dltdv/. The CSVs consist of X, Y points for each camera, with each row corresponding to a synced frame in the videos (as in the attached file). Is there a way to import the data into SLEAP as is? If not, is there a series of steps that I can take to convert the data into something compatible with SLEAP? Thank you so much for any and all help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @andrewdclark, Good question! Yes, you can import pretty much any data type to SLEAP using our API. Thanks for providing the test CSV file! I whipped up a quick notebook that converts files in that format to a SLEAP-compatible project. You can find it here: https://colab.research.google.com/drive/1QeLhvaFIIUMeXi5rd2OQlOPazANvROtP?usp=sharing You can run this locally in your SLEAP conda environment by just putting the relevant bits in a script (e.g., You'll also need to Note: you should edit the script according to your data, namely by providing full paths to each of the video files. It might work without it, but SLEAP will ask you to locate those videos when you try to open the Let us know if you have any questions! Cheers, Talmo |
Beta Was this translation helpful? Give feedback.
Hi @andrewdclark,
Good question!
Yes, you can import pretty much any data type to SLEAP using our API. Thanks for providing the test CSV file! I whipped up a quick notebook that converts files in that format to a SLEAP-compatible project.
You can find it here: https://colab.research.google.com/drive/1QeLhvaFIIUMeXi5rd2OQlOPazANvROtP?usp=sharing
You can run this locally in your SLEAP conda environment by just putting the relevant bits in a script (e.g.,
convert_dltdv.py
) and running it (e.g.,python convert_dltdv.py
).You'll also need to
pip install sleap-io
in the SLEAP conda environment if you want to run the code in the notebook without any changes.Note: you should edit the script acco…