Import and exporting annotations

This is a guide to walk you through the steps of importing and exporting various annotation formats.

Importing annotations

from DeepLabCut

To import a DeepLabCut dataset, follow the steps below. Note that you can only label one folder at a time.

  1. In the menu, click on: Import > Load DeepLabCut dataset
  2. Navigate to your DeepLabCut project
  3. Go within the labeled-data
  4. Select a folder and click “Upload”

If there are no labels yet, you may need to specify bodyparts (below). Note: Due to no available libraries to parse pytables in javascript, just the h5 file with labels (not images) is sent to server to convert it to a csv to parse.

from Lightning Pose

To import a Lightning Pose dataset, follow the steps below.

  1. In the menu, click on: Import > Load Lightning Pose dataset
  2. Navigate to your folder which contains “CollectedData.csv”
  3. Select that folder and click “Upload”

from SLEAP

To import a SLEAP dataset, follow these steps:

  1. In the menu, click on: Import > Load SLEAP dataset (SLP file)
  2. Select your slp file and select “Upload”

Note that SLP file must have the images padded with zeros to account for the javascript h5 loading library. This is already in the latest SLEAP code and will be available in future SLEAP releases. For now, you can use this python script to pad your video items.

Exporting annotations

to DeepLabCut

To export your annotations to DeepLabCut, follow these steps:

  1. In the menu, click on: Export > Export Annotations (DeepLabCut format)
  2. Save your file as “CollectedData_SCORER.h5” within the folder within labeled-data that you imported Replace SCORER above with the actual scorer name you specified at the top of your DeepLabCut config.yaml

Note: Similarly to importing, due to limitations on h5 libraries in javascript, the labels are sent to server to convert them to generate an h5 file. Again, no images are ever sent out of your machine, only labels.

to Lightning Pose

To export your annotations to Lightning Pose, follow these steps:

  1. In the menu, click on: Export > Export Annotations (Lightning Pose format)
  2. Save your file as “CollectedData.csv” within the folder you imported

to SLEAP

To export your annotations to Lightning Pose, follow these steps:

  1. In the menu, click on: Export > Export Annotations (SLP format)
  2. Save your slp file wherever.

It might take a bit of time (less than a minute) to generate the SLP file for export.