https://github.com/catalystneuro/dlc2nwb
Utilities to convert DeepLabCut (DLC), output to/from Neurodata Without Borders (NWB) format.
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: sciencedirect.com, nature.com, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Repository
Utilities to convert DeepLabCut (DLC), output to/from Neurodata Without Borders (NWB) format.
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Welcome to the DeepLabCut 2 Neurodata Without Borders Repo
Here we provide utilities to convert DeepLabCut (DLC) output to/from Neurodata Without Borders (NWB) format. This repository also elaborates a way for how pose estimation data should be represented in NWB.
Specifically, this package allows you to convert DLC's predictions on videos (*.h5 files) into NWB format. This is best explained with an example (see below).
NWB pose ontology
The standard is presented here. Our code is based on this NWB extension (PoseEstimationSeries, PoseEstimation) that was developed with Ben Dichter, Ryan Ly and Oliver Ruebel.
Installation:
Simply do (it only depends on ndx-pose and deeplabcut):
pip install dlc2nwb
Example within DeepLabCut
DeepLabCut's h5 data files can be readily converted to NWB format either via the GUI from the Analyze Videos tab or programmatically, as follows:
```python import deeplabcut
deeplabcut.analyzevideosconverth5tonwb(configpath, videofolder)
``
Note that DLC does not strictly depend on dlc2nwb just yet; if attempting to convert to NWB, a user would be asked to runpip install dlc2nwb`.
Example use case of this package (directly):
Here is an example for converting DLC data to NWB format (and back). Notice you can also export your data directly from DeepLabCut.
``` from dlc2nwb.utils import converth5tonwb, convertnwbtoh5
Convert DLC -> NWB:
nwbfile = converth5tonwb( 'examples/config.yaml', 'examples/m3v1mp4DLCresnet50openfieldAug20shuffle130000.h5', )
Convert NWB -> DLC
df = convertnwbto_h5(nwbfile[0]) ```
Example data to run the code is provided in the folder examples. The data is based on a DLC project you can find on Zenodo and that was originally presented in Mathis et al., Nat. Neuro as well as Mathis et al., Neuron. To limit space, the folder only contains the project file config.yaml and DLC predictions for an example video called m3v1mp4.mp4, which are stored in *.h5 format. The video is available, here.
Funding and contributions:
We gratefully acknowledge the generous support from the Kavli Foundation via a Kavli Neurodata Without Borders Seed Grants .
We also acknowledge feedback, and our collaboration with Ben Dichter, Ryan Ly and Oliver Ruebel.
Owner
- Name: CatalystNeuro
- Login: catalystneuro
- Kind: organization
- Email: hello@catalystneuro.com
- Website: catalystneuro.com
- Twitter: catalystneuro
- Repositories: 87
- Profile: https://github.com/catalystneuro