8. Exporting the results¶
SLEAP stores labeled data, predictions, and all metadata in .slp
files. These files use a custom format that is optimized for SLEAP workflows and contain metadata, but ultimately are just HDF5 files that implement our data model .
These .slp
files are not intended for final use in analysis since they require SLEAP to be parsed appropriately.
Once you're ready to analyze your results, you have several options for different file formats for export. While these do not contain all the metadata used during the labeling and trainign stage, they are more convenient for analysis and portable for use in different downstream softwares and libraries.
The main options we provide are listed below. We recommend exporting your proofread predictions to each of these formats so you can explore your data in the next step of the tutorial.
NWB¶
The Neurodata Without Borders (NWB) format provides a data standard for describing and storing neural and behavioral data.
We strongly recommend using NWB as it affords tremendous advantages in terms of portability, standardization, reproducibility and compatibility with a broader scientific software ecosystem. For example, NWB formatted data can be hosted for free in the DANDI Archive .
SLEAP natively supports NWB through the ndx-pose extension .
For more information on using NWB in Python or MATLAB, check out the guide on reading NWB files .
To export to NWB in SLEAP, go to File → Export NWB...
HDF5¶
The Hierarchical Data Format v5 (HDF5) is a widely used data format for storing numerical data such as N-dimensional arrays and is widely employed in scientific computing.
All major programming languages support HDF5, including Python , R , and MATLAB .
We recommend this guide for getting started with HDF5 in Python.
To export to HDF5 in SLEAP, go to File → Export Analysis HDF5... → Current Video...
CSV¶
Comma-separated value (CSV) files are the simplest and most portable format for tabular data, and can be opened in standard spreadsheet software like Microsoft Excel or Google Sheets.
While it does not allow for storing arbitrary metadata, it can be useful when you just need the pose trajectories and no other information such as the skeleton, provenance and others.
A number of behavioral analysis tools also support reading this format and it is particularly easy to manipulate.
To export to CSV in SLEAP, go to File → Export Analysis CSV... → Current Video...
To download the files you just exported, see this VM FAQ answer.
You did it!