Skip to content

Latest commit

 

History

History
137 lines (73 loc) · 4.62 KB

UseOverviewGuide.md

File metadata and controls

137 lines (73 loc) · 4.62 KB

Documentation:

This page contains a list of the essential functions of DeepLabCut as well as demos. There are many optional parameters with each described function, which you can find here. For additional assistance, you can use the help function to better understand what each function does.

Overview of the work-flow:

Option 1: Demo Notebooks:

We also provide Jupyter notebooks for using DeepLabCut on both a pre-labeled dataset, and on the end user’s own dataset. See all the demo's here!

Option 2: using terminal, Start Python:

Open an ipython session and import the package by typing in the terminal:

ipython

import deeplabcut

TIP: for every function there is a associated help document that can be viewed by adding a ? after the function name; i.e. deeplabcut.create_new_project?. To exit this help screen, type q.

Create a New Project:

deeplabcut.create_new_project(`Name of the project',`Name of the experimenter', [`Full path of video 1',`Full path of video2',`Full path of video3'], working_directory=`Full path of the working directory',copy_videos=True/False)

  • (Note, you can also put config_path = in front of the above line to create the path to the config.yaml that is used in the next step, i.e. config_path=deeplabcut.create_project(...))

(more details here)

Configure the Project:

  • open the config.yaml file (in a text editor (like atom, gedit, vim etc.)), which can be found in the subfolder created when you set your project name, to change parameters and identify label names!

(more details here)

  • set the config_path: config_path = '/home/computername/DeepLabCut2.0/yourprojectname/config.yaml' (for example)

  • or you already set it as a variable in step "Create_new_Project" directly above.

mini-demo: create project and edit the yaml file

Select Frames to Label:

deeplabcut.extract_frames(`config_path',`automatic/manual',`uniform/kmeans', crop=True/False, checkcropping=True)

(more details here)

Label Frames:

deeplabcut.label_frames(`config_path')

(more details here)

mini-demo: using the GUI to label

Check Annotated Frames:

deeplabcut.check_labels(`config_path')

(more details here)

Create Training Dataset:

deeplabcut.create_training_dataset(`config_path',num_shuffles=1)

(more details here)

Train The Network:

deeplabcut.train_network(`config_path',shuffle=1)

(more details here)

Evaluate the Trained Network:

deeplabcut.evaluate_network(`config_path',shuffle=[1], plotting=True)

(more details here)

Video Analysis and Plotting Results:

deeplabcut.analyze_videos(`config_path',[`/analysis/project/videos/reachingvideo1.avi'], shuffle=1, save_as_csv=True)

deeplabcut.create_labeled_video(`config_path' [`/analysis/project/videos/reachingvideo1.avi',`/analysis/project/videos/reachingvideo2.avi'])

deeplabcut.plot_trajectories(`config_path',[`/analysis/project/videos/reachingvideo1.avi'])

(more details here)

optional Refinement: Extract Outlier Frames:

deeplabcut.extract_outlier_frames(`config_path',[`videofile_path'])

(more details here)

optional refinement of the labels with the GUI:

(refinement and augmentation of the training dataset)

deeplabcut.refine_labels(`config_path')

mini-demo: using the refinement GUI, a user can load the file then zoom, pan, and edit and/or remove points:

When done editing the labels, merge:

deeplabcut.merge_datasets(`config_path')

(more details here)

HELP:

In ipython/Jupyter notebook:

deeplabcut.nameofthefunction?

In Python:

help(deeplabcut.nameofthefunction)

Return to readme.