Skip to content

Commit e499671

Browse files
authored
adding docs for using data labeled elsewhere (formatting) (#2736)
* Create OtherData.md - new doc, old wiki page! * Update _toc.yml - add to toc
1 parent 8a81296 commit e499671

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ parts:
5151
chapters:
5252
- file: docs/tutorial
5353
- file: docs/convert_maDLC
54+
- file: docs/recipes/OtherData
5455
- file: docs/recipes/io
5556
- file: docs/recipes/nn
5657
- file: docs/recipes/post

docs/recipes/OtherData.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# How to use data labeled outside of DeepLabCut
2+
- and/or if you merge projects across scorers (see below):
3+
4+
5+
6+
## Using data labeled elsewhere:
7+
8+
Some users may have annotation data in different formats, yet want to use the DLC pipeline. In this case, you need to convert the data to our format. Simply, you can format your data in an excel sheet (.csv file) or pandas array (.h5 file).
9+
10+
Here is a guide to do this via the ".csv" route: (the pandas array route is identical, just format the pandas array in the same way).
11+
12+
**Step 1**: create a project as describe in the user guide: https://github.com/AlexEMG/DeepLabCut/blob/master/docs/UseOverviewGuide.md#create-a-new-project
13+
14+
**Step 2**: edit the ``config.yaml`` file to include the body part names, please take care that spelling, spacing, and capitalization are IDENTICAL to the "labeled data body part names".
15+
16+
**Step 3**: Please inspect the excel formatted sheet (.csv) from our [demo project](https://github.com/AlexEMG/DeepLabCut/tree/master/examples/Reaching-Mackenzie-2018-08-30/labeled-data/reachingvideo1)
17+
- i.e. this file: https://github.com/AlexEMG/DeepLabCut/blob/master/examples/Reaching-Mackenzie-2018-08-30/labeled-data/reachingvideo1/CollectedData_Mackenzie.csv
18+
19+
**Step 4**: Edit the .csv file such that it contains the X, Y pixel coordinates, the body part names, the scorer name as well as the relative path to the image: e.g. /labeled-data/somefolder/img017.jpg
20+
Then make sure the scorer name, and body parts are the same in the config.yaml file.
21+
22+
Also add for each folder a video to the `video_set` in the config.yaml file. This can also be a dummy variable, but should be e.g.
23+
C://somefolder.avi if the folder is called somefolder. See demo config.yaml file for proper formatting.
24+
25+
**Step 5**: When you are done, run ``deeplabcut.convertcsv2h5('path_to_config.yaml', scorer= 'experimenter')``
26+
27+
- The scorer name must be identical to the input name for experimenter that you used when you created the project. This will automatically update "Mackenzie" to your name in the example demo notebook.
28+
29+
## If you merge projects:
30+
31+
**Step 1**: rename the CSV files to be the target name.
32+
33+
**Step 2**: run and pass the target name ``deeplabcut.convertcsv2h5('path_to_config.yaml', scorer= 'experimenter')``. This will overwrite the H5 file so the data is all merged under the target name.

0 commit comments

Comments
 (0)