DeepLabCut Workflow
Download the Video From Google Drive#
- A video will be assigned to you. You will recieve an email with a link to the folder that has the video or I will specificly point to a video that you can download.
Run DeepLabCut GUI#
Create New Project#
Tab: Manage Project
- Type the name of the project and your name.
- Select the video you want to use for the current project.
- Check the first box, then click 'Browse' and choose a directory that you can remember (typically your desktop).
- Check the second box.
Modify Config File Parameters#
- Open your project folder.
- Open
Config.yamlfile. - Change label names under
bodyparts:andskeleton:(names depend on the current project). - Change
pcutoff:to 0.9.
Extract Frames#
Tab: Extract Frames
- Keep the defaults then hit "Ok".
Wait until all processes are completed. When completed, you will see the following message:
Frames were successfully extracted.
You can now label the frames using the function 'label_frames' (if you extracted enough frames for all videos).
Label Frames#
Tab: Label Frames
- Click on
Label Framesbutton in the bottom.

- Label the body parts.
- When you are done,
savethenquit.
Build Skeleton#
Tab: Label Frames
- Click on
Build Skeletonbutton in the bottom. - Drag your mouse on the points in the correct order to draw a line that defines the skeleton.
- Hit
Export, then close the window.

- Close DeepLabCut interface, then hit
CTRL+Cin your terminal.
Clean Labeled Data#
- Open the
.csvfile under your project folder → labeled-data → video-name folder →CollectedData<name>.csv. - If you skipped any frame, you will notice that some rows have no data.
- Delete any image that does not have any data in the .csv file (the images name are in the first column of the .csv file, and the actual images can be found under the same folder you found your .csv file in).
- When you are done deleting the actual images (don't edit the .csv file!), open a new terminal window and run the following:
Change Paths#
Next, we will change all the paths in the configuration file to match the cluster's.
- Open your project folder.
- Open
Config.yamlfile. - Change the paths under
project_path:andvideo_setsto match the cluster's directory. For example:
The following paths
will be changed to:
note
On windows, make sure you change all back slashes "\" to forward slashes "/".
- Save and close.
Upload Your Project Folder to Google Drive#
- Open your school's account on Google Drive.
- Drag and drop the folder to the same shared folder you downloaded the video from.
- Wait for the upload to complete.
Log in to the Cluster#
- Now log in to the cluster:
- Call your "DLC environment kit":
- Start a tmux session.
Copy Your Project Folder to the Cluster#
You will use Rclone to copy your project folder from Google Drive to the cluster. Do this by running:
note
The </path/to/project> can be viewed at the top of the Google Drive page.
For example, this:

will be:
Copy to Shared#
- When the folder is downloaded to the cluster, make a copy to
chaselabgroup's shared folder. To do this, simply run:
    Done!  Â
Related External Links/Sources:#
- DeepLabCut (http://www.mousemotorlab.org/deeplabcut)
- Rclone (https://rclone.org/)
- CSS: Cat Swinging on String by David Khourshid (https://codepen.io/davidkpiano/pen/Xempjq)